Persistent memory for AI coding agents
open sourceMITself-hostablefreeMCP
Engram gives AI coding agents memory that survives the end of a session: the agent saves decisions, bug fixes, discoveries and session summaries through MCP tools, and searches them later, scoped to the project it's working in. It's a single Go binary with no other runtime, storing everything in one local SQLite file with FTS5 full-text search, and exposes the same memory through an MCP server, a local HTTP API, a CLI and a terminal UI. engram setup configures it for Claude Code, OpenCode, Gemini CLI, Codex, Cursor, VS Code with Copilot, Windsurf, Pi and other agents, and it flags related or conflicting memories for the agent to judge. Memories can be shared across machines with Git Sync's compressed chunks, or through Engram Cloud, an optional self-hosted replication server on PostgreSQL with a browser dashboard. It's MIT-licensed, made by Gentleman Programming, and is the memory layer of its Gentle-AI stack.
Ways to install
On your own server
Package managers
Problems it solves
- my coding agent forgets everything about my project when the session ends
- I keep re-explaining the same architecture decisions to Claude Code every morning
- give Claude Code, Codex and Cursor one shared memory instead of separate notes for each
- my agent loses what it learned when the context window compacts halfway through a task
- save why a bug was fixed a certain way so the next agent session doesn't undo it
- persistent memory for AI coding agents without running Python, Node.js, Docker or a vector database
- an MCP server that lets my agent save and search notes about each repository separately
- leave a handoff summary at the end of an agent session so the next one picks up where it stopped
- browse and search what my AI agent remembers from a terminal UI
- share my coding agent's project memory with teammates through git
- sync AI agent memories between my laptop and desktop
- self-host a shared memory server for my team's coding agents with a web dashboard
- a simpler alternative to claude-mem that works with any agent
- find out when my agent saved two memories that contradict each other
- query my coding agent's memories over a local HTTP API from my own scripts
- export my agent's memories into Obsidian as a knowledge graph
- keep my AI coding assistant's memory in a local SQLite file I own
- add long-term memory to OpenCode or Gemini CLI with one setup command
Features
- MCP tools to save, search, update, review and consolidate memories and to start, summarise and end sessions
- project-aware memory: reads default to the current project, detected from git or the working directory
- single Go binary with SQLite and FTS5 full-text search in ~/.engram/engram.db
- local HTTP API with the same memory, for scripts and compound agent workflows
- terminal UI (engram tui) to browse and search memories with vim keys
- engram setup for Claude Code, Pi, OpenCode, Gemini CLI, Codex, Antigravity, Windsurf, Qwen Code, Kiro, Cursor, VS Code Copilot, Kilo Code, Kimi Code and CommandCode
- Claude Code and OpenCode plugins, and the gentle-engram package for Pi
- stable topic keys that update an evolving topic instead of creating duplicate memories
- conflict surfacing: flags related or conflicting memories, with optional LLM-judged semantic checks
- Git Sync: export and import memories as compressed chunks to share across machines
View 4 more
- Engram Cloud: optional self-hosted, project-scoped replication on PostgreSQL with a browser dashboard and managed users and tokens
- engram doctor for read-only diagnostics
- Obsidian Brain export of memories as a knowledge graph (beta)
- binaries for macOS, Linux and Windows; Homebrew tap and go install
Capabilities
| Has an API | plan not known |
|---|---|
| Has a command line tool | plan not known |
| Has an MCP server | plan not known |
Alternatives
The same job
These do what Engram does.
- ai-memory Long-term memory for AI coding agents, shared across agents, projects and machines
- Supermemory Memory and context layer for AI: memory, RAG, user profiles and connectors in one API
- Beads A memory upgrade for your coding agent
- Mem0 The memory layer for AI agents
- Letta Build stateful agents with memory that can learn and improve over time
- OpenViking The context database for AI agents
