Engram — Persistent Cognitive Memory for AI Agents
Engram is open-source cognitive memory infrastructure for AI agents that learn and improve from experience. Store, recall, and evolve typed memories via a simple HTTP API. Memories strengthen with use, decay when forgotten, and update from feedback — just like the human mind.
Four Memory Systems Inspired by Cognitive Science
Engram implements four distinct memory types based on established cognitive science research:
- Semantic Memory — Persistent facts, preferences, beliefs, and decisions. Confidence-scored and typed.
- Episodic Memory — Rich records of past interactions with full context, emotions, entities, and outcomes.
- Procedural Memory — Learned skills as trigger-action patterns extracted from successful episodes.
- Working Memory — 7-slot active memory for current goals and reasoning state, mirroring human working memory.
Key Features
- Confidence-Based Memory Tiering — Hot memories auto-inject into agent prompts. Cold memories surface only when relevant. Archives decay gracefully.
- Belief Dynamics — Bayesian log-odds confidence updates. Reinforced memories grow stronger. Contradicted ones weaken. Unused ones decay.
- Hybrid Retrieval — Every recall combines vector similarity with knowledge graph traversal up to 2 hops deep.
- Conversation Extraction — Automatically extract and classify memories from conversation transcripts.
- Procedural Learning — Agents learn reusable skills from successful interactions.
- Metacognition — Agents assess their own knowledge quality, detect gaps, and flag uncertainty.
- Multi-LLM Support — OpenAI, Anthropic Claude, Google Gemini, Cerebras.
- 40+ REST API Endpoints — Comprehensive API for all memory operations.
- Sub-10ms Recall Latency — p95 latency under 10 milliseconds.
Who Is Engram For?
- AI Agent Developers — Building agents that need persistent memory across sessions.
- LLM App Builders — Products needing user context beyond a single conversation.
- Multi-Agent Systems — Shared memory with automatic conflict resolution.
- Research Teams — Cognitive architectures based on CoALA, Mem0, ACT-R, MUSE.
Tech Stack
Built with Go (single binary), PostgreSQL, pgvector, and Docker. Self-hosted with one-command deployment.
Open Source
Engram is fully open source under the MIT License. View on GitHub.