selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Engram logo

Self-host Engram

v3.7.2

Persistent memory layer for AI coding agents via MCP

ReleaseOpen SourceMIT
Updated3 hours ago
LanguageGo
Setup difficultyEasy
Stars
8 134
Ports
7437 (Local HTTP API served by `engram serve` (JSON on 127.0.0.1)), 8080 (Engram Cloud server runtime (`engram cloud serve`) default port when run from source)
Docker
ghcr.io/gentleman-programming/engram
Install with Docker Compose
Engram terminal UI dashboardTUI recent observations listTUI observation detail viewTUI search results

What is Engram?

Engram gives AI coding agents a persistent, searchable memory so they stop losing context between sessions. It stores curated observations, prompts and session summaries in a single SQLite database with FTS5 full-text search, located at ~/.engram/engram.db. Everything ships as one Go binary with no runtime dependencies: it exposes a CLI, a local HTTP API (port 7437 by default), a stdio MCP server with dozens of memory tools, and a vim-style terminal UI. It is agent-agnostic — engram setup writes configuration for fourteen coding agents such as Claude Code, Codex, Gemini CLI, Cursor and Windsurf, and any MCP-compatible client can connect. Memories are project-scoped, related or conflicting entries are flagged for the agent, and Git Sync exports compressed chunks so history can move across machines; Engram also offers optional conflict scanning, read-only engram doctor diagnostics, and a beta tool that turns stored memories into an Obsidian graph. Install it with Homebrew, go install, or a release archive for macOS, Linux and Windows, and optionally deploy the self-hosted Engram Cloud replication server with a browser dashboard using Docker Compose and Postgres. The project is MIT-licensed (names and logos are trademarked) and maintained by Alan Buscaglia's Gentleman Programming organisation.

Engram alternatives

Should you self-host Engram?

Engram scores 74/100 on selfhost.directory (how scoring works) and ranks #23 of 209 in AI Agents. It has 8 134 GitHub stars, +455 in the last 30 days.

It shipped 14 stable releases in the past year. The latest, pi-v0.8.0, came out on 14 November 2026. New versions land roughly every 1 days.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Orca (91/100, 124 444 stars). It scores higher overall, so compare the two before you pick. See Engram vs Orca side by side.

Features

  • Agent setup automation
  • Background autosync
  • Cloud replication with dashboard
  • Conflict Detection
  • Full-Text Search
  • Git Sync
  • MCP Server
  • Obsidian knowledge graph exportMarked beta by the project.
  • Operational diagnostics
  • Persistent agent memory
  • Project-scoped memory
  • REST API
  • Session handoff summaries
  • Terminal UI

Engram README

Engram neon elephant banner: the elephant exhales a memory stream (remember, sync, recall), the ENGRAM wordmark is written on, and the tagline One Brain. Local or Cloud. appears

Engram™

Persistent memory for AI coding agents.

Release Stars 14 agents Platform License: MIT

Gentleman-Programming%2Fengram | Trendshift Gentleman-Programming%2Fengram | Trendshift Gentleman-Programming%2Fengram | Trendshift

Website • Quickstart • Docs • Candidate staging • Gentle-AI • Wiki


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.

One brain. Local or cloud. Agent-agnostic, single binary, zero dependencies.


If Engram saved you from re-explaining your project, a star helps other people find it.

Star History Chart

WORKS WITH THE AGENT YOU ALREADY HAVE

Claude Code · Pi · OpenCode · Gemini CLI · Codex · Antigravity · Windsurf
Qwen Code · Kiro · Cursor · VS Code (Copilot) · Kilo Code · Kimi Code · CommandCode

14 setup targets · plus any MCP-compatible agent · per-agent setup →

How to install Engram

Install Engram with Docker Compose

Environment variables
ENGRAM_DATABASE_URL, ENGRAM_CLOUD_HOST, ENGRAM_PORT, ENGRAM_CLOUD_TOKEN, ENGRAM_JWT_SECRET, ENGRAM_CLOUD_ALLOWED_PROJECTS
# Start cloud + Postgres
$ docker compose -f docker-compose.cloud.yml up -d
# Configure & enroll
$ engram cloud config --server http://127.0.0.1:18080
$ engram cloud enroll my-project
# Sync & verify
$ engram sync --cloud --project my-project

Self-hosts the optional Engram Cloud server (GHCR image linux/amd64 and linux/arm64); the local memory core itself needs no Docker.

How to configure Engram

  • ENGRAM_MEM_SAVE_TIMING(unset — disabled)Set to exactly `1` in the MCP server environment to log one privacy-safe stage timing record per `mem_save` invocation to stderr. See mem_save timing diagnostics.
  • ENGRAM_HTTP_WRITE_TIMING(unset — disabled)Set to exactly `1` in the local HTTP server environment to log one privacy-safe timing record for each session registration, observation save, or passive capture. See HTTP write timing diagnostics.
  • ENGRAM_DATA_DIR~/.engramEngram CLI data directory. Empty or whitespace-only values use the platform default; nonblank values are used as provided.
  • ENGRAM_PORT7437Override HTTP server port. Use an unsigned decimal value from `1` through `65535`; invalid values fall back to `7437` in `engram serve` and Claude Bash hooks.
  • ENGRAM_SOCKET(unset)POSIX-only Unix-domain socket path for `engram serve` and Claude Bash hooks. Socket mode listens exclusively on this path; it cannot be combined with an explicit `ENGRAM_PORT` or positional port. The default TCP listener remains unchanged when unset. PowerShell stays TCP-only. Bash hooks warn on stderr if socket transport cannot preserve memory capture.

Engram releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

What should I save first?

Save a real decision or bug fix rather than a meaningless sample note, so you can judge retrieval quality.

What makes search good?

Structured content is the signal: precise titles and summaries written by the agent keep FTS5 retrieval useful.

Does it store raw tool calls?

By default no; Engram keeps curated memory — observations, prompts, summaries and context retrieval.

Does it work only with Claude Code?

No, Engram is agent-agnostic and works with any MCP-compatible client.

Does Engram require a separate server process?

Not always: MCP can run directly over stdio, though some plugin flows also use the HTTP server for session orchestration.

More in AI Agents

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…