Engram – Persistent memory for AI agents, local-first and open source
Dead simple memory layer for AI agents—but Mem0, Letta, Zep already exist.

Custom agent framework in 2300 lines beats 400K-line bloatware; auditable and runs fully local.
Homelab operators and developers building local AI agents who want to avoid framework bloat.
AutoGPT · LangChain · LlamaIndex
So I built my own in ~2300 lines of Python. No frameworks, 8 runtime dependencies, 106 tests.
What it does: - Persistent memory via SQLite (FTS5 keyword search + sqlite-vec embeddings + recency decay, fused with Reciprocal Rank Fusion) - MCP tool integration — add capabilities by editing a JSON file - Native tools with safety guardrails (bash blocklist, timeouts, output caps) - Discord interface with session isolation - Structured JSON logging for every operation - Conversation compression for effectively infinite context
Runs locally on 2x RTX 3090 with Qwen3-Coder-Next via llama-server. No cloud APIs.
The design philosophy was: don't build what you don't need, but don't block the insertion points. For example, my AI firewall isn't built yet, but all LLM traffic goes through a single configurable URL, swapping in a filtering proxy is a config change I'll do later.
DESIGN.md documents the reasoning behind every architectural decision. Tests mock the LLM client so you can run them on a laptop.
GitHub: https://github.com/nonatofabio/luna-agent Blog post with full technical deep-dive: https://nonatofabio.github.io/blog/post.html?slug=luna_agent
Happy to answer questions about any of the design tradeoffs.
Dead simple memory layer for AI agents—but Mem0, Letta, Zep already exist.
Branching edit history lets agents explore refactors without losing prior versions.
Multi-agent orchestration for Claude Code, but agent frameworks already crowded.
Predict-calibrate extraction reduces noise, but Zep and Mem0 already dominate the agent memory space.
Agent memory as git-diffable Markdown files beats opaque vector databases.
SQLite-backed agent memory with graph viz when Mem0 and Zep already dominate.