Engram
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Persistent memory for AI agents. In-process. No infra.**
> Give your AI agent the memory of a colleague who's worked with you for years — without cloud, API keys, or Docker.
⭐ **Useful to you? Star it on GitHub** — it's the simplest way to help others find Engram.
Your AI agent now has long-term memory. Two minutes, no setup, no cloud.
- 🧠 **In-process** — runs inside your agent's stack. No separate server to deploy, no IPC overhead, nothing to fork.
- 📴 **Offline** — local SQLite + bundled embeddings (~23 MB). No API keys, no data leaving your machine.
- 🔌 **MCP-native** — first-class Model Context Protocol integration with Claude Desktop, Claude Code, Cursor, Windsurf, and Cline.
- 🔐 **Safety by default** — automatic secret detection on every write. API keys, private keys, connection strings, JWTs blocked before they hit the database.
---
Why local-first, in numbers
Engram runs *inside* your agent's process — no service to deploy, no account, nothing leaving your machine. That design choice is measurable:
| Metric | Engram | |
|---|---|---|
| Cold start → first recall | **under 200 ms** | import → first answer, model load included (M-series; hardware-dependent) |
| Warm recall (p50, 1k memories) | **~4 ms** | median query latency once the model is in memory |
| Package download | **~571 KB** | the npm package (1.3 MB unpacked) |
| Embedding model | **~23 MB** | all-MiniLM-L6-v2, fetched once, cached at ~/.engram/models |
| External services | **0** | no database, broker, or cloud account |
| Works offline | **✅** | zero network calls on the default path |
Measured on an Apple M4 Pro over 1,000 seeded memories — reproduce with npm run bench. These are footprint and latency numbers, **not** an accuracy claim: Engram doesn't try to out-rank Mem0 or Zep on memory benchmarks. The point is solid recall with none of the operational surface.
**Optional accuracy lift — still 100% local.** If you already run a local model, the opt-in LLM layer sharpens fact extraction: entity-extraction accuracy climbs from 45.8% (rule-based) to 95.8% with the recommended henrybarefoot1987/engram-extract model (qwen3:1.7b) — **+50 pts** — without a single byte leaving your device.
---
Support Engram
**Engram is free and MIT-licensed — and always will be.** No paywalls, no tier-locked features, no telemetry. Every feature ships in the open-source package. Sponsorship is purely a way to fund continued development, not to unlock anything.
If Engram saves you time, you can sponsor it via Polar:
| Tier | Price / month | For |
|---|---|---|
| 🌱 **Supporter** | $5 | Individuals who want the project to keep shipping. |
| ⚡ **Power User** | $25 | Heavy users who rely on Engram day to day. |
| 👥 **Team** | $100 | Teams standardizing on Engram across projects. |
| 🏢 **Enterprise** | $499 | Priority response on issues + dedicated integration help. |
**About Enterprise.** Engram is MIT-licensed, so commercial use is *already* granted — you don't need to buy a license to use it at work. The Enterprise tier buys **priority response** on issues and **dedicated help wiring Engram into your stack**. For organizations whose policy precludes depending on MIT-licensed software, an optional commercial-license override is available on request. (Engram is maintained by a solo developer, so this is best-effort priority response, not a contractual SLA.)
---
Why Engram?
Most agent-memory products are services you run alongside your agent — Postgres, Docker, cloud accounts, API keys. Engram embeds *inside* your agent's process: a focused, stable npm package with practical guardrails.
| | **Engram** | **Lodis** | **Mem0 / OpenMemory** | **Zep** | **Letta** |
|---|---|---|---|---|---|
| **Maturity** | v1.9.x, stable | v0.5.x, early | mature / SaaS | v0.x | v0.x |
| **Infra to operate** | None (npm package) | None (npx package) | Cloud account *or* multi-container Docker | Docker + Postgres + Graphiti | Docker + Postgres |
| **Install footprint** | ~23 MB | ~22 MB | Hundreds of MB containers (self-hosted) | Hundreds of MB | Hundreds of MB |
| **Works offline** | ✅ | ✅ | ❌ Cloud / ✅ if self-hosted | ❌ External embed provider | ❌ External LLM provider |
| **MCP-native** | ✅ Primary | ✅ Primary | 🟡 OpenMemory ships an MCP server | ❌ REST/SDK | ❌ REST/SDK |