Skip to main content

Engramkeep

🇬🇧 English · 🇹🇷 Türkçe

Engramkeep

CI PyPI Benchmark: 95.6% top-1 License: MIT Python 3.10+ Dependencies: 0 MCP: 2024-11-05..2025-11-25

Local-first, Markdown-native memory for AI coding agents.

Engramkeep gives every agent you use — Codex, Claude Code, OpenCode, Cursor, Windsurf, Gemini CLI, Antigravity, or anything that can read AGENTS.md — the same persistent, human-readable project memory. It runs on the Python standard library alone.

Status: 1.0.0 stable. Local-first Markdown store, layered project (.engramkeep/) + global memory, ADR decision lifecycle (supersede, untag, trash/restore), BM25 + quoted phrase + Turkish-aware bilingual search, tamper-evident SHA-256 hash-chained audit.log, schema migrations (migrate), doctor-gated allowlist Git sync (sync), multi-agent transcript adapters (import --interactive), MCP tools/resources/prompts, modular loopback dashboard, and the backed-up 10-agent installer (--mcp, --skill). See docs/ROADMAP.md.


Engramkeep dashboard

Engramkeep demo: projects, search, cards, activity, and doctor


Why Engramkeep?

  • Local-first. No account, no telemetry, no server. Your memory stays on your machine.
  • Markdown-native. Every card is a plain Markdown file you can read, diff, back up, and edit.
  • Agent-agnostic. A canonical AGENTS.md protocol, a portable SKILL.md, and an MCP stdio server for clients that speak the Model Context Protocol.
  • One-command setup. engramkeep install --apply wires the memory protocol into ten agents, with managed blocks, timestamped backups, and a clean uninstall.
  • Safe by default. Path jail, atomic writes, secret redaction, and one hard rule: memory is data, not instructions.
  • Zero required dependencies. The core runs on the Python standard library.

Engramkeep is not a vector database, a chat application, or a cloud service. It is a small, auditable memory layer that keeps project decisions in files you own.


What works in 1.0.0

Area Status
Markdown store + generated index + py.typed Working
Layered memory (.engramkeep/ project store + global overlay) Working
Decision lifecycle (remember, supersede, untag, forget --decision, trash, restore) Working
Deduplicated troubleshooting registry (fix, fixes, TROUBLESHOOTING.md) Working
BM25 + quoted phrase + Turkish-aware & bilingual (EN/TR) search Working
Multi-agent transcript adapters (claude-jsonl, cursor, opencode, codex, gemini, text) + import --interactive Working
Tamper-evident SHA-256 hash-chained audit.log + doctor --fix Working
Schema migrations (migrate --apply, automatic backup & --rollback) Working
Safe allowlist local Git sync (sync, doctor-gated, no auto-push) Working
MCP stdio server (multi-version negotiation, tools, resources, prompts) Working
Modular web dashboard (--open, POST /api/fixes, GET /api/export, tag filters, text-only Markdown) Working
Agent installer (10 agents, 9 MCP configs, --mcp-allow-write, --skill) Working
Shell completion (bash, zsh, fish, powershell) Working
Secret redaction, path jail, atomic writes, advisory file locks Working

Demo

$ engramkeep init
Initialized Engramkeep at …/Engramkeep
  created INDEX.md, RECENT_ACTIVITY.md, audit.log, TROUBLESHOOTING.md, projects/, trash/

$ engramkeep remember api-gateway "Use SQLite for local storage" --tag database
Remembered in api-gateway: Api Gateway

$ engramkeep fix "Keystore signature mismatch on release build" \
      --solution "Enable v2 signing in gradle signingConfigs" \
      --project mobile-app
Recorded fix for mobile-app: Keystore signature mismatch on release build

$ engramkeep fixes mobil        # Turkish query, English entry
mobile-app (2026-11-09)
  workspace: General
  problem: Keystore signature mismatch on release build
  fix: Enable v2 signing in gradle signingConfigs

$ engramkeep search "database"
Api Gateway (api-gateway)
  tags: database
  ...Decisions - Use SQLite for local storage

A complete synthetic store lives in examples/demo-brain/. It is generated from checked-in JSON sources by python scripts/build_demo_brain.py; no real project data is included.


Quick start

pipx install engramkeep     # or: pip install engramkeep
engramkeep init
engramkeep remember example-project "Use SQLite for local storage" --tag database
engramkeep search sqlite
engramkeep show example-project

From a source checkout:

python -m venv .venv

# Windows
.venv\Scripts\activate

# macOS / Linux
source .venv/bin/activate

pip install -e ".[dev]"
engramkeep init

Without installing the package:

# Windows
set PYTHONPATH=src
python -m engramkeep init

# macOS / Linux
PYTHONPATH=src python -m engramkeep init

Try the demo store before touching your own memory:

engramkeep --home examples/demo-brain search "docker arm64"
engramkeep --home examples/demo-brain fixes "database is locked"
engramkeep --home examples/demo-brain dashboard

Install the memory protocol into your agents

The installer writes a small managed block into your agent instruction files. It is a dry run by default: nothing changes until you pass --apply.

engramkeep install --list                 # supported agents
engramkeep install --agent opencode       # show the plan (dry run)
engramkeep install --agent opencode --apply
engramkeep install --agent opencode --apply --mcp
engramkeep install --agent all --apply    # every supported agent
engramkeep install --agent opencode --uninstall

What it does:

Behavior Detail
Managed blocks Text is wrapped in <!-- engramkeep:begin --> … <!-- engramkeep:end -->; re-running updates only that block
Backups Every modified file is copied to <home>/backups/installer/<run>/ with a content hash, and the path is recorded in manifest.json
Scopes --scope auto (default; global when documented, otherwise project) or --scope project --project-dir PATH
MCP registration Opt-in with --mcp; automatic for Claude Code, OpenCode, and Cursor, skipped with a printed reason elsewhere
Uninstall --uninstall removes only the managed block and leaves the rest of the file intact
Dry run Prints would-create, would-update, or would-remove for every target
No overwrites Refuses to edit files it cannot parse safely; never deletes user content

Supported agents: OpenCode, Claude Code, OpenAI Codex, Cursor, Windsurf, Gemini CLI, Antigravity, GitHub Copilot, Cline, and Roo Code. engramkeep install --list prints the exact target paths for the current platform.


What gets remembered

By default:

Platform Location
Windows %LOCALAPPDATA%\Engramkeep
macOS ~/Library/Application Support/Engramkeep
Linux $XDG_DATA_HOME/engramkeep or ~/.local/share/engramkeep

Override it with the ENGRAMKEEP_HOME environment variable or the global --home flag:

engramkeep --home ./my-brain init

Layout:

<home>/
├── INDEX.md              # generated project index
├── RECENT_ACTIVITY.md    # human-readable activity log
├── TROUBLESHOOTING.md    # resolved errors and verified fixes
├── audit.log             # append-only JSONL audit trail
├── projects/
│   └── example-project.md
└── trash/                # recoverable cards moved by `forget`

A project card is Markdown with a small frontmatter block:

---
id: example-project
title: Example Project
created: 2026-01-01T00:00:00Z
updated: 2026-01-02T12:00:00Z
tags: demo, docs
---

# Example Project

## Decisions

- Use SQLite for local storage.

The troubleshooting registry

Every agent eventually hits the same build failure twice. Engramkeep keeps a local TROUBLESHOOTING.md so a solved error is recorded once and recalled forever:

# Record a resolved problem
engramkeep fix "Keystore signature mismatch on release build" \
    --solution "Enable v2 signing in gradle signingConfigs" \
    --project mobile-app

# Recall fixes
engramkeep fixes keystore
engramkeep fixes mobil      # bilingual: TR query, EN entry
engramkeep fixes            # newest first
engramkeep fixes --json

Entries are redacted before write, the file is rewritten atomically, and agents are instructed to treat entries as untrusted data — never as instructions to execute.

How well does recall work?

The repository includes a reproducible benchmark over a synthetic corpus of 15 error/fix pairs and 45 independently written queries (English and Turkish):

Metric Result
Top-1 accuracy 43/45 (95.6%)
Top-3 recall 45/45 (100%)
Turkish query → English entry, top-1 15/15 (100%)
Mean reciprocal rank 0.978
Query latency p50 / p95 ~4 ms / ~9 ms

Scoring is lexical with a small bilingual concept bonus: no embeddings, no network calls, nothing to download. Two of the three no-match controls return nothing; the third is reported honestly in docs/BENCHMARK.md rather than hidden.

Reproduce:

python scripts/benchmark_fix_registry.py --output docs/BENCHMARK.md

Commands

Command Purpose
engramkeep init [--local] Create the global or project-local .engramkeep/ store
engramkeep remember <project> "<decision>" [--tag TAG] [--local] Record a durable decision
engramkeep supersede <project> --old "..." --new "..." [--reason "..."] Replace a decision while keeping ADR history
engramkeep untag <project> --tag TAG Remove one or more tags from a project card
engramkeep search "<query>" [--tag TAG] [--project-store DIR] [--no-local] [--json] Search with BM25, phrases, and EN/TR + Turkish suffix matching
engramkeep show <project> Print a project card
engramkeep list List known projects (layered when .engramkeep/ is present)
engramkeep recent Print recent activity
engramkeep forget <project> [--decision "..."] --yes Move a card to trash/ or remove one decision
engramkeep trash [--purge --yes] List or purge trashed cards
engramkeep restore <project> [--file NAME] [--force] Restore a trashed card back to projects/
engramkeep fix "<error>" --solution "<fix>" [--project NAME] [--workspace PATH] [--local] Record a deduplicated resolved problem
engramkeep fixes [query] [--limit N] [--json] Search the troubleshooting registry
engramkeep import --file PATH [--format auto|claude-jsonl|cursor|opencode|codex|gemini|text] [--apply|--interactive] Preview or import redacted candidates from agent transcripts
engramkeep export [--output FILE] Export all cards and fixes as JSON
engramkeep reindex Regenerate INDEX.md
engramkeep doctor [--fix] [--json] Verify store health & SHA-256 audit chain, or safely repair
engramkeep migrate [--apply | --rollback DIR] Plan, apply, or roll back schema migrations & audit sealing
engramkeep sync [--init | --status | --commit [-m MSG]] Doctor-gated allowlist local Git sync (never auto-pushes)
engramkeep path [--local] Print the active memory directory
engramkeep completion <bash|zsh|fish|powershell> Print shell completion script
engramkeep install [--list] [--agent NAME] [--apply] [--uninstall] [--mcp] [--mcp-allow-write] [--skill] Plan or apply agent integration, MCP config, and SKILL.md
engramkeep mcp [--status] [--allow-write] Run the MCP stdio server (tools, resources, prompts)
engramkeep dashboard [--status] [--port PORT] [--allow-write] [--open] Run the local dashboard (optionally opening the browser)

Using Engramkeep with agents

Engramkeep is designed around two portable files:

  1. AGENTS.md — the cross-agent instruction format.
  2. SKILL.md — the portable skill format used by OpenCode, Claude Code, and compatible agents.

The repository ships:

engramkeep install --agent <name> --apply installs the managed instruction block (and optional MCP config with --mcp). Copy skills/engramkeep/SKILL.md or rule templates manually if you want the full skill file:

Agent Typical target
OpenCode ~/.config/opencode/AGENTS.md and ~/.config/opencode/skills/engramkeep/SKILL.md
Claude Code ~/.claude/CLAUDE.md and ~/.claude/skills/engramkeep/SKILL.md
Codex ~/.codex/AGENTS.md or a project AGENTS.md
Cursor .cursor/rules/engramkeep.mdc or AGENTS.md
Windsurf .windsurf/rules/engramkeep.md or AGENTS.md
Gemini CLI / Antigravity GEMINI.md or AGENTS.md
Any MCP client engramkeep mcp over stdio

MCP

Start the server with:

engramkeep mcp

It uses newline-delimited JSON-RPC 2.0 over stdio and protocol version 2025-11-25. A typical client configuration looks like:

{
  "mcpServers": {
    "engramkeep": {
      "command": "engramkeep",
      "args": ["mcp"]
    }
  }
}

The default tool set is read-only: engramkeep_search, engramkeep_show, engramkeep_list, engramkeep_recent, engramkeep_doctor, and engramkeep_fixes. To also expose the write tools engramkeep_remember and engramkeep_record_fix, start the server with --allow-write:

{
  "mcpServers": {
    "engramkeep": {
      "command": "engramkeep",
      "args": ["mcp", "--allow-write"]
    }
  }
}

There is no MCP forget tool. Use the CLI and confirm destructive actions explicitly. Run engramkeep mcp --status to print the transport, protocol version, and write mode.

Dashboard

Start the local dashboard with:

engramkeep dashboard

It binds to 127.0.0.1 and prints a URL with a per-session token in the fragment. The token is never embedded in the HTML; the browser keeps it in sessionStorage and sends it in the X-Engramkeep-Token header.

The dashboard is read-only by default. To enable the remember form, start it with:

engramkeep dashboard --allow-write

Writes are POST-only and require confirm: true. There is no forget button. Use --port 0 to pick a free port, and run engramkeep dashboard --status for machine-readable security details.


Comparison with alternatives: Why Engramkeep?

Different projects approach agent memory from different angles. Here is how Engramkeep compares to common patterns and alternatives:

Dimension Engramkeep basic-memory memsearch Mem0 Manual single-file rules (CLAUDE.md / AGENTS.md)
Storage format Plain Markdown files on local disk Local Markdown knowledge base + SQLite index Local Markdown + Milvus vector index Managed cloud or local vector/graph DB Static prompt / notes files
Runtime dependencies 0 (Python standard library only) Python + external packages (fastmcp, sqlalchemy, etc.) Embeddings + Milvus / vector libraries Cloud API keys or LLM + vector DB stack None (text editor)
Search mechanism Field-weighted BM25 + quoted phrases + Turkish suffix & EN/TR concept expansion SQLite FTS / knowledge-graph traversal Dense vector embeddings + hybrid search LLM extraction + vector/graph semantic recall Agent grep or full context stuffing
Audit & Versioning Native git diff, open in any editor Markdown files + local SQLite DB Markdown files + binary vector index Hosted dashboard or DB rows Full git diff
Security & Redaction Built-in secret scrubber ([REDACTED]) & path jail Local file permissions Local file permissions Cloud / application-level policy Manual diligence
Fix Registry Built-in cross-agent troubleshooting catalog (TROUBLESHOOTING.md) No dedicated fix registry No dedicated fix registry No dedicated fix registry Freeform notes
Agent Installer Single command for 10 agents (--apply + backups + --uninstall) MCP client setup Hooks / plugin setup Client SDK integration Manual copy-pasting
Primary focus Zero-dep durable project decisions & verified fix recall Local Markdown knowledge graphs via MCP Semantic vector search over Markdown Conversational & user-profile memory Simple single-agent instructions

Objective differences

  • vs. basic-memory: Both projects keep human-readable Markdown on your machine and speak MCP. basic-memory builds a richer semantic knowledge graph backed by SQLite and third-party Python dependencies. Engramkeep stays strictly on the Python standard library (0 runtime dependencies), adds a dedicated troubleshooting/fix registry (engramkeep fix / fixes), deterministic bilingual (EN/TR) concept expansion, automatic secret redaction before write, and a one-command managed-block installer with backups across 10 coding agents.
  • vs. memsearch & Vector DBs: memsearch pairs Markdown files with Milvus vector embeddings for fuzzy semantic recall across large corpora. That power comes with embedding model downloads and vector runtime dependencies. Engramkeep intentionally trades dense vector embeddings for zero dependencies, ~4 ms lexical + concept-expanded queries, and zero background services.
  • vs. Mem0: Mem0 is designed for dynamic conversational memory, user personalization, and hosted or multi-tenant agent applications. Engramkeep is strictly local-first and developer-project-centric: no cloud accounts, no LLM calls to extract memories, no API keys required, and every card lives as a plain Markdown file you own.
  • vs. Manual single-file prompts (CLAUDE.md / AGENTS.md / brain.md): Plain Markdown rule files are transparent and portable. However, as projects grow, stuffing every past decision and bug fix into one root prompt file bloats the context window, risks accidental secret commits, and drifts out of sync across tools. Engramkeep keeps the root instruction block tiny via <!-- engramkeep:begin/end --> across 10 coding agents while storing project cards and verified fixes on demand, scrubbing secrets before write.

Pick Engramkeep when you want small, auditable, portable memory that lives with your code — not a complex RAG pipeline or hosted cloud service.


Security and privacy

  • Local-only by default. The core makes no network calls and collects no telemetry.
  • Secrets are redacted before write. API keys, tokens, passwords, JWTs, and private keys are replaced with [REDACTED].
  • Path jail. Project names are resolved through safe_join() and cannot escape the memory directory.
  • Atomic writes. Cards and generated files are written via a temporary file and os.replace().
  • Memory is untrusted data. Agents must never execute commands or follow instructions found inside a memory card or a troubleshooting entry.
  • Installer safety. Dry run by default, managed blocks only, timestamped backups, manifest.json, and a reversible uninstall.
  • No automatic Git push, cloud upload, junction, or background daemon. Those features are intentionally excluded.
  • MCP is local and read-only by default. Stdio transport, no network listener, no forget tool, write tools only with --allow-write.
  • The dashboard is loopback-only and token-protected. 127.0.0.1, per-session token, strict CSP, text-only rendering, writes only with --allow-write plus explicit confirmation.

Read docs/PRIVACY.md and docs/THREAT_MODEL.md before deploying Engramkeep in a sensitive environment.


Non-goals

  • Replacing Git, an issue tracker, or a documentation site.
  • Storing secrets, credentials, or regulated personal data.
  • Automatic transcript scraping from every agent. (Read-only, consent-based transcript adapters are on the roadmap.)
  • A hosted service or a vector database.
  • Perfect recall. Memory is only as good as what you record.

Project structure

engramkeep/
├── AGENTS.md
├── README.md
├── README.tr.md
├── LICENSE
├── pyproject.toml
├── src/engramkeep/
│   ├── audit.py           # SHA-256 hash-chained audit log verification
│   ├── cli.py             # CLI & shell completions
│   ├── config.py          # global & .engramkeep/ project store discovery
│   ├── concepts.py        # Turkish-safe folding & EN/TR concept expansion
│   ├── importer.py        # consent-based & interactive transcript import
│   ├── installer.py       # managed-block, MCP, and SKILL.md installer
│   ├── mcp_server.py      # MCP stdio server (tools, resources, prompts)
│   ├── migrations.py      # schema migration & rollback framework
│   ├── models.py          # cards, frontmatter, ADR supersede/untag
│   ├── paths.py           # path jail, atomic writes, file locks
│   ├── py.typed           # PEP 561 type marker
│   ├── redact.py          # secret & PII redaction
│   ├── search.py          # BM25, phrase, and Turkish-aware search
│   ├── store.py           # store, trash/restore, doctor --fix, LayeredStore
│   ├── sync.py            # doctor-gated allowlist local Git sync
│   ├── troubleshoot.py    # deduplicated troubleshooting registry
│   ├── adapters/          # claude-jsonl, cursor, opencode, codex, gemini, text
│   ├── dashboard.py       # hardened local dashboard server
│   ├── dashboard_assets/  # modular index.html, app.js, style.css, logo.svg
│   └── data/              # bundled SKILL.md
├── assets/                # logo.svg, logo-dark.svg, logo-*.png, social-preview.png, dashboard.png, demo.gif
├── examples/
│   ├── brain/             # minimal valid store
│   ├── demo-brain/        # generated synthetic store
│   ├── demo-cards.json
│   └── fix-registry/      # benchmark corpus
├── scripts/
│   ├── build_demo_brain.py
│   ├── benchmark_fix_registry.py
│   └── check_repo_hygiene.py
├── skills/engramkeep/SKILL.md
├── templates/
├── tests/                 # comprehensive unit, CLI, MCP, dashboard, sync & migration tests
├── docs/
└── .github/

Contributing

Contributions are welcome. Start with CONTRIBUTING.md, follow the Code of Conduct, and report security issues through SECURITY.md. Good first tasks are listed in docs/GOOD_FIRST_ISSUES.md.

License

MIT. See LICENSE.

Engramkeep is not affiliated with Google, Anthropic, OpenAI, Anysphere, Cognition, or any other agent vendor. See TRADEMARKS.md.

Metadata

Release files for engramkeep 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for engramkeep 1.0.0
File Size Uploaded Provenance Actions
engramkeep-1.0.0.tar.gz 578.8 kB With provenance Details for engramkeep-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for engramkeep 1.0.0
File Interpreter ABI Platform Actions
engramkeep-1.0.0-py3-none-any.whl Python 3 none any Details for engramkeep-1.0.0-py3-none-any.whl

Total release size: 678.0 kB

Release files / engramkeep-1.0.0.tar.gz

Download URL engramkeep-1.0.0.tar.gz
Size 578.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5333f96dfcfb0e1e40ace621fd9005b9fec2e98335b9a7622ae5bf16bab264ba
BLAKE2b-256 checksum
How to use checksums
a37ed87e4fad3d168011dc8ace963db9eaa21b426c20c0063b56f8b6158ad1df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / engramkeep-1.0.0-py3-none-any.whl

Download URL engramkeep-1.0.0-py3-none-any.whl
Size 99.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92f8a09032dcb5f69c583ef5584416a3d247dc9919e12932435e93157d8773ef
BLAKE2b-256 checksum
How to use checksums
fe49fc8adb176e28f555446b4574533691f6987ad2630416484e283d77806745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for engramkeep 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for engramkeep-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page