
Lex
Give long-running coding agents persistent episodic memory, workspace maps (Atlas), and architectural policy (Frames, Policy) across sessions.
Overview
Lex is a MCP server for the Build phase that provides episodic memory, workspace Atlas mapping, and architectural Policy for AI agents via Frames.
What is this MCP server?
- Episodic memory stored in a local SQLite database (default .smartergpt/lex/lex.db).
- Frames and Policy layers for architectural guardrails across agent turns.
- Atlas workspace mapping anchored by LEX_WORKSPACE_ROOT.
- npm package @smartergpt/lex-mcp v1.0.2 with stdio MCP transport.
- Optional LEX_DEBUG logging to stderr for integration troubleshooting.
- Version 1.0.2 (npm @smartergpt/lex-mcp)
- Default SQLite path .smartergpt/lex/lex.db under workspace root
- Documented env vars: LEX_WORKSPACE_ROOT, LEX_MEMORY_DB, LEX_DEBUG
What problem does it solve?
Agents forget prior decisions and drift from your architecture because every new chat starts with zero durable project memory.
Who is it for?
Solo builders running multi-session agent workflows on one codebase who want local SQLite memory and explicit architectural rules.
Skip if: Teams that need shared cloud knowledge bases with ACLs, or projects that only need a single-shot prompt with no continuity.
What do I get? / Deliverables
After you configure Lex, the agent can recall episodic frames and apply workspace policy so long-horizon coding stays aligned with how you actually build.
- Persistent episodic memory and Frames usable across agent sessions
- Workspace Atlas orientation and Policy hooks tied to your repo root
Recommended MCP Servers
Journey fit
Agent memory and policy land when you are building agent-native workflows; the same memory then supports ship, operate, and iterate work without re-explaining the repo. Frames, Atlas, and Policy are agent infrastructure—tooling that shapes how the model remembers and respects architecture, not a user-facing app feature.
How it compares
Local agent memory and policy MCP server, not a vector RAG SaaS or a generic note-taking skill.
Common Questions / FAQ
Who is Lex for?
Indie developers and agent-heavy builders who want persistent episodic memory and policy inside their MCP-enabled coding agent.
When should I use Lex?
Use it when a project spans many agent sessions and you need Frames, Atlas context, and Policy to prevent architectural drift.
How do I add Lex to my agent?
Install @smartergpt/lex-mcp, set LEX_WORKSPACE_ROOT (and optionally LEX_MEMORY_DB), register the stdio MCP server, then restart your agent client.