Skip to content
Agent Memory
MCP

engram

Ships with piia-engram: Local-first AI memory you can see, edit, and override — portable across Claude Code, Codex, Cursor, Windsurf, and other MCP coding tools.

From plugin
piia-engram
1661 skill1 MCP

Claude Code

$ claude mcp add engram -- uvx --from piia-engram python -m piia_engram.mcp_server

Security report

Found

Low risk

  • Known flaws

    None known

  • Signed build

    Yes

    Build provenance published

  • Maintained

    Nov 13, 2026

    Last push

  • Licence

    AGPL-3.0

  • Runs as

    uvx

    On your machine

  • Deprecated

    No

Signals from public registries, not an audit. Checked Nov 21, 2026.

piia-engram README

piia-engram — user-owned AI work identity layer

Piia Engram

Local-first AI work identity you can see, edit, and override — portable across your MCP coding tools.

Tell AI once who you are, how you work, and what "good" means. Claude Code, Codex, Cursor, Windsurf, and other MCP-compatible tools can start from the same AI work identity layer — local files you own, no cloud account, no hidden memory you cannot inspect.

Install · See It in Action · Supported Tools · MCP Tools · FAQ

ENGLISH | 中文

PyPI Downloads Python 3.10+ MCP Compatible License: AGPL v3 CI Guard strategic files

Listed in: Official MCP Registry awesome-mcp-servers Glama

Also listed in: awesome-agents · Awesome-MCP-ZH · mcpservers.org · Cursor Directory · ModelScope · PulseMCP


TL;DR: piia-engram is a local-first personal AI identity layer. It helps multiple coding agents start from the same understanding of you: your preferences, quality bar, lessons learned, decisions, and project context. It is not an agent memory database; it is the user-owned layer above your tools.

Why not just use native memory? Claude Code, Codex, Cursor, and Windsurf are adding their own memories and rules. Those are useful, but they are scoped to one tool or workspace. piia-engram gives you one portable identity layer above them: local files you own, AI-proposed knowledge you review, and context that can follow you across tools.

Trust model in four lines:

  • No cloud account: install with pip, keep the core store on your machine.
  • Local files: identity and knowledge live under ~/.engram/ as JSON/Markdown.
  • User approval: AI writes locally; high-risk items (credentials, shell commands, MCP config, permission rules) wait for your review, while low/medium writes are auto-absorbed but fully auditable and reversible. Set ENGRAM_APPROVAL=strict to gate every write. "Verified" means accepted by you or by that policy, not re-checked against your current code.
  • Session continuity: Resume output can also include earlier session records (checkpoints and snapshots) that are not reviewed and do not authorize actions. Approval and review claims apply to identity and long-term knowledge under the configured policy.
  • Documented boundaries: see Trust model, Privacy, and Security.

Want proof? See the live cross-tool continuity proof — a memory written by Claude Code, read back by Codex through one local store — or the one-command reproducible code demo.

See It in Action

You  → "Help me refactor this auth module"

# WITHOUT piia-engram: AI starts from scratch
AI   → "What language? What framework? What's your testing preference?"

# WITH piia-engram: AI can load your approved identity and long-term knowledge
AI   → "Based on your preference for pytest + 90% coverage, and your
        lesson about always separating auth middleware from business
        logic (from the March incident), here's my approach..."

And you never have to take that on faith — Memory Lens (engram preview --html) shows exactly what any AI caller would receive, and what governance withheld, before anything is sent:

Memory Lens — read-only preview of exactly what an AI caller receives: knowledge exposed vs withheld, redaction hits, and budget effects

Above: a real report from a demo store — 4 items exposed; an unreviewed staging note and a lesson containing a credential are withheld, with the secret shown as [REDACTED].


Install

pip install piia-engram && engram setup

The wizard auto-detects your AI tools — Claude Code, Cursor, Codex, Claude Desktop — lists the exact config files it will touch, and writes the MCP connection after a one-keystroke confirm (every write is backed up first; decline and nothing changes). It previews your identity card, then you restart your configured tool; the first conversation can load your approved identity and long-term knowledge through startup or search tools. (full walkthrough ↓)


Let your AI agent install it

Ask your coding agent to install Engram and inspect the plan before applying:

pip install piia-engram
engram setup --non-interactive --json
engram setup --non-interactive --apply
engram doctor --json

Setup asks no questions. Use --clients cursor,codex to limit clients and --lang zh|en for output language (default en). Without --apply, plan mode writes nothing to the Engram store, home directory or client configs. Python itself may use the system temporary directory. Apply configures MCP connections with backups, preserves existing tool modes, and never imports memories, writes identity/knowledge, or approves proposals. Restart configured clients; exit code 1 means a manual step remains. See llms.txt for agent instructions and the CLI and JSON contract for details.

Supported Tools

Evidence levels follow the agent client validation runbook: L0 = discovery, L1 = protocol access, L2 = read/search behavior, L3 = A/B behavior gain, L4 = cross-client continuity, L5 = reproducible public evidence.

ToolIntegrationEvidence status
Claude CodeMCP over stdioL4 partial continuity proof (Claude Code -> Codex)
CodexMCP over stdioL4 partial continuity proof (Claude Code -> Codex)
CursorMCP over stdioL2 setup/read-search evidence path
Claude DesktopMCP over stdioL1/L2 setup path; client-specific evidence pending
HermesMCP over stdioL4 controlled CLI marker continuity; desktop and broad benchmark claims unverified
OpenClawSOUL.md / MEMORY.md / USER.md import and exportL3 static file-bridge evidence (static snapshot A/B only; live agent behavior unverified)
ChatGPT / Gemini / KimiMarkdown identity card fallbackUsable
WindsurfMCP over stdioExpected to work
GitHub CopilotMCP over stdioExpected to work
ClineMCP over stdioExpected to work
Roo CodeMCP over stdioExpected to work
Amazon QMCP over stdioExpected to work
AugmentMCP over stdioExpected to work
ZedMCP over stdioExpected to work
TraeMCP over stdioExpected to work
Tencent CodeBuddyMCP over stdioExpected to work

By the numbers

These are current repository facts from docs/public-facts.json. Public registries and package badges update only during release/publish.

Current repo / development facts
Version framev4.27.0 (verified 2026-11-01; check PyPI and GitHub Releases for the latest published package)
Supported AI tools16 (evidence level varies by client; see Supported Tools and the validation runbook)
MCP tools19 Core (loaded by default) + 40 Advanced (opt-in via ENGRAM_TOOLS=all)
Knowledge types3 (lessons, decisions, playbooks)
Test suiteUnit + integration; run pytest tests/ to verify
Lines in core.py1770 (facade; domain logic now lives in focused mixins — see architecture.md)
PBKDF2 iterations600,000 (OWASP 2023+ floor; legacy 100k still decrypts)
EncryptionOptional field-level AES-256-GCM for supported profile fields; local files are plaintext JSON/Markdown by default
Cold-start time< 100 ms typical (local JSON, no network)
Network calls by defaultOne anonymous usage ping a day (engram telemetry off or DO_NOT_TRACK=1 turns it off); the engram command also checks PyPI for a newer version at most once a day in interactive terminals, and engram doctor checks on each run (ENGRAM_NO_UPDATE_CHECK=1 turns it off); identity and knowledge tools make none, except the optional read_web_content; remote telemetry and feedback require separate explicit opt-in and send counts only (see privacy details)

Your AI forgets you every time you switch tools or start a new chat. piia-engram fixes the handoff.

Every time you open a new chat window, switch from Claude Code to Codex, update your AI tool, or move into a different project, you're back to zero:

  • your communication preferences — gone
  • your code standards and quality bar — forgotten
  • which mistakes you've already learned from — lost
  • why you made that architecture decision last month — erased

This happens because AI memory today is locked inside each platform. It belongs to the tool, not to you. The tool updates, resets, or gets replaced — and your context disappears with it.

piia-engram gives you a personal identity layer that lives on your machine, independent of any AI tool. You tell it once who you are, how you work, and what you've learned. MCP-compatible tools can read the same approved identity and long-term knowledge. New chat, new tool, new version — your identity stays portable.

piia-engram is not an agent memory database. Tools like Mem0, Zep, and Letta store task context and session history for AI agents. piia-engram stores who you are as a person — your identity, preferences, hard-won lessons, and key decisions. It's a different layer: not what happened in a task, but who is behind every task.

Why piia-engram?

Without piia-engramWith piia-engram
New chat window = start from zeroConfigured conversations can load your approved identity and long-term knowledge
AI tool updates and your preferences vanishYour identity lives on your machine, survives any update
Switching tools loses accumulated contextClaude Code, Codex, and Cursor read the same memory
Past mistakes get repeatedLessons learned follow you across tools and sessions
Memory is locked inside one productData stays local, editable, and portable

Who Uses piia-engram

piia-engram is built for developers who use multiple AI coding tools and are tired of re-explaining themselves.

@patdolitse
Ships withpiia-engram
1661 skill1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
166
Star history of Patdolitse/piia-engram on GitHub, a chart by star-history.com

More MCP servers from other plugins.

cmem

cmem

MCP

Ships with claude-mem: Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions,…

@thedotmack@thedotmackInstall MCP
mempalace

mempalace

MCP

Ships with mempalace: Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.

@mempalace@mempalaceInstall MCP
mempalace

mempalace

MCP

Ships with mempalace: Local-first AI memory. Verbatim storage, pluggable backend, 96.6% R@5 raw on LongMemEval — zero API calls.

@milla-jovovich@milla-jovovichInstall MCP
ai-memory

ai-memory

MCP

Ships with ai-memory: Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent…

@akitaonrails@akitaonrailsInstall MCP

Questions about engram.

Which coding agents can use engram?
engram works in any agent that reads an MCP config file: Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf. Each agent reads it from its own file; this page names the file for each one.
How do I add engram to Claude Code?
Run this in your terminal: claude mcp add engram -- uvx --from piia-engram python -m piia_engram.mcp_server
Is engram safe to install?
Low risk. Signals from public registries, not an audit.