Skip to main content
Engram Header

What is Engram?

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 any agent that supports MCP — Claude Code, OpenCode, Gemini CLI, Codex, VS Code (Copilot), Antigravity, Cursor, Windsurf, or anything else.
Agent (Claude Code / OpenCode / Gemini CLI / Codex / VS Code / Antigravity / ...)
    ↓ MCP stdio
Engram (single Go binary)

SQLite + FTS5 (~/.engram/engram.db)

Key Features

14 MCP Tools

Memory operations via Model Context Protocol — save, search, context, timeline, and more

SQLite + FTS5

Fast full-text search with zero external dependencies

HTTP REST API

RESTful API on port 7437 for integrations

Terminal UI

Interactive TUI built with Bubbletea for browsing memories

Git Sync

Share memories across machines with compressed chunks

Multi-Agent Support

Works with 8+ AI coding agents out of the box

Single Binary

Zero runtime dependencies — just one Go binary

Privacy Built-In

Redact sensitive data with privacy tags

How It Works

Engram trusts the agent to decide what’s worth remembering — not a firehose of raw tool calls.

The Agent Saves, Engram Stores

1

Agent completes significant work

Bugfix, architecture decision, discovery, configuration change, etc.
2

Agent calls mem_save

Structured summary with:
  • title: “Fixed N+1 query in user list”
  • type: bugfix
  • content: What/Why/Where/Learned format
3

Engram persists to SQLite

Data is indexed with FTS5 for fast searching
4

Next session: agent searches memory

Gets relevant context from previous sessions

Session Lifecycle

Session starts → Agent works → Agent saves memories proactively

Session ends → Agent writes session summary (Goal/Discoveries/Accomplished/Files)

Next session starts → Previous session context is injected automatically

Why Engram?

Works with any MCP-compatible agent. Not locked to Claude Code like similar tools.Supported agents:
  • OpenCode
  • Claude Code
  • Gemini CLI
  • Codex
  • VS Code (Copilot)
  • Antigravity
  • Cursor
  • Windsurf
  • Any other MCP-compatible agent
No Node.js, no Python, no Bun, no Docker, no ChromaDB, no vector database, no worker processes.One binary, one SQLite file.Uses modernc.org/sqlite — pure Go implementation with no CGO. True cross-platform binary distribution.
The agent decides what to save via mem_save — no raw tool call firehose.Why? Raw tool calls (edit: {file: "foo.go"}, bash: {command: "go build"}) are noisy and pollute search results. The agent’s curated summaries are higher signal, more searchable, and don’t bloat the database.Shell history and git provide the raw audit trail.
SQLite’s FTS5 covers 95% of use cases without the complexity of ChromaDB/Pinecone.
  • No separate database server
  • No embedding models
  • No vector similarity calculations
  • Fast keyword search with BM25 ranking
  • Simple query sanitization
<private>...</private> tags are stripped at two levels:
  1. Plugin layer (TypeScript) — stripped before data leaves the process
  2. Store layer (Go) — stripPrivateTags() runs before any DB write
Defense in depth ensures sensitive data never hits disk.

Progressive Disclosure (3-Layer Pattern)

Token-efficient memory retrieval — don’t dump everything, drill in:
1

mem_search

Search for relevant observations
mem_search "auth middleware" → compact results with IDs (~100 tokens each)
2

mem_timeline

Get chronological context around a result
mem_timeline observation_id=42 → what happened before/after in that session
3

mem_get_observation

Get full untruncated content
mem_get_observation id=42 → full observation with all details

Next Steps

Quickstart

Get up and running in 5 minutes

Installation

Install on macOS, Linux, or Windows

Agent Setup

Connect your AI coding agent

Core Concepts

Understand how Engram works

Build docs developers (and LLMs) love