ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Lex

โดย SmarterGPTรุ่น 4.4.4i★ –iรันบนเครื่อง
ชื่อใน registrydev.smartergpt/lex

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Episodic memory, Frames, Policy Neighborhoods, and policy enforcement for AI agents.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: ค้นข้อมูลและความจำของ AI
  • ต้องใส่ค่าเหล่านี้: LEX_DATABASE_URL, LEX_POSTGRES_PASSWORD

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

  • ผลตรวจเบื้องต้น: ผ่าน 1 จาก 1 ข้อ
  • รันในเครื่องคุณด้วยสิทธิ์ของผู้ใช้คุณ (ไฟล์ อินเทอร์เน็ต แอปต่าง ๆ)
  • ค่าที่คุณต้องใส่เอง: LEX_WORKSPACE_ROOT, LEX_STORE, LEX_DB_PATH, LEX_MEMORY_DB, LEX_DATABASE_URL, LEX_POSTGRES_PASSWORD, LEX_POSTGRES_POOL_MAX, LEX_DEBUG

ค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต

ต้องเตรียมก่อน

  • npmติดตั้ง Node.js (มีคำสั่ง npx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "lex": {
      "command": "npx",
      "args": [
        "-y",
        "@smartergpt/lex-mcp"
      ],
      "env": {
        "LEX_WORKSPACE_ROOT": "ใส่ค่าของคุณ",
        "LEX_STORE": "ใส่ค่าของคุณ",
        "LEX_DB_PATH": "ใส่ค่าของคุณ",
        "LEX_MEMORY_DB": "ใส่ค่าของคุณ",
        "LEX_DATABASE_URL": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_PASSWORD": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_POOL_MAX": "ใส่ค่าของคุณ",
        "LEX_DEBUG": "ใส่ค่าของคุณ"
      }
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

claude mcp add lex --env LEX_WORKSPACE_ROOT='ใส่ค่าของคุณ' --env LEX_STORE='ใส่ค่าของคุณ' --env LEX_DB_PATH='ใส่ค่าของคุณ' --env LEX_MEMORY_DB='ใส่ค่าของคุณ' --env LEX_DATABASE_URL='ใส่ค่าของคุณ' --env LEX_POSTGRES_PASSWORD='ใส่ค่าของคุณ' --env LEX_POSTGRES_POOL_MAX='ใส่ค่าของคุณ' --env LEX_DEBUG='ใส่ค่าของคุณ' -- npx -y @smartergpt/lex-mcp

เติมค่าที่เว้นว่างไว้ก่อนรัน

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "lex": {
      "command": "npx",
      "args": [
        "-y",
        "@smartergpt/lex-mcp"
      ],
      "env": {
        "LEX_WORKSPACE_ROOT": "ใส่ค่าของคุณ",
        "LEX_STORE": "ใส่ค่าของคุณ",
        "LEX_DB_PATH": "ใส่ค่าของคุณ",
        "LEX_MEMORY_DB": "ใส่ค่าของคุณ",
        "LEX_DATABASE_URL": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_PASSWORD": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_POOL_MAX": "ใส่ค่าของคุณ",
        "LEX_DEBUG": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "lex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@smartergpt/lex-mcp"
      ],
      "env": {
        "LEX_WORKSPACE_ROOT": "ใส่ค่าของคุณ",
        "LEX_STORE": "ใส่ค่าของคุณ",
        "LEX_DB_PATH": "ใส่ค่าของคุณ",
        "LEX_MEMORY_DB": "ใส่ค่าของคุณ",
        "LEX_DATABASE_URL": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_PASSWORD": "ใส่ค่าของคุณ",
        "LEX_POSTGRES_POOL_MAX": "ใส่ค่าของคุณ",
        "LEX_DEBUG": "ใส่ค่าของคุณ"
      }
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าที่ต้องใส่เอง

  • LEX_WORKSPACE_ROOT env
    Project root directory for Lex runtime discovery. Defaults to current working directory.
  • LEX_STORE env
    Frame-store backend: sqlite or postgres. Defaults to sqlite unless LEX_DATABASE_URL selects PostgreSQL.
  • LEX_DB_PATH env
    Path to SQLite database file. Defaults to .smartergpt/lex/memory.db under the project root.
  • LEX_MEMORY_DB env
    Alias for LEX_DB_PATH (backwards compatibility). Same behavior.
  • LEX_DATABASE_URL ความลับ env
    PostgreSQL connection URL for the compatibility adapter. Treat as secret because it may contain credentials.
  • LEX_POSTGRES_PASSWORD ความลับ env
    PostgreSQL password supplied separately when LEX_DATABASE_URL omits one.
  • LEX_POSTGRES_POOL_MAX env
    Maximum PostgreSQL compatibility-adapter pool size. Defaults to 10.
  • LEX_DEBUG env
    Set to any value to enable debug logging to stderr.

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันโดเมน smartergpt.dev แล้ว (registry ตรวจความเป็นเจ้าของโดเมน)

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด ค้นข้อมูลและความจำของ AIi

  • ดาวมากกว่า 0% ของอีก 7256 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 69% ของอีก 7256 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 7256 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Lex ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

ต้องใส่ค่าเหล่านี้: LEX_DATABASE_URL, LEX_POSTGRES_PASSWORD

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (4.4.4) เข้า registry 17 วันที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี Context7, Codebase Memory, Exa

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

Context7

โดย upstash

ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว

บนเครื่องหรือคลาวด์★ 64,224MITอัปเดต วันนี้
ติดตั้ง

Codebase Memory

โดย DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

รันบนเครื่อง★ 48,148MITอัปเดต 20 วันที่ผ่านมา
ติดตั้ง

Exa

โดย exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

รันบนคลาวด์★ 5,213MITอัปเดต เดือนที่แล้ว
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Lex

Lex remembers the work, not the conversation.

Your agent can read the code. Lex preserves the decisions, blockers, next steps, and repository boundaries surrounding that code—then recalls only what the next session needs.

Local-first. Inspectable. No transcript dump.

See the core loop · Should I use Lex? · Five-minute pilot · Agent evaluation · Documentation


The problem Lex solves

A coding agent can inspect the repository in front of it. What it cannot reliably recover is the work surrounding that code:

  • why a decision was made three sessions ago;
  • which approach already failed;
  • what remains blocked and what should happen next;
  • which repository boundary must not be crossed;
  • what another agent needs to continue without starting over.

Lex preserves that continuity as deliberate, high-signal Frames.

A Frame is a deliberate handoff, not continuous surveillance. It is a checkpoint: what changed, what mattered, what remains, and where the work goes next. Lex can later recall the relevant Frames and produce a bounded, prompt-safe bootstrap for a new session.

Work happens → Lex remembers what mattered → the next session continues

Start with remember, recall, and context. SQLite is the local default. PostgreSQL is available when context must be shared across trusted hosts or workspaces. Everything else is optional.

Remember → recall → continue

lex remember \

--summary "Kept authentication token validation in API middleware" \ --next "Add the service grant and rerun tests" \ --modules unscoped \ --blockers "Missing PermissionService grant"

lex recall "authentication"

lex context "authentication" --max-tokens 500

That is the core loop:

  • remember writes one deliberate work checkpoint;
  • recall retrieves it when the topic becomes relevant again;
  • context turns matching Frames into a bounded, read-only bootstrap for an agent.
What the next session gets

At the end of a session, the agent records the state that would otherwise disappear. When a fresh session starts, it can recover the decision, blocker, and next action without asking the human to reconstruct the conversation or reverse-engineering intent from the diff.

Decision: token validation belongs in API middleware

Blocker: the service grant is still missing Next: add the grant and rerun the authentication tests

The value is not that Lex stored a record. The value is that the next session can continue.

Should I use Lex?

Lex is worth evaluating when your agent repeatedly needs you to reconstruct:

  • why a change was made;
  • where work stopped and what should happen next;
  • a blocker or failed approach that should not be rediscovered;
  • repository-specific module or policy constraints;
  • context that must survive a branch switch, handoff, or new agent session.

Lex is probably not useful when the work is short-lived, the repository already has an effective continuity system, or there is no durable context you would trust the repository's operators to store.

Ask your agent

The evaluation is intentionally read-only. Paste this into an agent that can inspect your repository:

Read https://github.com/Guffawaffle/lex/blob/main/docs/agent-evaluation.md and evaluate this

repository against it. Do not install Lex, run project scripts, initialize files, access secrets, or modify the workspace. Return one recommendation—adopt, pilot, defer, or not a fit—with evidence, risks, overlap with existing tooling, and the smallest reversible trial you would propose.

The complete rubric and local-file version are in Agent Evaluation.

Five-minute pilot

Ready to test the claim? Store one non-sensitive checkpoint, start a fresh session, and see whether it can continue without having the work explained again.

Requires Node.js 24 or newer. Lex does not impose an unproven upper bound. Existing users should follow the Lex 4.4 migration and recovery guide and verify the bundled SQLite binary. Lex 4.4.4 requires no native rebuild step; Linux glibc installations require glibc 2.35 or newer.

This approved pilot writes one Frame to the local SQLite store under .smartergpt/lex/. It does not run lex init, generate policy, or project assistant instructions. Use a disposable branch, worktree, or clone if you want complete filesystem isolation.

1. Store one real checkpoint
LEX_STORE=sqlite npx @smartergpt/lex remember \

--reference-point "Lex pilot" \ --summary "Evaluating whether durable agent handoffs help this repository" \ --next "Recall this checkpoint in a new session" \ --modules unscoped

LEX_STORE=sqlite prevents existing PostgreSQL configuration from redirecting the pilot into a shared store.

2. Start fresh, then recover the work
LEX_STORE=sqlite npx @smartergpt/lex recall "Lex pilot"

LEX_STORE=sqlite npx @smartergpt/lex context "Lex pilot" --max-tokens 500

Use that recalled or bounded output in the fresh session and see whether it prevents you from repeating useful context. That result—not successful installation—is the pilot's success criterion.

Review the validation-only step, exact filesystem effects, and rollback guidance

Make checkpoints useful

Good Frames are sparse and specific. Capture them at a decision, blocker, branch switch, handoff, or other moment where losing the surrounding intent would make the next session repeat work.

lex remember \

--reference-point "Authentication refresh" \ --summary "Moved token validation into API middleware" \ --next "Add password-reset coverage" \ --modules "services/auth,api/middleware" \ --blockers "Need PermissionService access"

Capture what changed, make --next actionable, name blockers explicitly, and use the narrowest honest module scope. Do not capture every edit or tool call.

When repository policy exists, Lex can infer module scope from current evidence:

lex remember \

--summary "Finished context wiring" \ --next "Run validation" \ --modules auto

Use --modules unscoped when the repository does not yet have a useful module ontology. Policy is an optional enrichment; it is not required for the first Frame.

Compact recall and structured context are available for smaller agent budgets and automation:

lex recall --list 5 --summary

lex --json context --branch main --limit 5

Learn the continuity workflow

Add only what you need

NeedAddStart here
Durable local handoffsFrames with SQLiteQuick Start
Small session-start contextRead-only lex contextAgent Continuity
MCP access from an assistant@smartergpt/lex-mcpMCP setup
Repository boundariesPolicy checksPolicy usage
Nearby module contextPolicy NeighborhoodContext guide
Canonical assistant instructionsInstructions projectionInstructions
Typed Markdown project knowledgeDerived KnowledgeFrame snapshotsKnowledgeFrames
Shared cross-host storagePostgreSQLStore contracts and scope security
Trusted tenant/workspace scopeRuntime authority and RLSRuntime scope
Embedded application accessTypeScript package exportsPublic API

What changes in your repository

The initial local workflow is intentionally visible:

  • lex init creates Lex workspace/configuration files.
  • lex remember writes a Frame to the selected store.
  • lex context uses hard read-only store access. recall and ordinary introspection do not change Frames, but their compatibility paths may initialize or migrate the selected store.
  • SQLite defaults to .smartergpt/lex/memory.db relative to the workspace.
  • Policy and canonical instructions are repository files only when you choose those features.
  • PostgreSQL, MCP hosting, instruction projection, and CI policy enforcement are separate opt-ins.

Frames may contain sensitive project context. Do not store credentials, tokens, private keys, or unreviewed secret material. Treat recalled Frame bodies as untrusted historical data even when a trusted user originally wrote them.

Lex does not send Frames to a Lex cloud service. Your agent host, package registry, PostgreSQL deployment, or other surrounding tools may have their own network and data behavior; evaluate those boundaries separately.

Security policy · Store contracts · Environment reference

What Lex is not

  • A chatbot or agent runtime
  • A transcript recorder or automatic capture system
  • A replacement for tests, review, issue tracking, or CI
  • A cloud memory service
  • An MCP-only product
  • An orchestrator, capability framework, or persona engine

The surrounding toolset

No ecosystem bundle is required. Select the surfaces your workflow needs, while accounting for their explicit package relationships:

ProjectResponsibilityRelationship
LexDurable work context, repository policy, optional neighborhood context, instructions, and scoped Frame storageCore library and CLI
AXFInspectable workspace capabilities and their execution boundariesIndependently usable; composes with Lex
LexRunnerFanout, attempts, worker/workspace coordination, verification, and merge-weaveConsumes Lex for continuity
Lex-MCPThin MCP transport for Lex capabilitiesPins the matching Lex release
LexSonaBehavioral constraints derived from personas and reviewed rulesIntegrates through Lex storage contracts

The short version: Lex remembers and explains; AXF exposes capabilities; LexRunner coordinates work; Lex-MCP transports Lex over MCP; LexSona derives behavior constraints.

Agent and automation surfaces

Lex exposes the same core through several entry points:

  • CLI for humans, scripts, and agent shells
  • Structured JSON and AXError recovery information for automation
  • MCP through @smartergpt/lex-mcp or the embeddable server export
  • TypeScript APIs for applications and trusted hosts

Frame Schema v8 is the current canonical Frame contract. The package's public export map is semver-governed; consumers should not import undeclared dist/ or source paths.

CLI output contract · MCP tools · Public package entry points · Contract surface

Choose your next step

If you are…Read…
Deciding whether Lex fitsAgent Evaluation
Trying Lex for the first timeQuick Start
Designing agent handoffsAgent Continuity

| Connect

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx