Engram gives AI coding agents memory that survives the end of a session. It is a single Go binary backed by one SQLite database with FTS5 full-text search, reachable over MCP, an HTTP API, a command-line interface, and an interactive terminal UI. Because the transport is MCP, it works with any MCP-capable agent rather than one vendor's client, and it needs no Node.js, Python, or Docker.
The memory model is a curated project record rather than a transcript dump. Agents are given an operating contract: orient with memcurrentproject and memcontext, search before repeating a decision, retrieve progressively from search previews to full observations, and save completed bug fixes, decisions, discoveries, configuration changes, and durable user constraints with memsave. An evolving topic gets a stable topickey such as architecture/auth-model so updates replace rather than compete, and a session ends with a memsession_summary handoff that also serves as the recovery point after context compaction.
Setup is one command per agent — engram setup opencode, engram setup codex, engram setup gemini-cli, engram setup cursor, engram setup windsurf, and others — which writes the applicable MCP and integration configuration; Claude Code installs through a plugin marketplace entry. Reads are project-aware, resolving an explicit project, then the ENGRAM_PROJECT variable, then the current directory, with an explicit --all flag for a global read.
The local SQLite database is authoritative. Git Sync exports portable compressed chunks for moving memory between machines, and Engram Cloud adds optional project-scoped replication and shared access with a browser view, reached through a guided cloud upgrade sequence of doctor, repair dry-run, apply, and bootstrap.
Features
- Single binary: a Go executable with SQLite and FTS5 built in, no runtime or container dependencies
- Four interfaces: MCP over stdio, an HTTP API, a CLI, and a terminal UI with search, drill-in, and clipboard copy
- Agent-agnostic setup: per-agent engram setup commands for OpenCode, Codex, Gemini CLI, Cursor, Windsurf, Qwen Code, Kiro, Kilo Code, VS Code Copilot, and Antigravity
- Structured memories: observations are saved with a title, type, and a what/why/where/learned body for retrieval
- Stable topic keys: an evolving subject is updated under one key, with memsuggesttopic_key when the key is unclear
- Session handoffs: memsessionsummary records goal, discoveries, work done, next steps, and files for the next session
- Compaction recovery: the handoff is persisted first, then mem_context restores recent history after a compaction
- Project-aware reads: the project resolves from an explicit flag, an environment variable, or the working directory, with an opt-in global read
- Memory review tools: memreview, memjudge, and mem_compare surface stale knowledge and relationships between memories
- Git Sync: memory exports as portable compressed chunks for sharing across machines
- Optional cloud: project-scoped replication and shared access with a browser dashboard, with doctor and repair commands for upgrades
- Diagnostics: mem_doctor and the engram cloud upgrade status flow report project and store state
Integrates with
Claude Code
Terminal-based agentic coding tool that reads your codebase and runs tasks through natural-language commands
Codex
Lightweight coding agent that runs in your terminal
OpenCode
Open-source AI coding agent that runs in the terminal, an IDE, or a desktop app
Pi Coding Agent
Emacs front end for the Pi coding agent, with a chat buffer and a separate editable prompt buffer
