Intelligent agent memory with automatic extraction, consolidation, and bi-temporal recall.
The intelligence layer for AI agents
Every AI agent is born smart but amnesiac. Engram fixes that. It doesn't just store memories -- it learns, consolidates patterns, detects contradictions, and surfaces context you didn't ask for.
npm install -g engram-sdk
engram init
That's it. Works with Claude Code, Cursor, or any MCP client. Also available as a REST API and TypeScript SDK.
Existing memory solutions are storage layers -- they save facts and retrieve them. Engram is an intelligence layer with three tiers:
| Tier | What it does | Who has it |
|---|---|---|
| Explicit Memory | Stores facts, preferences, conversation turns | Everyone |
| Implicit Memory | Detects behavioral patterns from how users work | Engram only |
| Synthesized Memory | Consolidation produces insights nobody asked for | Engram only |
Key insight: Engram invests intelligence at read time (when the query is known), not write time (when you don't know what'll matter). This is the fundamental architectural difference from Mem0, Zep, and LangMem.
Evaluated on LOCOMO -- the standard benchmark for agent memory systems. Same benchmark Mem0 used to claim state of the art.
| System | Accuracy | Tokens/Query |
|---|---|---|
| Engram | 80.0% | 1,504 |
| Full Context | 88.4% | 23,423 |
| Mem0 (published) | 66.9% | -- |
| MEMORY.md | 28.8% | -- |
10 conversations, 1,540 questions, 4 categories. 19.6% relative improvement over Mem0 with 93.6% fewer tokens than full context.
Full context (dumping entire conversation history) scores highest but uses 30x more tokens and can't scale past context window limits. Engram closes most of the gap while using 96.6% fewer tokens.
Full benchmark methodology and per-category breakdown
npm install -g engram-sdk
engram init
npm install -g engram-sdk
export GEMINI_API_KEY=your-key-here
npx engram-serve
Server starts on http://127.0.0.1:3800.
# Store a memory
curl -X POST http://localhost:3800/v1/memories \
-H "Content-Type: application/json" \
-d '{"content": "User prefers TypeScript over JavaScript", "type": "semantic"}'
# Recall relevant memories
curl "http://localhost:3800/v1/memories/recall?context=language+preferences&limit=5"
import { Vault } from 'engram-sdk';
const vault = new Vault({ owner: 'my-agent' });
await vault.remember('User prefers TypeScript');
const memories = await vault.recall('language preferences');
await vault.consolidate();
Full REST API and MCP tool documentation: engram.fyi/docs
| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY | Gemini API key for embeddings and consolidation | -- |
ENGRAM_LLM_BASE_URL | Custom API base URL (Groq, Cerebras, Ollama, etc.) | provider default |
ENGRAM_LLM_MODEL | LLM model name | provider default |
ENGRAM_DB_PATH | SQLite database path | ~/.engram/default.db |
PORT | Server port | 3800 |
ENGRAM_AUTH_TOKEN | Bearer token for API auth | -- |
This repo contains the evaluation scripts used to benchmark Engram:
eval-locomo.ts -- LOCOMO benchmark (the main result)eval-letta.ts -- Letta Context-Bench evaluationeval-codebase-v2.ts -- Enterprise codebase navigation benchmarkeval-enron.ts -- Email corpus evaluationSee EVAL.md for methodology and paper/engram-paper.md for the full research paper.
| Tier | Price | Memories | Agents |
|---|---|---|---|
| Free | $0 | 1,000 | 1 |
| Developer | $29/mo | 10,000 | 1 |
| Team | $99/mo | 50,000 | 5 |
| Business | $499/mo | Unlimited | Unlimited |
| Enterprise | Custom | Custom | Custom |
Hosted API coming soon. Self-hosting is free.
Engram is proprietary software. You may install and use it freely for internal purposes. See LICENSE for full terms.
For commercial licensing, contact tstockham96@gmail.com.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y engram-sdkMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-tstockham96-engram": {
"command": "npx",
"args": [
"-y",
"engram-sdk"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceengram-sdknpmio.github.tstockham96/engram works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.