Engram
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.
Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
npx -y @hbarefoot/[email protected]Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add io.github.hbarefoot-engram -- npx -y @hbarefoot/engram@1.6.3รันในเทอร์มินัล
{ "mcpServers": { "io.github.hbarefoot-engram": { "command": "npx", "args": [ "-y", "@hbarefoot/[email protected]" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
EngramPersistent 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.
Local-first persistent memory for AI agents — SQLite + local embeddings, MCP-native, no cloud.
⭐ Useful to you? Star it on GitHub — it's the simplest way to help others find Engram.
npm install -g @hbarefoot/engram
engram start
Your AI agent now has long-term memory. Two minutes, no setup, no cloud.
Engram runs inside your agent's process — no service to deploy, no account, nothing leaving your machine. That design choice is measurable:
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.
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:
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.)
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.
Sources: @sunriselabs/lodis, Sunrise-Labs-Dot-AI/engrams, mem0.ai, github.com/getzep/zep, github.com/letta-ai/letta. See docs/competitive-intel.md for the full breakdown. Engram ships optional, on-device LLM extraction (v1.9+): point llm.* at a local model — the recommended henrybarefoot1987/engram-extract (Qwen3-1.7B, Apache-2.0) or any Ollama / OpenAI-compatible endpoint — to sharpen category/entity extraction (entity recognition +50 pts vs rules — 45.8% → 95.8% — with engram-extract (qwen3:1.7b) in our benchmark), still 100% local and off by default (the zero-config path stays rule-based, offline, and infra-free). Mem0/Zep/Letta build LLM extraction in via a cloud model; Lodis is LLM-free read/write with a broader feature surface — we list it honestly.
TL;DR — when each one fits. Pick Engram if you want a focused, stable, local-first memory layer with practical guardrails (secret detection, agent auto-discovery, desktop app), a simple 5-category mental model, and optional on-device LLM extraction when you want it. Pick Lodis if you want a knowledge-graph-style memory with 14 entity types and temporal supersession. Pick Mem0/Zep/Letta if you want cloud-LLM extraction built in and don't mind operating infrastructure for it.
npm install -g @hbarefoot/engram
engram start # MCP + REST + Dashboard on localhost:3838
engram start --mcp-only # MCP server only, stdio mode (for agent integration)
Claude Code:
claude mcp add engram -- engram start --mcp-only
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"engram": {
"command": "engram",
"args": ["start", "--mcp-only"]
}
}
}
Cline / Cursor / Windsurf — add the same mcpServers block to your editor's MCP config. The built-in dashboard at http://localhost:3838 has an Integration Wizard that auto-detects your installed agents and generates the config for you.
You: "Remember that our API uses JWT tokens with 24-hour expiry."
Claude: (stores via engram_remember)
You: (next day) "What authentication approach are we using?"
Claude: (recalls via engram_recall) — "JWT tokens, 24-hour expiry."
Memories persist across sessions, machine restarts, and even between different AI clients sharing the same Engram instance.
Most memory systems are append-only stores: write once, retrieve forever, hope for the best. Engram learns.
engram_feedback) — when an agent recalls a memory, you or the agent can vote it helpful or unhelpful. Memories accumulate a score in [-1, 1]; consistently-unhelpful memories see their confidence decay automatically.The longer you use Engram, the sharper its recall gets.
Engram exposes 6 tools to AI agents over stdio:
Connecting the MCP server gives your agent the memory tools — but not the judgment to use them well. The bundled engram-memory skill is that judgment layer: it teaches an agent to recall at the start of a session, store durable decisions, corrections, and outcomes as they happen, and write results back at the end — without being told each time.
engram skill install # → ~/.claude/skills/engram-memory/
engram skill install --project # → ./.claude/skills/ (commit it for your team)
engram skill install --platform agents # → ~/.agents/skills/ (cross-framework)
Works in Claude Code, Claude Desktop, Cowork, or any framework that reads the Agent Skills spec (.agents/skills). The skill is vendored in the package, so it versions with Engram and updates land on the next engram skill install; engram skill uninstall removes it cleanly.
engram start # Start MCP + REST + dashboard
engram start --mcp-only # MCP server only (stdio mode)
engram start --port 3838 # Custom REST port
engram remember "<content>" # Store a memory (-c category -e entity -n namespace --confidence)
engram recall "<query>" # Search memories (-l limit -c category -n namespace --threshold)
engram forget <id> # Delete by ID
engram list # List memories (-l limit --offset -c category -n namespace)
engram status # Health check
engram consolidate # Deduplicate, detect contradictions, decay
# (--no-duplicates / --no-contradictions / --no-decay / --cleanup-stale)
engram conflicts # List unresolved contradictions
engram export-context # Export curated context block
# (-o file -f markdown|claude|txt|json -c categories --min-confidence ...)
engram import # Import from local sources
# (-s cursorrules|claude|package|git|ssh|shell|obsidian|env --dry-run)
engram skill install # Install the engram-memory agent skill
# (--project → ./.claude, --platform agents → ~/.agents)
engram skill uninstall # Remove the engram-memory skill
Run engram --help for the full flag list.
The REST API runs on http://localhost:3838 by default.
A built-in React dashboard at http://localhost:3838:
engram_remember runs content through secret detection, then embeds it locally using all-MiniLM-L6-v2 (~23 MB, CPU-only, downloaded once and cached at ~/.engram/models/). The embedding and metadata land in SQLite at ~/.engram/memory.db.engram_recall embeds the query, fetches candidates via FTS5 + in-namespace embeddings, and scores them as (similarity × 0.45) + (recency × 0.15) + (confidence × 0.15) + (access × 0.05) + (feedback × 0.10) + fts_boost. Top results are returned and their access stats updated.engram_feedback adjusts a memory's feedback_score and — after 5+ votes — bumps the confidence score up or down.Engram stores everything under ~/.engram/:
~/.engram/
├── memory.db # SQLite database (memories + embeddings + FTS5 index)
├── config.json # Server configuration
└── models/ # Cached embedding model
Defaults work out of the box. To customize:
{
"port": 3838,
"dataDir": "~/.engram",
"defaults": {
"namespace": "default",
"recallLimit": 5,
"confidenceThreshold": 0.3,
"tokenBudget": 500,
"maxRecallResults": 20
},
"embedding": {
"provider": "local",
"model": "Xenova/all-MiniLM-L6-v2"
},
"consolidation": {
"enabled": true,
"intervalHours": 24,
"duplicateThreshold": 0.92,
"decayEnabled": true
},
"security": {
"secretDetection": true,
"auditLog": false
}
}
The llm.* block powers the optional local AI enhancement below. It is off by default
(llm.provider: null); the zero-config path uses rule-based extraction and makes no LLM calls.
Engram works fully offline with zero AI dependencies. If you want a little more accuracy and already run a local model, you can optionally turn on "Layer 1" — and it stays 100% on your machine.
What it improves when enabled: sharper category/entity/confidence on new memories, and an
LLM confirmation step that reduces false-positive contradiction flags.
Recommended model: henrybarefoot1987/engram-extract. The layer's two jobs are classification, not
generation — so a small model with constrained decoding (the model is forced to emit valid JSON)
and thinking turned off is fast (sub-second), cool, and accurate. Pull it (or build it locally
from the Modelfile):
ollama pull henrybarefoot1987/engram-extract
# …or build from source:
ollama create henrybarefoot1987/engram-extract -f models/engram-extract.Modelfile
Then set the model to henrybarefoot1987/engram-extract. It's a recommendation, not a lock-in — any Ollama or
OpenAI-compatible model still works. See docs/llm/recommended-model.md
for the base model, licensing, and how to pick the smallest model that beats rules on your hardware.
Attribution.
henrybarefoot1987/engram-extractis built on Qwen3-1.7B (© Alibaba Cloud, Apache-2.0). Engram only adds the extraction prompt and the constrained-output configuration; the base model's weights, license, and notice are unchanged.
Enable it (desktop app): Preferences → AI Enhancement → toggle on, pick a model, Test
connection, Save. The same tab shows a live status badge, activity stats (enhanced
vs fallback extractions, contradictions filtered, average latency), and a recent-events list
so you can see the layer actually working. Programmatically, GET /api/llm/status and
GET /api/llm/stats expose the same data (all local — no telemetry).
Enable it (config file) — ~/.engram/config.json:
{
"llm": {
"provider": "ollama",
"endpoint": "http://localhost:11434",
"model": "llama3.2:3b",
"apiKey": null
}
}
First: ollama pull llama3.2:3b. Set "provider": null to turn it back off (the default).
For an OpenAI-compatible local server, use "provider": "openai-compatible" and point endpoint
at it (e.g. http://localhost:1234); apiKey is sent only if set.
Privacy note: "no memory data leaves your device" is only literally true when
endpointis local (localhost/127.0.0.1). If you point it at a non-local host, memory content is sent there for classification — the desktop AI Enhancement tab shows an explicit warning in that case. If the model is unreachable, a circuit breaker pauses the layer and Engram falls back to rule-based extraction with no added latency.
Redirect Engram's data directory to a throwaway location so it doesn't touch ~/.engram/memory.db. Useful for first-time evaluators, CI runs, or testing the desktop sidecar against a fresh DB:
# Via CLI flag (highest priority)
engram start --data-dir /tmp/engram-eval
# Or via env var
ENGRAM_DATA_DIR=/tmp/engram-eval engram start
# Works on every Engram command that touches the DB:
ENGRAM_DATA_DIR=/tmp/engram-eval engram remember "test memory" -c fact
ENGRAM_DATA_DIR=/tmp/engram-eval engram recall "test"
ENGRAM_DATA_DIR=/tmp/engram-eval engram status
Override priority: --data-dir flag > ENGRAM_DATA_DIR env var > dataDir in ~/.engram/config.json > default (~/.engram).
engram remember "Uses Next.js 14 app router" -n my-saas
engram remember "WordPress multisite + Redis" -n client-site
engram recall "what framework?" -n my-saas
Time-range filtering is available via MCP and REST. Agents pass a time_filter object to engram_recall:
{
"query": "deployment changes",
"time_filter": { "after": "last week" }
}
{
"query": "API decisions",
"time_filter": { "after": "2026-01-01", "before": "2026-06-01" }
}
Supported shapes: after / before (ISO date or relative string like "3 days ago"), or period shorthand (today, yesterday, this_week, last_week, this_month, last_month, this_year, last_year).
engram export-context -f markdown -n my-project -o PROJECT_CONTEXT.md
engram export-context -f claude -o CLAUDE.md
Engram also works as a library inside your Node.js app:
import {
loadConfig,
getDatabasePath,
getModelsPath,
initDatabase,
createMemory,
recallMemories
} from '@hbarefoot/engram';
const config = loadConfig();
const db = initDatabase(getDatabasePath(config));
createMemory(db, {
content: 'User prefers Fastify over Express',
category: 'preference',
confidence: 0.9
});
const results = await recallMemories(
db,
'preferred web framework',
{ limit: 5 },
getModelsPath(config)
);
See CONTRIBUTING.md for development setup, the versioning policy (npm + desktop bump together), and the release checklist. The project's licensing and sustainability stance is in BUSINESS_MODEL.md — short version: pure OSS, MIT forever, no paywalls.
git clone https://github.com/HBarefoot/engram.git
cd engram
npm install
npm run dev
If Engram is useful to you, here's how to help:
Using Engram? Tell me what's working and what isn't — open a Discussion, file feedback, or run engram feedback from the CLI. No telemetry, ever — Engram never phones home, so the only feedback I get is what you choose to send.
io.github.HBarefoot/engram.MIT © 2026 HBarefoot
Local-first persistent memory for AI agents — SQLite + local embeddings, MCP-native, no cloud.
{ "mcpServers": { "io.github.hbarefoot-engram": { "command": "npx", "args": [ "-y", "@hbarefoot/[email protected]" ] } }}เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Engram ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-11-09 Local-first persistent memory for AI agents — SQLite + local embeddings, MCP-native, no cloud.