Every memory in Engram passes through three distinct phases before it can influence an agent: capture, review, and recall. Capture turns raw information into a typed candidate. Review routes that candidate to either auto-append or human approval. Recall surfaces only trusted, fresh memories to agents that need them. Understanding this pipeline tells you exactly where a fact lives at any moment and what it takes to move it forward.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.
Lifecycle overview
The two entry points —remember() and harvest — both produce pending candidates. The bridge then inspects each candidate’s risk tier and routes it appropriately. Only promoted memories reach agents.
Phase 1 — Active capture (remember)
Active capture happens when an agent explicitly calls the remember tool during a session. You, or a tool you invoke, assert a fact directly.
- Validates the fact text and
kindagainst the schema. - Assigns a stable
id(e.g.mem-0042). - Writes the candidate to
queue/<id>.jsonwithstatus: pendingandlearned_by: remember. - Sets
confidencebased on the--confidenceflag (default0.5) or the kind’s baseline.
Active captures from
remember do not bypass review for curated kinds. A remember --kind fiscal call still lands in the review queue, not in memory.md, until you confirm it.Phase 2 — Passive harvest
Passive harvest extracts memories from conversation transcripts automatically, without any explicit agent call. The harness feeds a past session transcript through the extractor LLM, which identifies candidate facts and assigns kinds.- Chunks the transcript into context windows.
- Asks the extractor LLM to identify memorable facts and their kinds.
- Runs deduplication against existing promoted memories.
- Filters out trivia (ephemeral values, one-off calculations, pleasantries).
- Stages surviving candidates in
queue/withlearned_by: harvestand a lower baseline confidence.
Deduplication logic
Deduplication logic
Before staging a harvested candidate, Engram runs it through the dedup engine using token overlap and precision token matching (identifiers, dates, monetary amounts).The dedup result is one of:
duplicate— An identical or near-identical promoted memory already exists. The candidate is discarded silently.conflict— A promoted memory covers the same subject but with a different value (e.g., two different budget figures). The candidate is always escalated to tier 3 (curated/review), regardless of its kind’s normal tier. A conflict flag is attached so you can decide which version is correct.distinct— No overlap detected. The candidate proceeds through normal tier routing.
Phase 3 — Bridge routing (sync --apply)
The bridge is the step that moves candidates from queue/ into the active store. Run it after one or more captures:
- Re-computes the
risk_tierusing the kind and conflict flag. - Routes based on tier:
| Tier | Kinds | Action |
|---|---|---|
| 1 — Auto-append | preference, tooling, project, infra | Written directly to memory-log.md; frontmatter updated |
| 2 — Registry | (elevated tier-1 with minor metadata concerns) | Added to memory.md frontmatter; no queue dwell |
| 3 — Curated | identity, fiscal, people, constraint, location, health, any conflict | Stays in queue/; human review required |
- Sets
deston the memory record to indicate where it was written. - Appends an entry to
audit.jsonlwith a timestamp and undo token.
Phase 4 — Review queue
Tier-3 memories sit inqueue/<id>.json until you explicitly act on them. Use the review commands to work through the queue:
promote --confirm:
- The memory moves from
queue/toqueue/_done/. statusis set topromoted.last_verifiedis set to today’s date.- The frontmatter in
memory.mdis updated atomically; a.bak/snapshot is written first. - An audit entry is appended to
audit.jsonl.
reject:
statusis set torejected.- The record moves to
queue/_done/for traceability. - Nothing is written to
memory.md.
Rejected memories are not deleted — they remain in
queue/_done/ with their full audit trail. If you reject something by mistake, engram undo can reverse the last operation using the undo token from audit.jsonl.Phase 5 — Recall
Recall is the read side of the pipeline. Agents access memories through two channels: MCP resource — Engram exposesmemory://facts as an MCP resource. Any MCP-compatible agent (Claude, Cursor, Windsurf, etc.) can read the current set of promoted, fresh memories without any Engram-specific integration.
AGENTS.md injection — engram sync --apply regenerates the Markdown body in memory.md and can write a formatted block into your repo’s AGENTS.md (or CLAUDE.md / CURSOR.md) so agents receive memories as part of their system context.
- Memories with
status: rejectedorstatus: pending. - Memories where
is_stale(memory, today)istrue— i.e.,learned_at + decay < todayandlast_verifiedhas not reset the clock.
engram doctor --reverify.
Full status transition table
Full status transition table
| From | To | Trigger |
|---|---|---|
| (none) | pending | remember, harvest, or import |
pending | promoted | engram promote <id> --confirm or tier-1/2 auto-append |
pending | rejected | engram reject <id> |
promoted | stale | learned_at + decay < today (checked on every sync/recall) |
stale | promoted | engram promote <id> --confirm or doctor --reverify |
rejected | (terminal) | — |