agi-memory
Your AI coding assistant forgets everything between sessions. This remembers.
Decisions you already made, bugs you already fixed, what happened last session, how the codebase fits together — kept in a file on your machine and handed back to the assistant next time, so you stop re-explaining your own project.
Works across Claude Code, Cursor, Windsurf, OpenAI Codex, OpenCode, Antigravity CLI, Aider, Goose, Cline, Roo Code, Crush, Pi and Hermes Agent — one memory, whichever tool you open.
No dependencies, no vector database, no background daemon. ~32MB of RAM, sub-millisecond lookups, works offline. Comparable tools install ~500MB of machine-learning libraries and take 200–500ms per lookup.
Why agi-memory? The 4 Cognitive Memory Pillars
Most AI memory architectures solve only a fragment of developer memory while incurring heavy dependencies or requiring background Node.js daemons. agi-memory unifies all four cognitive memory pillars in pure Python stdlib + SQLite (<35MB RAM, <1ms speed, zero external pip dependencies):
| Pillar | Core Question | Replaces | Implementation in agi-memory |
Latency / Overhead |
|---|---|---|---|---|
| 1. Epistemic | "What have we learned?" | Ad-hoc .cursorrules, forgotten bugfixes |
SessionLayer (SQLite FTS5 + BM25, Core Blocks) |
0.23 ms (zero tokens) |
| 2. Semantic | "What does our information mean & how is it connected?" | Heavy GraphRAG, Cognee, ChromaDB | GraphLayer (Native SQLite Recursive CTEs) |
0.28 ms (zero tokens) |
| 3. Episodic | "What happened during previous agent sessions?" | claude-mem (heavy Node/Bun daemons) |
EpisodicLayer (SQLite Session History & Lifecycle) |
0.23 ms (zero daemons) |
| 4. Structural | "How is this codebase structurally connected?" | Graphify, Tree-sitter binaries, LSP daemons |
CodeLayer (stdlib AST + Streaming Regex Graph) |
0.45 ms (zero daemons) |
Every pillar is scored by its own eval suite — see Benchmarks for measured comparisons against Mem0, Zep, Cognee, LangChain and claude-mem, including a real 13,988-observation production dataset.
Install
# One-line installer (recommended)
curl -fsSL https://raw.githubusercontent.com/kdbhalala/agi-memory/main/install.sh | bash
# Or: Homebrew / PyPI
brew tap kdbhalala/agi-memory https://github.com/kdbhalala/agi-memory && brew install agi-memory
pipx install agi-memory
Then wire up your assistants and initialize a project:
agi-integrate install all # configure every detected assistant + lifecycle hooks
agi-integrate status # confirm what was detected and configured
cd your-project && agi-integrate init .
init wires the project and installs an /agi-init slash command in each
assistant's own format. Run /agi-init inside your assistant and it reads the
codebase and writes the project's rules/ and context/ files.
Full options, including uvx and from-source: Installation.
Documentation
| Guide | What's in it |
|---|---|
| Installation | Installer script, Homebrew, PyPI/uvx, from-source, hooks setup |
| The Four Pillars | Deep dive into L1 Epistemic, L2 Semantic, L3 Episodic, L4 Code Graph |
| Architecture | Layer boundaries, storage model, multi-assistant production layout |
| Supported Assistants | Per-tool config paths and rules files for all 13 assistants |
| CLI Usage | Every agi-memory and agi-integrate subcommand |
| Python API | Using the layers directly from Python |
| Vault & Git Sync | Append-only JSONL vault, cross-device sync, compaction |
| Benchmarks | Latency, memory and cost comparisons; real-dataset results |
| Testing & Evals | The L1-L4 eval suites, chaos and stress tests |
| Integrations | Manual per-tool configuration snippets |
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agi_memory-0.5.0.tar.gz.
File metadata
- Download URL: agi_memory-0.5.0.tar.gz
- Upload date:
- Size: 114.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2fe773ce23b53da017d8edd5c9322e8193339949c1ab351ee2980d0f32a941b
|
|
| MD5 |
34bb4aaffbf3b9d9b37bc284021c30b1
|
|
| BLAKE2b-256 |
13344e895c5e935c2eebb77435717c8ece50fcb58291328d59ee0d17ead550c5
|
Provenance
The following attestation bundles were made for agi_memory-0.5.0.tar.gz:
Publisher:
release.yml on kdbhalala/agi-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agi_memory-0.5.0.tar.gz -
Subject digest:
f2fe773ce23b53da017d8edd5c9322e8193339949c1ab351ee2980d0f32a941b - Sigstore transparency entry: 2818172425
- Sigstore integration time:
-
Permalink:
kdbhalala/agi-memory@1c39fb2882863bd10ae5f490f55caa3b592cfe53 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/kdbhalala
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c39fb2882863bd10ae5f490f55caa3b592cfe53 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agi_memory-0.5.0-py3-none-any.whl.
File metadata
- Download URL: agi_memory-0.5.0-py3-none-any.whl
- Upload date:
- Size: 104.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a08f655390d895477558db8641c52dc8bddc8eb609a4e9c0a046a6638c2f643
|
|
| MD5 |
a6e106e68f926c868f316ee08a67886c
|
|
| BLAKE2b-256 |
3e9a66faa48cc9b65b28e4a3f42b415b2eb15eaf07611a9f212b17505e809672
|
Provenance
The following attestation bundles were made for agi_memory-0.5.0-py3-none-any.whl:
Publisher:
release.yml on kdbhalala/agi-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agi_memory-0.5.0-py3-none-any.whl -
Subject digest:
4a08f655390d895477558db8641c52dc8bddc8eb609a4e9c0a046a6638c2f643 - Sigstore transparency entry: 2818172516
- Sigstore integration time:
-
Permalink:
kdbhalala/agi-memory@1c39fb2882863bd10ae5f490f55caa3b592cfe53 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/kdbhalala
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c39fb2882863bd10ae5f490f55caa3b592cfe53 -
Trigger Event:
push
-
Statement type: