$ show Gentleman-Programming/engram
Engram is a persistent memory system for AI coding agents, providing local-first storage (SQLite with FTS5) and optional cloud sync (Postgres). It exposes memory tools via the Model Context Protocol (MCP), a local HTTP API, a Bubble Tea terminal UI, and plugins for Claude Code, Codex, OpenCode, Gemini CLI, and Obsidian. The architecture is a modular monolith: a single Go binary that can run as a CLI, background daemon, or HTTP server. Core data flows involve agents saving observations (memories) via MCP tools, which are stored locally and optionally replicated to a cloud backend. The cloud component includes a sync manager, authentication (managed tokens, project grants), a browser dashboard (HTMX + templ), and an admin API. The repository also includes a diagnostic/repair framework, project detection, and a self-test suite. Although primarily an application, it contains some data engineering patterns (chunk-based sync, mutation journal, audit logs) that are more typical of data pipelines. The codebase is well-structured with extensive tests, but its complexity and tight coupling of internal packages limit the reusability of individual components outside the project.
The LLM identified 2 files worth highlighting for reuse:
Provides FormatLocal and FormatLocalWithLayout functions that respect the ENGRAM_TIMEZONE environment variable for formatting time in the user's local timezone. It is a small, self-contained utility with no internal imports, making it safely extractable into any Go project that needs consistent timezone-aware logging or display.
A pure JavaScript utility that recursively redacts <private> block content from strings in objects and arrays. Used by the Pi agent plugin to strip sensitive information before sending data to the LLM. It is fully standalone, requires no external dependencies, and can be reused in any Node.js project needing privacy-preserving data sanitization.