Skip to main content

agi-memory

Active. Day-1 history import is built in: agi-memory history-import reads the session transcripts Claude Code, Codex and OpenCode already wrote to disk into L1 observations, so recall works from moment zero instead of an empty vault. Zero dependencies, no LLM — just the history you already have.

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 your session history

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

agi-memory history-import --limit 20            # recent sessions -> L1 digests
agi-memory history-import --index                # every session -> episodic history
agi-memory history-import --harness codex --dry-run
agi-bootstrap --repo . --with-history             # README + git commits + history, one pass

Each session becomes one L1 observation (origin="history-import", title [claude:1a2b3c4d] ..., project taken from the session's working directory). Idempotent: re-runs skip sessions already imported. Filter with --project and --harness (claude, codex, opencode, all).

A digest is the session's own words — goal, the prompts that drove it, files touched — not a distillation, because nothing here calls an LLM. That is enough for memory_recall to answer "have we been here before"; memory_timeline and memory_wip read the same rows.

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 18 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

Metadata

Release files for agi-memory 0.9.2

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.2
File Size Uploaded Provenance
agi_memory-0.9.2.tar.gz 178.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 329.0 kB

Release files / agi_memory-0.9.2.tar.gz

Download URL agi_memory-0.9.2.tar.gz
Size 178.9 kB
Tags Source
SHA-256 checksum
How to use checksums
28e782db189095da79d4017e2250b8c3f70384d69501892248610ed397dd9128
BLAKE2b-256 checksum
How to use checksums
e94aa4553c5a5e27f9196749393a11a69b763e27bf976de69612cf02ff73bf6c
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.2-py3-none-any.whl

Download URL agi_memory-0.9.2-py3-none-any.whl
Size 150.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f531823c4e8569ee6bd30ba1415a1233a3ee3fd4471f6b6ae6be79d019a68ff
BLAKE2b-256 checksum
How to use checksums
8d447ce375fbc2443069f567aaefa36c396360e046b59ff328800b2817ebb994
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

Security for agi-memory 0.9.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agi_memory-0.9.2.tar.gz

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

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.9.2 This release

2 release files Full provenance

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