I built Engram because my AI coding agent (Claude Code) has no memory between sessions. Every new session starts from zero. I kept re-explaining the same project context, decisions, and preferences.
Engram is a persistent memory system designed for AI agents. It runs as an MCP server alongside Claude Code, Cursor, or any MCP-compatible client. One command to set up:
``` npm install -g engram-sdk engram init ```
After that, your agent remembers things across sessions. It stores facts, decisions, preferences, and corrections, then recalls the right ones when they're relevant.
What makes it different from a vector database or a flat MEMORY.md file:
- *Consolidation.* Raw conversation episodes get distilled into structured knowledge automatically, the same way human memory works (episodic to semantic). - *Contradiction detection.* When a new fact conflicts with an old one, Engram detects it and supersedes the old memory. No stale data. - *Spreading activation.* Recall doesn't just do vector search. It walks the memory graph through entity and topic connections, surfacing related context you didn't explicitly ask for. - *ask() over raw recall.* Instead of returning a list of memory objects, `vault.ask()` synthesizes an answer with confidence signals. The agent gets a direct answer, not a pile of results to interpret. - *checkpoint().* Before context compaction or session end, the agent saves its working memory to the vault. The context window is the most accurate source of truth and the most volatile. Checkpoint preserves it.
On the LOCOMO benchmark (long-conversation memory, from Snap Research): Engram scores 84.5% on 9/10 conversations vs Mem0's published 66.9%, using 30x fewer tokens than full-context injection. A full 10/10 re-eval is running now.
The whole thing is TypeScript, zero external dependencies for the core, SQLite + sqlite-vec for storage and vector search. AGPL-3.0 licensed.
GitHub: https://github.com/tstockham96/engram Site: https://engram.fyi npm: https://www.npmjs.com/package/engram-sdk