{"name":"Engram: Persistent Memory System for AI Coding Agents in Go","description":"Engram is an agent-agnostic, persistent memory system designed for AI coding agents. Built as a single Go binary, it leverages SQLite with FTS5 for efficient storage and retrieval of agent memories. It offers various interfaces including a CLI, HTTP API, MCP server, and a TUI, ensuring broad compatibility and ease of use for any agent supporting the Memory Protocol.","github":"https://github.com/Gentleman-Programming/engram","url":"https://osrepos.com/repo/gentleman-programming-engram","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/gentleman-programming-engram","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/gentleman-programming-engram.md","json":"https://osrepos.com/repo/gentleman-programming-engram.json","topics":["Go","AI","AgentMemory","SQLite","FTS5","DeveloperTools","CLI","OpenSource"],"keywords":["Go","AI","AgentMemory","SQLite","FTS5","DeveloperTools","CLI","OpenSource"],"stars":null,"summary":"Engram is an agent-agnostic, persistent memory system designed for AI coding agents. Built as a single Go binary, it leverages SQLite with FTS5 for efficient storage and retrieval of agent memories. It offers various interfaces including a CLI, HTTP API, MCP server, and a TUI, ensuring broad compatibility and ease of use for any agent supporting the Memory Protocol.","content":"## Introduction\n\nEngram, developed by Gentleman-Programming, provides a crucial missing piece for AI coding agents: persistent memory. Often, AI agents lose all context and learned information at the end of a session. Engram solves this by giving agents a \"brain\" where they can store, retrieve, and manage their observations and decisions across sessions.\n\nThis system is implemented as a lightweight, single Go binary with zero external dependencies, making it highly portable and easy to deploy. It uses SQLite with FTS5 for robust full-text search capabilities, allowing agents to quickly find relevant past memories. Engram is agent-agnostic, designed to work with any AI coding agent that supports the Memory Protocol (MCP), such as Claude Code, OpenCode, Gemini CLI, and others.\n\n## Installation\n\nGetting started with Engram is straightforward. For macOS users, you can install it via Homebrew:\n\nbash\nbrew install gentleman-programming/tap/engram\n\n\nDetailed installation instructions for Windows, Linux, and other platforms are available in the official documentation: [Installation Guide](https://github.com/Gentleman-Programming/engram/blob/main/docs/INSTALLATION.md).\n\n## Examples\n\nEngram integrates seamlessly with various AI agents. Here are a few quick setup examples:\n\n*   **Claude Code**: `claude plugin marketplace add Gentleman-Programming/engram && claude plugin install engram`\n*   **Pi**: `engram setup pi`\n*   **OpenCode**: `engram setup opencode`\n*   **VS Code (Copilot)**: `code --add-mcp '{\"name\":\"engram\",\"command\":\"engram\",\"args\":[\"mcp\"]}'`\n\nOnce set up, agents can save memories using tools like `mem_save` and retrieve context with `mem_search`. For instance, an agent might save a memory after completing a significant task:\n\n\n1. Agent completes significant work (bugfix, architecture decision, etc.)\n2. Agent calls mem_save ? title, type, What/Why/Where/Learned\n3. Engram persists to SQLite with FTS5 indexing\n4. Next session: agent searches memory, gets relevant context\n\n\nEngram also features a powerful Terminal User Interface (TUI) for human interaction, allowing you to browse, search, and manage memories directly from your terminal:\n\nbash\nengram tui\n\n\nFor sharing memories across machines, Engram offers Git Sync, which uses compressed chunks to avoid merge conflicts and manage file sizes:\n\nbash\nengram sync                    # Export new memories as compressed chunk\ngit add .engram/ && git commit -m \"sync engram memories\"\nengram sync --import           # On another machine: import new chunks\n\n\n## Why Use Engram\n\nEngram stands out as a robust solution for AI agent memory due to several key advantages:\n\n*   **Agent-Agnostic**: Works with any agent supporting the Memory Protocol (MCP), providing a universal memory layer.\n*   **Single Binary, Zero Dependencies**: Extremely easy to install and run, eliminating complex setup or dependency management.\n*   **Persistent & Searchable**: Utilizes SQLite with FTS5 for reliable storage and fast, full-text search capabilities, ensuring agents can always access relevant past information.\n*   **Comprehensive Toolset**: Offers a rich set of MCP tools for saving, updating, searching, and managing memories, along with session lifecycle management and conflict surfacing.\n*   **Flexible Interfaces**: Provides a CLI for scripting, an HTTP API for programmatic access, an MCP server for agent communication, and an interactive TUI for human oversight.\n*   **Cloud Integration (Opt-In)**: Supports optional cloud replication for sharing memories across teams and machines, with local SQLite remaining the source of truth.\n*   **Memory Conflict Surfacing**: Beta features allow agents to detect and semantically judge conflicting memories, enhancing the quality of stored knowledge.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/Gentleman-Programming/engram](https://github.com/Gentleman-Programming/engram \"Engram GitHub Repository\" target=\"_blank\")\n*   **Installation Guide**: [https://github.com/Gentleman-Programming/engram/blob/main/docs/INSTALLATION.md](https://github.com/Gentleman-Programming/engram/blob/main/docs/INSTALLATION.md \"Engram Installation Guide\" target=\"_blank\")\n*   **Agent Setup**: [https://github.com/Gentleman-Programming/engram/blob/main/docs/AGENT-SETUP.md](https://github.com/Gentleman-Programming/engram/blob/main/docs/AGENT-SETUP.md \"Engram Agent Setup\" target=\"_blank\")\n*   **Full Documentation**: [https://github.com/Gentleman-Programming/engram/blob/main/DOCS.md](https://github.com/Gentleman-Programming/engram/blob/main/DOCS.md \"Engram Full Documentation\" target=\"_blank\")","metrics":{"detailViews":12,"githubClicks":20},"dates":{"published":null,"modified":"2026-06-02T00:59:45.000Z"}}