{
  "markdown": "# ![Engram](https://raw.githubusercontent.com/HBarefoot/engram/main/engram-logo.png) Engram\n\n**Persistent memory for AI agents. In-process. No infra.**\n\n> Give your AI agent the memory of a colleague who's worked with you for years — without cloud, API keys, or Docker.\n\n⭐ **Useful to you? [Star it on GitHub](https://github.com/HBarefoot/engram)** — it's the simplest way to help others find Engram.\n\n[![CI](https://img.shields.io/github/actions/workflow/status/HBarefoot/engram/ci.yml?branch=main&label=CI)](https://github.com/HBarefoot/engram/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@hbarefoot/engram)](https://www.npmjs.com/package/@hbarefoot/engram)\n[![Website](https://img.shields.io/badge/website-engram-6d7bff)](https://next.henrybarefoot.com/engram)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)\n[![MCP](https://img.shields.io/badge/MCP-compatible-blue)](https://modelcontextprotocol.io)\n[![engram MCP server](https://glama.ai/mcp/servers/HBarefoot/engram/badges/score.svg)](https://glama.ai/mcp/servers/HBarefoot/engram)\n\n```bash\nnpm install -g @hbarefoot/engram\nengram start\n```\n\n<p align=\"center\"><img src=\"https://raw.githubusercontent.com/HBarefoot/engram/main/docs/quickstart.gif\" alt=\"Engram quickstart demo: install, remember two facts, recall by meaning\" width=\"900\"></p>\n\nYour AI agent now has long-term memory. Two minutes, no setup, no cloud.\n\n- 🧠 **In-process** — runs inside your agent's stack. No separate server to deploy, no IPC overhead, nothing to fork.\n- 📴 **Offline** — local SQLite + bundled embeddings (~23 MB). No API keys, no data leaving your machine.\n- 🔌 **MCP-native** — first-class Model Context Protocol integration with Claude Desktop, Claude Code, Cursor, Windsurf, and Cline.\n- 🔐 **Safety by default** — automatic secret detection on every write. API keys, private keys, connection strings, JWTs blocked before they hit the database.\n\n---\n\n## Why local-first, in numbers\n\nEngram runs *inside* your agent's process — no service to deploy, no account, nothing leaving your machine. That design choice is measurable:\n\n| Metric | Engram | |\n|---|---|---|\n| Cold start → first recall | **under 200 ms** | import → first answer, model load included (M-series; hardware-dependent) |\n| Warm recall (p50, 1k memories) | **~4 ms** | median query latency once the model is in memory |\n| Package download | **~571 KB** | the npm package (1.3 MB unpacked) |\n| Embedding model | **~23 MB** | `all-MiniLM-L6-v2`, fetched once, cached at `~/.engram/models` |\n| External services | **0** | no database, broker, or cloud account |\n| Works offline | **✅** | zero network calls on the default path |\n\n<sub>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.</sub>\n\n**Optional accuracy lift — still 100% local.** If you already run a local model, the opt-in [LLM layer](#optional-local-ai-enhancement-ollama) 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.\n\n---\n\n## Support Engram\n\n<a id=\"support-engram\"></a>\n\n**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.\n\n[![Support Engram](https://polar.sh/embed/seeks-funding-shield.svg?org=barefoot-digital)](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH)\n\nIf Engram saves you time, you can sponsor it via [Polar](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH):\n\n| Tier | Price / month | For |\n|---|---|---|\n| 🌱 **[Supporter](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH)** | $5 | Individuals who want the project to keep shipping. |\n| ⚡ **[Power User](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH)** | $25 | Heavy users who rely on Engram day to day. |\n| 👥 **[Team](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH)** | $100 | Teams standardizing on Engram across projects. |\n| 🏢 **[Enterprise](https://buy.polar.sh/polar_cl_SJqyRrR9SLdBUQEtdUt0K5j7el8kKVC1eN0wT2S36rH)** | $499 | Priority response on issues + dedicated integration help. |\n\n**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.)\n\n---\n\n## Why Engram?\n\nMost 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.\n\n| | **Engram** | **Lodis** | **Mem0 / OpenMemory** | **Zep** | **Letta** |\n|---|---|---|---|---|---|\n| **Maturity** | v1.9.x, stable | v0.5.x, early | mature / SaaS | v0.x | v0.x |\n| **Infra to operate** | None (npm package) | None (npx package) | Cloud account *or* multi-container Docker | Docker + Postgres + Graphiti | Docker + Postgres |\n| **Install footprint** | ~23 MB | ~22 MB | Hundreds of MB containers (self-hosted) | Hundreds of MB | Hundreds of MB |\n| **Works offline** | ✅ | ✅ | ❌ Cloud / ✅ if self-hosted | ❌ External embed provider | ❌ External LLM provider |\n| **MCP-native** | ✅ Primary | ✅ Primary | 🟡 OpenMemory ships an MCP server | ❌ REST/SDK | ❌ REST/SDK |\n| **REST API alongside MCP** | ✅ | ❌ MCP-only | ✅ Cloud | ✅ | ✅ |\n| **Surface area** | 6 tools, 5 categories | 40 tools, 14 entity types + 4 permanence tiers + temporal supersession | varies | varies | varies |\n| **Automatic secret detection** | ✅ Blocks on every write | 🟡 `memory_scrub` opt-in tool | 🟡 Not first-class | 🟡 Not first-class | 🟡 Not first-class |\n| **Agent auto-discovery** | ✅ Dashboard Integration Wizard | ❌ Manual config | ❌ | ❌ | ❌ |\n| **Desktop app** | ✅ macOS Tauri menu bar | ❌ | ❌ | ❌ | ❌ |\n| **LLM-powered extraction** | ✅ Optional, on-device (Ollama; rule-based default) | ❌ LLM-free read/write | ✅ Built-in | ✅ Built-in | ✅ Built-in |\n| **Feedback / contradiction workflow** | ✅ Side-by-side conflict-resolution UI + feedback loop | 🟡 Programmatic correct/confirm/supersede tools | 🟡 No first-class feedback | 🟡 | 🟡 |\n\n*Sources: [@sunriselabs/lodis](https://www.npmjs.com/package/@sunriselabs/lodis), [Sunrise-Labs-Dot-AI/engrams](https://github.com/Sunrise-Labs-Dot-AI/engrams), [mem0.ai](https://mem0.ai/), [github.com/getzep/zep](https://github.com/getzep/zep), [github.com/letta-ai/letta](https://github.com/letta-ai/letta). See [`docs/competitive-intel.md`](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.*\n\n**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.\n\n---\n\n## Quickstart\n\n<a id=\"quickstart\"></a>\n\n### 1. Install\n\n```bash\nnpm install -g @hbarefoot/engram\n```\n\n### 2. Start the server\n\n```bash\nengram start             # MCP + REST + Dashboard on localhost:3838\nengram start --mcp-only  # MCP server only, stdio mode (for agent integration)\n```\n\n### 3. Connect your AI agent\n\n**Claude Code:**\n\n```bash\nclaude mcp add engram -- engram start --mcp-only\n```\n\n**Claude Desktop** — add to `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"engram\": {\n      \"command\": \"engram\",\n      \"args\": [\"start\", \"--mcp-only\"]\n    }\n  }\n}\n```\n\n**Cline / Cursor / Windsurf** — add the same `mcpServers` block to your editor's MCP config. The built-in dashboard at [http://localhost:3838](http://localhost:3838) has an **Integration Wizard** that auto-detects your installed agents and generates the config for you.\n\n### 4. Use it\n\n```\nYou:    \"Remember that our API uses JWT tokens with 24-hour expiry.\"\nClaude: (stores via engram_remember)\n\nYou:    (next day) \"What authentication approach are we using?\"\nClaude: (recalls via engram_recall) — \"JWT tokens, 24-hour expiry.\"\n```\n\nMemories persist across sessions, machine restarts, and even between different AI clients sharing the same Engram instance.\n\n---\n\n## Memory that improves over time\n\nMost memory systems are append-only stores: write once, retrieve forever, hope for the best. Engram learns.\n\n- **Feedback loop** (`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.\n- **Contradiction detection** — when two memories conflict (\"prefers Fastify\" vs \"switched to Express\"), the consolidation engine flags them. The dashboard's **Conflicts** tab shows them side-by-side with four resolution actions: keep A, keep B, keep both, or dismiss.\n- **Deduplication on insert** — identical memories (≥0.95 cosine similarity) are rejected. Near-duplicates (0.92–0.95) absorb the new content into the existing record. The store stays clean without manual pruning.\n- **Decay** — memories that aren't recalled lose confidence over time and stop polluting future results.\n\nThe longer you use Engram, the sharper its recall gets.\n\n---\n\n## MCP Tools\n\nEngram exposes 6 tools to AI agents over stdio:\n\n| Tool | Description |\n|---|---|\n| `engram_remember` | Store a memory with category, entity, confidence, namespace, tags. Auto-runs secret detection. |\n| `engram_recall` | Hybrid semantic + FTS5 search. Supports `category`, `namespace`, `threshold`, and `time_filter`. |\n| `engram_forget` | Delete a specific memory by ID. |\n| `engram_feedback` | Vote a memory helpful/unhelpful. Drives the feedback loop above. |\n| `engram_context` | Pre-formatted context block (`markdown` / `xml` / `json` / `plain`) with a token budget for system-prompt injection. |\n| `engram_status` | Health check: memory count, model status, configuration. |\n\n### Memory categories\n\n- **fact** — Objective truths about setup, architecture, or configuration.\n- **preference** — User likes, dislikes, style choices.\n- **pattern** — Recurring workflows and habits.\n- **decision** — Choices made and the reasoning behind them.\n- **outcome** — Results of actions taken.\n\n---\n\n## Teach your agent to use Engram\n\nConnecting 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.\n\n```bash\nengram skill install                     # → ~/.claude/skills/engram-memory/\nengram skill install --project           # → ./.claude/skills/  (commit it for your team)\nengram skill install --platform agents   # → ~/.agents/skills/  (cross-framework)\n```\n\nWorks in Claude Code, Claude Desktop, Cowork, or any framework that reads the [Agent Skills](https://github.com/anthropics/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.\n\n---\n\n## CLI Reference\n\n```bash\nengram start                       # Start MCP + REST + dashboard\nengram start --mcp-only            # MCP server only (stdio mode)\nengram start --port 3838           # Custom REST port\n\nengram remember \"<content>\"        # Store a memory   (-c category -e entity -n namespace --confidence)\nengram recall \"<query>\"            # Search memories  (-l limit -c category -n namespace --threshold)\nengram forget <id>                 # Delete by ID\nengram list                        # List memories    (-l limit --offset -c category -n namespace)\nengram status                      # Health check\n\nengram consolidate                 # Deduplicate, detect contradictions, decay\n                                   # (--no-duplicates / --no-contradictions / --no-decay / --cleanup-stale)\nengram conflicts                   # List unresolved contradictions\nengram export-context              # Export curated context block\n                                   # (-o file -f markdown|claude|txt|json -c categories --min-confidence ...)\nengram import                      # Import from local sources\n                                   # (-s cursorrules|claude|package|git|ssh|shell|obsidian|env --dry-run)\n\nengram skill install               # Install the engram-memory agent skill\n                                   # (--project → ./.claude, --platform agents → ~/.agents)\nengram skill uninstall             # Remove the engram-memory skill\n```\n\nRun `engram --help` for the full flag list.\n\n---\n\n## REST API\n\nThe REST API runs on `http://localhost:3838` by default.\n\n| Method | Endpoint | Description |\n|---|---|---|\n| GET | `/health` | Liveness check |\n| GET | `/api/status` | System status + stats |\n| GET | `/api/installation-info` | Detected agents, runtime, install location |\n| POST | `/api/memories` | Create a memory |\n| GET | `/api/memories` | List with pagination + filters |\n| POST | `/api/memories/search` | Semantic search |\n| GET | `/api/memories/:id` | Read a single memory |\n| DELETE | `/api/memories/:id` | Delete by ID |\n| POST | `/api/memories/bulk-delete` | Bulk-delete by ID list |\n| POST | `/api/consolidate` | Run consolidation pipeline |\n| GET | `/api/conflicts` | Legacy tag-based conflict view |\n| GET | `/api/contradictions` | Unresolved contradictions |\n| POST | `/api/contradictions/:id/resolve` | Resolve (keep_first / keep_second / keep_both / dismiss) |\n| GET | `/api/contradictions/count` | Unresolved count (for badge) |\n| GET | `/api/analytics/overview` | Memory health dashboard data |\n| GET | `/api/analytics/stale` | Memories with no recent recall |\n| GET | `/api/analytics/never-recalled` | Memories never returned by any query |\n| GET | `/api/analytics/duplicates` | Detected near-duplicates |\n| GET | `/api/analytics/trends` | Time-series creation/recall trends |\n| POST | `/api/export/static` | Export context block as a static file |\n| GET | `/api/import/sources` | List importable local sources |\n| POST | `/api/import/scan` | Two-phase import: preview extracted memories |\n| POST | `/api/import/commit` | Two-phase import: commit selected memories |\n\n---\n\n## Web Dashboard\n\nA built-in React dashboard at [http://localhost:3838](http://localhost:3838):\n\n- **Dashboard** — Memory stats, recent activity, health gauge.\n- **Memories** — Browse, filter, inline-edit, bulk-delete.\n- **Search** — Semantic search with score breakdown.\n- **Statistics** — Charts by category, namespace, and time.\n- **Health** — Stale, never-recalled, low-feedback memories with one-click cleanup.\n- **Conflicts** — Side-by-side contradiction resolution.\n- **Agents** — Integration wizard that auto-detects installed AI clients and writes their MCP configs (with timestamped backups).\n- **Import** — Wizard for cursorrules, .claude files, package.json, git config, SSH config, shell history, Obsidian, and .env.\n\n---\n\n## How it works\n\n1. **Store**: `engram_remember` runs content through secret detection, then embeds it locally using [all-MiniLM-L6-v2](https://huggingface.co/Xenova/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`.\n2. **Recall**: `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.\n3. **Deduplicate**: on insert, identical memories (≥0.95 similarity) are rejected; near-duplicates (0.92–0.95) absorb new content into the existing row.\n4. **Learn**: `engram_feedback` adjusts a memory's `feedback_score` and — after 5+ votes — bumps the confidence score up or down.\n5. **Protect**: every write passes through pattern-based secret detection (OpenAI/Stripe/AWS/GitHub/Slack/Google keys, private keys, connection strings, JWTs, high-entropy strings). Detected secrets either reject the memory or redact the secret portion.\n\n---\n\n## Configuration\n\nEngram stores everything under `~/.engram/`:\n\n```\n~/.engram/\n├── memory.db          # SQLite database (memories + embeddings + FTS5 index)\n├── config.json        # Server configuration\n└── models/            # Cached embedding model\n```\n\nDefaults work out of the box. To customize:\n\n```json\n{\n  \"port\": 3838,\n  \"dataDir\": \"~/.engram\",\n  \"defaults\": {\n    \"namespace\": \"default\",\n    \"recallLimit\": 5,\n    \"confidenceThreshold\": 0.3,\n    \"tokenBudget\": 500,\n    \"maxRecallResults\": 20\n  },\n  \"embedding\": {\n    \"provider\": \"local\",\n    \"model\": \"Xenova/all-MiniLM-L6-v2\"\n  },\n  \"consolidation\": {\n    \"enabled\": true,\n    \"intervalHours\": 24,\n    \"duplicateThreshold\": 0.92,\n    \"decayEnabled\": true\n  },\n  \"security\": {\n    \"secretDetection\": true,\n    \"auditLog\": false\n  }\n}\n```\n\nThe `llm.*` block powers the optional local AI enhancement below. It is **off by default**\n(`llm.provider: null`); the zero-config path uses rule-based extraction and makes no LLM calls.\n\n---\n\n## Optional: local AI enhancement (Ollama)\n\nEngram works fully offline with zero AI dependencies. If you want a little more accuracy and\nalready run a local model, you can **optionally** turn on \"Layer 1\" — and it stays 100% on your\nmachine.\n\n- **Free, opt-in, off by default.** Nothing changes unless you enable it.\n- **Local-first.** Uses your own [Ollama](https://ollama.com) (default) or any OpenAI-compatible\n  local server (LM Studio, llama.cpp). No cloud, no API key, no telemetry — **your memory content\n  never leaves your device.**\n- **Graceful.** Every call has a timeout and falls back to the built-in rule-based path if the\n  model is slow, unreachable, or returns junk. Engram never crashes because a model is down.\n\nWhat it improves when enabled: sharper `category`/`entity`/`confidence` on new memories, and an\nLLM confirmation step that reduces false-positive contradiction flags.\n\n**Recommended model: `henrybarefoot1987/engram-extract`.** The layer's two jobs are *classification*, not\ngeneration — so a small model with constrained decoding (the model is forced to emit valid JSON)\nand thinking turned off is fast (sub-second), cool, and accurate. Pull it (or build it locally\nfrom the Modelfile):\n\n```bash\nollama pull henrybarefoot1987/engram-extract\n# …or build from source:\nollama create henrybarefoot1987/engram-extract -f models/engram-extract.Modelfile\n```\n\nThen set the model to `henrybarefoot1987/engram-extract`. It's a recommendation, not a lock-in — **any** Ollama or\nOpenAI-compatible model still works. See [`docs/llm/recommended-model.md`](docs/llm/recommended-model.md)\nfor the base model, licensing, and how to pick the smallest model that beats rules on your hardware.\n\n> **Attribution.** `henrybarefoot1987/engram-extract` is built on **Qwen3-1.7B** (© Alibaba Cloud, Apache-2.0).\n> Engram only adds the extraction prompt and the constrained-output configuration; the base model's weights,\n> license, and notice are unchanged.\n\n**Enable it (desktop app):** Preferences → **AI Enhancement** → toggle on, pick a model, **Test\nconnection**, **Save**. The same tab shows a **live status badge**, **activity stats** (enhanced\nvs fallback extractions, contradictions filtered, average latency), and a **recent-events list**\nso you can see the layer actually working. Programmatically, `GET /api/llm/status` and\n`GET /api/llm/stats` expose the same data (all local — no telemetry).\n\n**Enable it (config file)** — `~/.engram/config.json`:\n\n```json\n{\n  \"llm\": {\n    \"provider\": \"ollama\",\n    \"endpoint\": \"http://localhost:11434\",\n    \"model\": \"llama3.2:3b\",\n    \"apiKey\": null\n  }\n}\n```\n\nFirst: `ollama pull llama3.2:3b`. Set `\"provider\": null` to turn it back off (the default).\nFor an OpenAI-compatible local server, use `\"provider\": \"openai-compatible\"` and point `endpoint`\nat it (e.g. `http://localhost:1234`); `apiKey` is sent only if set.\n\n> **Privacy note:** \"no memory data leaves your device\" is only literally true when `endpoint` is\n> **local** (localhost/127.0.0.1). If you point it at a non-local host, memory content is sent there\n> for classification — the desktop AI Enhancement tab shows an explicit warning in that case. If the\n> model is unreachable, a circuit breaker pauses the layer and Engram falls back to rule-based\n> extraction with no added latency.\n\n---\n\n## Advanced usage\n\n### Sandboxed evaluation\n\nRedirect 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:\n\n```bash\n# Via CLI flag (highest priority)\nengram start --data-dir /tmp/engram-eval\n\n# Or via env var\nENGRAM_DATA_DIR=/tmp/engram-eval engram start\n\n# Works on every Engram command that touches the DB:\nENGRAM_DATA_DIR=/tmp/engram-eval engram remember \"test memory\" -c fact\nENGRAM_DATA_DIR=/tmp/engram-eval engram recall \"test\"\nENGRAM_DATA_DIR=/tmp/engram-eval engram status\n```\n\nOverride priority: `--data-dir` flag > `ENGRAM_DATA_DIR` env var > `dataDir` in `~/.engram/config.json` > default (`~/.engram`).\n\n### Namespace isolation\n\n```bash\nengram remember \"Uses Next.js 14 app router\" -n my-saas\nengram remember \"WordPress multisite + Redis\" -n client-site\n\nengram recall \"what framework?\" -n my-saas\n```\n\n### Temporal queries\n\nTime-range filtering is available via MCP and REST. Agents pass a `time_filter` object to `engram_recall`:\n\n```json\n{\n  \"query\": \"deployment changes\",\n  \"time_filter\": { \"after\": \"last week\" }\n}\n```\n\n```json\n{\n  \"query\": \"API decisions\",\n  \"time_filter\": { \"after\": \"2026-01-01\", \"before\": \"2026-06-01\" }\n}\n```\n\nSupported 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`).\n\n### Export context for documentation\n\n```bash\nengram export-context -f markdown -n my-project -o PROJECT_CONTEXT.md\nengram export-context -f claude -o CLAUDE.md\n```\n\n---\n\n## Programmatic usage\n\nEngram also works as a library inside your Node.js app:\n\n```javascript\nimport {\n  loadConfig,\n  getDatabasePath,\n  getModelsPath,\n  initDatabase,\n  createMemory,\n  recallMemories\n} from '@hbarefoot/engram';\n\nconst config = loadConfig();\nconst db = initDatabase(getDatabasePath(config));\n\ncreateMemory(db, {\n  content: 'User prefers Fastify over Express',\n  category: 'preference',\n  confidence: 0.9\n});\n\nconst results = await recallMemories(\n  db,\n  'preferred web framework',\n  { limit: 5 },\n  getModelsPath(config)\n);\n```\n\n---\n\n## Contributing\n\nSee [CONTRIBUTING.md](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](BUSINESS_MODEL.md) — short version: pure OSS, MIT forever, no paywalls.\n\n```bash\ngit clone https://github.com/HBarefoot/engram.git\ncd engram\nnpm install\nnpm run dev\n```\n\nIf Engram is useful to you, here's how to help:\n\n- ⭐ **Star the repo** — the loudest signal that this is worth continuing.\n- 🐛 **Open an issue** — bug, feature request, or \"we use Engram at \\<company\\> for \\<thing\\>\" stories all welcome.\n- 💬 **Start a [discussion](https://github.com/HBarefoot/engram/discussions)** — design questions, integration ideas, \"how would I…\" — all good.\n- 💜 **[Support Engram](#support-engram)** — sponsor via Polar to fund continued development. No tier-locked features; sponsorship goes straight to keeping the project shipping.\n\n---\n\n## Feedback\n\nUsing Engram? Tell me what's working and what isn't — open a [Discussion](https://github.com/HBarefoot/engram/discussions), [file feedback](https://github.com/HBarefoot/engram/issues/new?template=feedback.yml), 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.\n\n---\n\n## Find Engram on Glama\n\nEngram is listed in the [Glama MCP directory](https://glama.ai/mcp/servers/HBarefoot/engram) and the [official MCP Registry](https://registry.modelcontextprotocol.io) as `io.github.HBarefoot/engram`.\n\n<p align=\"center\">\n  <a href=\"https://glama.ai/mcp/servers/HBarefoot/engram\">\n    <img src=\"https://glama.ai/mcp/servers/HBarefoot/engram/badges/card.svg\" alt=\"engram MCP server\" />\n  </a>\n</p>\n\n---\n\n## License\n\nMIT © 2026 [HBarefoot](https://github.com/HBarefoot)\n",
  "bytes": 26203,
  "sha": "301f320be09359089bdc77c92bdc913189571932d8c56af446b953e5281917e9",
  "repo_slug": "hbarefoot/engram",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_hbarefoot_engram_e128bc13/readme"
}