Lex stores deliberate checkpoints called Frames. A useful Frame captures the decision, current state, blocker, next action, and repository module scope that another session would otherwise have to reconstruct.
Lex remembers the work, not the conversation. It does not record screens, keystrokes, terminal history, or complete agent transcripts.
No. A Frame is written only when a user, agent, application, or MCP client explicitly calls a
write operation such as lex remember or frame_create.
lex remember \
--summary "Kept token validation in API middleware" \
--next "Add password-reset coverage" \
--modules unscopedDo not create a Frame when there is nothing worth handing off. High-signal continuity is more useful than exhaustive activity history.
SQLite is the default. Its default path is .smartergpt/lex/memory.db relative to the active
workspace. Set an absolute LEX_DB_PATH when several local launch configurations should use the
same file.
PostgreSQL is available for explicit shared storage. A trusted multi-tenant or multi-workspace host must additionally use Lex 3 runtime authority, scope-bound stores, and PostgreSQL row-level security. Selecting PostgreSQL with environment variables alone is a compatibility configuration, not a tenant authorization boundary.
See Store Contracts.
Lex has no Lex-operated cloud memory service and does not sync SQLite files by default. The CLI and stdio MCP transport do not need a listening network port.
Your package registry, MCP client, PostgreSQL deployment, agent host, or other surrounding tools may have their own network behavior. Evaluate those systems separately.
Do not synchronize or concurrently mount a live SQLite database as a substitute for a shared
service. Use PostgreSQL when trusted hosts or workspaces need coordinated access. For backup or
migration, use lex db backup or lex frames export rather than copying a database while it may
have an active journal or WAL.
Frame bodies are user-controlled historical data. Treat them as untrusted context, not executable
instructions. lex context produces a bounded bootstrap and labels the history boundary, but the
consumer still needs to verify important claims against current code, tests, issue state, and
explicit human direction.
Never store credentials, tokens, private keys, or other secrets in Frames.
lex recall retrieves Frames for a person or program to inspect. It supports compact summaries,
listing, and optional Policy Neighborhood controls.
lex context is the bounded session-bootstrap surface. It selects a small set of relevant Frames,
reports provenance and warnings, and enforces an approximate output budget. It uses hard read-only
store access and will not create or migrate the selected database.
lex recall "authentication" --summary
lex context "authentication" --max-tokens 800Module attribution prevents durable work context from becoming detached from the repository it describes. Choose one strategy:
--modules services/auth,api/middlewarefor exact policy IDs;--modules autofor bounded inference in a policy-backed repository;--modules unscopedwhen no useful module ontology exists.
unscoped is explicit and valid. You do not need to adopt repository policy before trying Lex.
Policy maps stable module IDs to owned paths and allowed or forbidden relationships. Lex can use that vocabulary for Frame attribution, Policy Neighborhoods, and static boundary checks.
Policy is optional and is not an access-control system. See the Repository Policy Guide.
Lex now distinguishes three systems that historically shared the Atlas name:
- Policy Neighborhood turns policy relationships into bounded nearby-module context for a recalled Frame. Core recall still works when policy is unavailable.
- Code Index is experimental source/symbol extraction and provenance.
- Frame Graph derives relationships among historical Frames and has no first-party production caller today.
See the terminology and compatibility map and the Policy Neighborhood and Code Index guide.
No. The CLI, structured output, TypeScript exports, and MCP server are alternative entry points to the same core. Use MCP when your agent client benefits from typed, discoverable tools. Use the CLI when a shell command is the simpler integration.
See Lex MCP.
Yes. Give your agent the Agent Evaluation rubric. That review is expressly read-only and asks for evidence, overlap, risks, and the smallest reversible pilot.
When you are ready to exercise the actual workflow, the Quick Start describes the exact write surface and rollback.
It validates and previews a Frame without storing it. The SQLite compatibility path may still
open the selected database, which can create an empty database file. Use an isolated absolute
LEX_DB_PATH and LEX_STORE=sqlite when filesystem isolation matters.
For a SQLite database backup:
lex db backupFor a portable Frame export:
lex frames export --out ./lex-frames
lex frames import --helpCheck command help before automation because export and maintenance operations have explicit overwrite, recovery, and storage semantics.
Yes. Lex uses SQLCipher-compatible SQLite support and reads the passphrase from LEX_DB_KEY.
lex db encrypt --input path/to/memory.db --output path/to/encrypted.db --verifyThe automatic pre-encryption recovery backup contains the original plaintext database. Protect or
remove it according to your retention policy after verification. Hard read-only lex context
cannot currently deserialize encrypted SQLite snapshots; see Limitations.
For backward compatibility, several SQLite CLI paths still acquire a writable store even when the
operation itself is conceptually a read. Use lex context for a hard read-only session bootstrap.
lex db repair is also read-only unless --write is explicit.
The exact access-mode contract is documented in Store Contracts.
lex introspect --json
lex db stats --helpIntrospection reports the active workspace, store identity, policy state, capabilities, and warnings. Diagnostic output may reveal local paths and repository identifiers, so review it before sharing publicly.
Yes, but install native dependencies separately on each operating-system surface and do not share
node_modules between Windows and WSL. WSL should resolve a Linux-native lex, not a Windows npm
shim or an ephemeral _npx cache. See WSL Native Installation.
- First pilot: Quick Start
- Agent handoffs: Agent Continuity
- Security and trust: Security Policy
- Storage behavior: Store Contracts
- Trusted hosting: Runtime Scope Contract
- Exact package entry points: Public Package API