Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/xantorres/engram/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through the core Engram workflow end to end: installing the tool, staging a low-risk fact and a sensitive one, running the sync bridge to promote or queue them, reviewing and approving the queued fact, recalling your memory registry, and finally wiring Engram into a coding agent so every new session starts with full context.
1
Install Engram
2
Engram is not yet on PyPI, so install it directly from GitHub. Pick whichever tool you already have:
3
uv
uv tool install git+https://github.com/xantorres/engram
pipx
pipx install git+https://github.com/xantorres/engram
4
Verify the install:
5
engram version
6
Python 3.11 or newer is required. Run python --version if you are unsure which version is active.
7
Stage Two Facts
8
Use engram remember to stage facts. Engram doesn’t write them to the registry immediately — they go into a staging area first so you can control what gets promoted.
9
Stage a low-risk tooling preference:
10
engram remember "I prefer pnpm over npm" --kind tooling
11
Now stage a sensitive fiscal fact:
12
engram remember "My VAT number is 12345678X" --kind fiscal
13
The tooling kind is tier 1 (auto-eligible). The fiscal kind is tier 3 and will always be held for human review regardless of any environment variable.
14
Run the Promotion Bridge
15
Set ENGRAM_AUTOPROMOTE=true to let tier-1 facts promote automatically, then run engram sync with --apply to execute (omitting --apply runs a dry-run):
16
export ENGRAM_AUTOPROMOTE=true
engram sync --apply
17
Expected output:
18
# append mem-0001 [tooling] I prefer pnpm over npm   (low-risk)
# queue  mem-0002 [fiscal]  My VAT number is ...     (fiscal needs review)
19
The tooling fact was appended to memory.md immediately. The fiscal fact was moved to queue/ and is waiting for your approval.
20
Skip export ENGRAM_AUTOPROMOTE=true if you prefer to review every fact manually before promotion, regardless of tier.
21
Inspect the Queue
22
List everything currently awaiting review:
23
engram queue
24
To read the full detail of a specific queued memory:
25
engram show mem-0002
26
You’ll see the raw JSON including the kind, confidence score, timestamp, and the original fact text — everything you need to make an informed decision.
27
Promote the Sensitive Fact
28
Once you’ve reviewed mem-0002 and are satisfied it’s correct, promote it with the required --confirm flag:
29
engram promote mem-0002 --confirm
30
The --confirm flag is mandatory for tier-3 kinds (fiscal, identity, people, constraint, location, health). Engram will refuse to promote without it as a guard against accidental approvals.
31
Recall Your Memories
32
Check the live registry to confirm both facts are now promoted:
33
engram recall
34
Filter by a search term to find specific memories:
35
engram recall pnpm
36
Use --limit to cap results in larger registries:
37
engram recall --limit 10
38
Wire Into a Coding Agent
39
Generate an MCP config snippet and append it directly to your agent’s config file. For Codex CLI:
40
engram init codex >> ~/.codex/config.toml
41
For Claude Code or OpenCode, substitute the harness name:
42
engram init claude-code
engram init opencode
43
Then generate a curated context block and write it to AGENTS.md so agents pick it up as static context even without MCP:
44
engram gen-context --write AGENTS.md
45
Start the MCP Server
46
Start the Engram MCP server over stdio so your agent can call recall, remember, and other tools live during a session:
47
engram serve
48
Your agent will now resolve the engram-mcp entry point and connect automatically based on the config snippet you added in the previous step.

Harvesting From Existing Sessions

If you have existing session transcripts (for example Codex JSONL logs), you can mine them for facts in bulk rather than entering each one manually:
engram harvest ~/.codex/sessions/2026/some-session.jsonl --harness codex
Expected output:
# harvested 3 facts (skipped dupe=2 trivial=1)
Harvested facts follow the same staging and promotion lifecycle as manually remembered ones.

What to Do Next

  • Run engram doctor to surface stale, low-confidence, unverified, or conflicting memories in your registry.
  • Use engram list --status pending to see everything still in staging.
  • Use engram forget <memory-id> to retract a promoted memory — Engram emits an undo token so the operation is reversible.
  • Read the Memory Model docs to understand kinds, tiers, confidence scores, and status transitions in depth.

Build docs developers (and LLMs) love