Skip to main content

agi-memory

Active. Day-1 history import from deja-vu is built in: agi-memory deja-import distills your existing session transcripts into curated L1 observations, so recall works from moment zero instead of an empty vault. Record-forward curation (rationale, supersession, pins) stays here; raw transcript search stays in deja.

CI PyPI

Coding assistants forget everything when a session ends. agi-memory is a small local memory they can all read and write, so you don't have to re-explain your project every time you open a new session or switch tools.

A basic example

On Monday you tell Claude Code why webhook retries are capped, and it saves that:

memory_record(
  title="Webhook retry limit",
  text="Payment webhooks retry at most 5 times with exponential backoff. "
       "Do not raise the limit: the provider bans endpoints that retry more.",
  rationale="Stripe disables endpoints after repeated failed retries",
)

On Thursday you're in Cursor, in a fresh session, and ask it to make webhooks more reliable. Before touching the code it checks memory:

$ agi-memory recall "webhook retries" --project shop
#1 [shop] Webhook retry limit: Payment webhooks retry at most 5 times with
exponential backoff. Do not raise the limit: the provider bans endpoints that
retry more. | Why: Stripe disables endpoints after repeated failed retries

So it doesn't "fix" reliability by raising the retry count. That's the whole idea: decisions, bugs you already fixed, and what you tried last time stay available across sessions and across tools.

How it works

  • Memories are stored in SQLite on your machine, and also written to plain append-only text files you can read, diff, and keep in git.
  • Each assistant talks to it through a local MCP server. It works in Claude Code, Cursor, Windsurf, Codex, OpenCode, Antigravity, Aider, Goose, Cline, Roo Code, Crush, Pi, and Hermes Agent.
  • Nothing leaves your machine unless you point the memory files at a git remote to sync them between computers.
  • It's pure Python with no dependencies: no vector database, no model download, no background service.

Besides notes and decisions, it also keeps a short history of past sessions and an index of your code (functions and who calls them), so an assistant can ask "what calls this?" before changing it.

What it won't do

Search is by keyword, not meaning. If you saved "authentication" and later ask about "login", it can miss. It helps to use the words you'd search for when saving something. The measured hit rates, including the misses, are in Testing & Evals.

Install

pipx install agi-memory            # or: brew tap kdbhalala/agi-memory https://github.com/kdbhalala/agi-memory && brew install agi-memory
agi-integrate install all          # connect every assistant it finds on your machine
agi-integrate status               # see what got connected

Day-1: import deja history

New vault, years of sessions already on disk — start full, not empty:

agi-memory deja-import --limit 50 --dry-run   # preview what would import
agi-memory deja-import --limit 200 --since 90d
agi-bootstrap --repo . --with-deja             # README + git commits + deja in one pass

Each deja session becomes one L1 observation (origin="deja-import", title [deja:<short-id>] ..., project mapped from deja). Idempotent: re-runs skip imported sessions and tiny transcripts (--min-words 800). Filter with --project, --harness, --since.

Other install options, including a one-line script and running from source, are in Installation.

Documentation

Guide What's in it
Installation Install options, upgrading, lifecycle hooks
CLI Usage Every agi-memory and agi-integrate command
Supported Assistants Where each assistant's config lives, and the 16 MCP tools
How memory is organised Notes, knowledge graph, session history, code index
Architecture How the pieces fit together
Vault & Git Sync The memory files, syncing between machines, compaction
Python API Using it directly from Python
Testing & Evals How it's tested, and where it falls short
Benchmarks Speed and memory measurements
Integrations Manual setup snippets for each assistant

License

MIT

Release files for agi-memory 0.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agi-memory 0.9.1
File Size Uploaded
agi_memory-0.9.1.tar.gz 168.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agi-memory 0.9.1
File Interpreter ABI Platform
agi_memory-0.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 311.3 kB

Release files / agi_memory-0.9.1.tar.gz

Download URL agi_memory-0.9.1.tar.gz
Size 168.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b31dfde47a366d43b7c42c521122c06bca18c91909c25bf042879621b75ff8c8
BLAKE2b-256 checksum
How to use checksums
70ff696bc2a186dc4c940561f882e2a55bad541fa62bf9bd7fcf83e9b3c3f004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / agi_memory-0.9.1-py3-none-any.whl

Download URL agi_memory-0.9.1-py3-none-any.whl
Size 142.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
833a639b0c445dabbcd010d9ce0fac77cfee94dc00d23620102b563aa626427b
BLAKE2b-256 checksum
How to use checksums
04f9fd922c2e4af68a5033c718c748941a02646a052890c2c5ae1b00a59381a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release 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