Piia Engram: portable memory for AI agents

Piia Engram

Local memory about you and your projects: Claude Code, Codex and Cursor read the same preferences and lessons from your disk

  • 165 ★ on the repository
  • Last commit
  • AGPL-3.0
MCP server

Extended access

Why this level

  • The agent writes to local memory files and reads them in every session; risky items wait for approval, the rest are accepted automatically
  • An anonymous usage count goes out once a day unless you turn it off
All reasons and checks

patdolitse/piia-engram

Install

Manual install

pip install piia-engram && engram setup

The wizard finds clients and writes the MCP entry after you confirm.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The agent writes to local memory files and reads them in every session; risky items wait for approval, the rest are accepted automatically
  • An anonymous usage count goes out once a day unless you turn it off

This is third-party code. Review the repository files before installing.

What it does

Piia Engram keeps, under your control, what agents usually forget when you switch chats or tools: your working style, quality bar, lessons learned, decisions made and project context. The data sits in ~/.engram/ as JSON and Markdown, and no cloud account is needed. Over MCP on stdio, the same memory connects to Claude Code, Codex, Cursor, Claude Desktop and several other clients. Knowledge comes in three kinds: lessons, decisions and playbooks. The agent records new items itself, but risky ones (credentials, shell commands, MCP settings, permission rules) wait for your approval. The `engram preview --html` command builds Memory Lens, a report of what an agent will receive and what policy withholds. Setting `ENGRAM_APPROVAL=strict` puts every write under review. By default 19 core MCP tools load, and another 40 switch on with `ENGRAM_TOOLS=all`. For ChatGPT, Gemini and Kimi the wizard produces a Markdown identity card, and for OpenClaw it imports and exports the SOUL.md, MEMORY.md and USER.md files.

Who it is for. Developers who switch between Claude Code, Codex and Cursor and are tired of re-explaining code standards and past decisions.

Good fit when

  • You open your tenth chat of the week, and each time the agent asks about language, framework and testing approach
  • An architecture decision was made in Claude Code, but you will continue in Codex
  • A tool update wiped its built-in memory, and you want to keep the rules you built up
  • You want to see in advance what context an agent will receive before it goes into a request

Not a fit when

  • You need memory of a single task run: session history and agent steps fit better in an agent-memory database such as Mem0 or Letta. Engram describes a person, not a task
  • License terms matter: the code is AGPL-3.0, so embedding it in a closed product without releasing source is not allowed
  • You need shared team memory on a server: the store is local and belongs to one user

Example request

Remember that I prefer pytest with 90 percent coverage, and show what Codex will see from my memory in this project.

MCP

Transport
stdio
Authentication
not required

Environment variables

ENGRAM_APPROVAL
The value strict gates every write on your approval.
ENGRAM_TOOLS
The value all enables 40 extra tools.

Limitations

Python 3.10 or newer. Memory files are stored in plain form (JSON and Markdown), and AES-256-GCM encryption of profile fields is a separate opt-in. An anonymous usage count goes out once a day; turn it off with `engram telemetry off` or `DO_NOT_TRACK=1`, and switch off the PyPI version check with `ENGRAM_NO_UPDATE_CHECK=1`.

Session records (checkpoints and snapshots) are not reviewed and do not authorize actions. "Verified" means accepted by you or by policy, not rechecked against your current code. Only the optional read_web_content tool makes a network request. Windsurf, Copilot, Cline and several other clients are marked "expected to work" in the README.

How to disable. Remove the server entry from the client config, then delete ~/.engram/ if you want the data gone too. The `engram setup` wizard backs up client configs before every edit.

FAQ

How does Piia Engram differ from the built-in memory in Claude Code or Cursor?

Built-in memory is tied to one tool or workspace, while Engram keeps the files with you and serves them to different clients over MCP. A memory written in Claude Code is read back in Codex through the same store, and the repository includes a reproducible demo of that handoff.

How do I install Piia Engram?

Run `pip install piia-engram && engram setup`. The wizard detects Claude Code, Cursor, Codex and Claude Desktop, lists the files it will touch and writes the MCP connection after you confirm. Then restart the client.

Can the agent write anything it likes to memory?

Low and medium risk items are saved straight away, but they are logged and can be rolled back. Credentials, shell commands, MCP settings and permission rules wait for your decision. Strict mode is switched on with `ENGRAM_APPROVAL=strict`.

Do I need a cloud account?

No. The core store runs on your machine, installs through pip and keeps data in ~/.engram/. The memory tools make no network requests, except the optional read_web_content.

Which clients does Piia Engram work with?

Claude Code, Codex, Cursor and Claude Desktop connect over MCP on stdio and were checked most deeply. For Windsurf, Copilot, Cline, Roo Code, Zed and others the README says "expected to work". OpenClaw gets SOUL.md, MEMORY.md and USER.md files, and ChatGPT and Gemini take the Markdown identity card.

Discussion

No questions or reviews yet.

Engram by Gentleman Programming

Engram (Gentleman Programming)

Persistent memory for AI coding agents in a single Go binary: an MCP server on SQLite with full-text search that remembers your project across sessions

MCP serverExtended access8KRepository stars

Memory for AI agents with three types: facts, events and procedures that learn from failures; cloud by key or a local folder

MCP serverExtended access207Repository stars

Shared long-term agent memory: notes in plain markdown files, with a MEMORY.md index loaded at the start of every session.

SkillExtended access204Repository stars

Encrypted offline memory for AI agents: one vault on your own computer shared by Claude Code, Cursor, Codex and other clients

MCP serverBroad access569Repository stars
Official

Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools

MCP serverExtended access30.3KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Piia Engram: portable memory for AI agents (this card)nonot required165
agentmemoryyesnot required30,314a memory store for agent tasks and sessions rather than a profile of the person
MCP Memory Servicenonot required2,117shared memory over MCP with a server component

README in short

The README frames Piia Engram as an identity layer above tools rather than an agent memory database. It includes a client table with validation levels from L0 to L5, a trust model, a privacy policy and a reproducible memory-handoff test between Claude Code and Codex.

README badge

Report a problem