Skip to main content

agi-memory

CI PyPI License: MIT Dependencies Latency Evals Python

Zero-dependency, high-performance four-pillar cognitive memory framework (Epistemic, Semantic, Episodic, Structural Code Graph) for AI coding assistants.

Share synchronized context, recent bugfixes, durable architectural decisions, session timelines, and codebase structure seamlessly across Claude Code, Cursor, Windsurf, OpenAI Codex, OpenCode, Antigravity CLI, Aider, Goose, Cline, Roo Code, Crush, Pi, and Hermes Agent.


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

agi_memory-0.4.0.tar.gz (103.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agi_memory-0.4.0-py3-none-any.whl (97.1 kB view details)

Uploaded Python 3

File details

Details for the file agi_memory-0.4.0.tar.gz.

File metadata

  • Download URL: agi_memory-0.4.0.tar.gz
  • Upload date:
  • Size: 103.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agi_memory-0.4.0.tar.gz
Algorithm Hash digest
SHA256 a8a8c4919184a8665dd373f8eb66065bb78a60ee10cbb43ae5ea56546a364d60
MD5 de8b55f15b3132575aa7413bf20b732d
BLAKE2b-256 9966d8c7ac0c4feae1abe867873ac8d742309bd1530ef82b48b937fefd606052

See more details on using hashes here.

Provenance

The following attestation bundles were made for agi_memory-0.4.0.tar.gz:

Publisher: release.yml on kdbhalala/agi-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agi_memory-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: agi_memory-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 97.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agi_memory-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d006d660fd4cec71c9279a4929741d995b027c2a56425e4c0d5e3c327ccaad39
MD5 16b07542cab5e41b3e0ad43c2b2eb08d
BLAKE2b-256 be1fdb12451444a0451087d9c0311e97b3e736cd28d7901c1b0d4e6b1121722f

See more details on using hashes here.

Provenance

The following attestation bundles were made for agi_memory-0.4.0-py3-none-any.whl:

Publisher: release.yml on kdbhalala/agi-memory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page