🧠 Cognitive memory system for AI coding agents — persistent semantic search, knowledge graph, Ebbinghaus forgetting, zero API cost. Works with Claude, Cursor, Antigravity.
<p align="center">
<h1 align="center">🧠 Engram</h1>
<p align="center">
<strong>Cognitive Memory System for AI Agents</strong>
</p>
<p align="center">
Persistent semantic search · Knowledge graph · Sleep consolidation · Zero external APIs
</p>
<p align="center">
<a href="#quick-start">Quick Start</a> ·
<a href="#architecture">Architecture</a> ·
<a href="#features">Features</a> ·
<a href="#research-foundations">Research</a> ·
<a href="#cli-reference">CLI</a> ·
<a href="SKILLS/engram/SKILL.md">Agent Integration</a>
</p>
</p>
<br/>
> **Engram** gives AI agents a brain — not a database.
> It remembers what matters, forgets what doesn't, and builds connections between ideas.
> All inference runs **locally** — no API keys, no cloud, no token cost per memory operation.
<br/>
## Why Engram?
Most AI memory solutions (like [Mem0](https://github.com/mem0ai/mem0)) use LLM calls for every `add()` — extracting facts, classifying operations, resolving conflicts. That's powerful, but **expensive** and **opaque**.
Engram takes a different approach:
| | **Mem0** | **Engram** |
| ---------------------------- | ------------------------------ | ----------------------------------------- |
| **Who decides what to save** | LLM automatically | Agent explicitly |
| **Cost per memory write** | LLM call (extraction + update) | Local embedding only |
| **Cost per memory read** | Vector search + LLM | Hybrid search + local reranker |
| **External dependencies** | OpenAI API / vector DB service | **None** — fully local |
| **Memory unit** | Atomic fact ("User prefers X") | Typed record with full context |
| **Forgetting** | No built-in mechanism | Ebbinghaus-inspired decay + consolidation |
| **Knowledge graphAgent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.