Engram TIVIT — Persistent Memory for AI Coding Agents
Customized for TIVIT. OpenCode integration. Zero dependencies.
Installation •
Agent Setup •
Architecture •
Plugins •
Contributing •
Full Docs
engram /ˈen.ɡræm/ — neuroscience: the physical trace of a memory in the brain.
Your AI coding agent forgets everything when the session ends. Engram gives it a brain.
A Go binary with SQLite + FTS5 full-text search, exposed via CLI, HTTP API, MCP server, and an interactive TUI. Works with OpenCode via MCP protocol.
Agent (OpenCode)
↓ MCP stdio
Engram (single Go binary)
↓
SQLite + FTS5 (~/.engram/engram.db)
Quick Start
Install
brew install gentleman-programming/tap/engram
Windows, Linux, and other install methods → docs/INSTALLATION.md
Setup Your Agent
engram setup opencode
Full OpenCode configuration and Memory Protocol → docs/AGENT-SETUP.md
That's it. No Node.js, no Python, no Docker. One binary, one SQLite file.
How It Works
1. Agent completes significant work (bugfix, architecture decision, etc.)
2. Agent calls mem_save → title, type, What/Why/Where/Learned
3. Engram persists to SQLite with FTS5 indexing
4. Next session: agent searches memory, gets relevant context
Full details on session lifecycle, topic keys, and memory hygiene → docs/ARCHITECTURE.md
MCP Tools (15)
| Category | Tools |
|---|
| Save & Update | mem_save, mem_update, mem_delete, mem_suggest_topic_key |
| Search & Retrieve | mem_search, mem_context, mem_timeline, mem_get_observation |
| Session Lifecycle | mem_session_start, mem_session_end, mem_session_summary |
| Utilities | mem_save_prompt, mem_stats, mem_capture_passive, mem_merge_projects |
Full tool reference with parameters → DOCS.md#mcp-tools-15-tools
Terminal UI
engram tui
Navigation: j/k vim keys, Enter to drill in, / to search, Esc back. Catppuccin Mocha theme.
Git Sync
Share memories across machines. Uses compressed chunks — no merge conflicts, no huge files.
engram sync # Export new memories as compressed chunk
git add .engram/ && git commit -m "sync engram memories"
engram sync --import # On another machine: import new chunks
engram sync --status # Check sync status
Full sync documentation → DOCS.md
CLI Reference
| Command | Description |
|---|
engram setup [agent] | Install agent integration |
engram serve [port] | Start HTTP API (default: 7437) |
engram mcp | Start MCP server (stdio) |
engram tui | Launch terminal UI |
engram search <query> | Search memories |
engram save <title> <msg> | Save a memory |
engram timeline <obs_id> | Chronological context |
engram context [project] | Recent session context |
engram stats | Memory statistics |
engram export [file] | Export to JSON |
engram import <file> | Import from JSON |
engram sync | Git sync export/import |
engram projects list|consolidate|prune | Manage project names |
engram obsidian-export | Export to Obsidian vault (beta) |
engram version | Show version |
Full CLI with all flags → docs/ARCHITECTURE.md#cli-reference
Documentation
License
MIT