Brain-AI Memory — Stop Re-explaining Your Project
Open a new Codex or Claude Code session and continue from the last one.
Brain-AI Memory keeps the facts, decisions, exact values, and next steps you choose on your computer. Records stay separated by project, changed facts keep their source history, and the next session can receive a bounded handoff from the previous one.
Runs locally · No API key · No account · No database server
Source and full documentation · 한국어 · 简体中文 · Report a real use case or problem
Try the local tour
python3 -m venv .venv
source .venv/bin/activate
python -m pip install brain-ai-memory
DEMO_HOME="$(mktemp -d)"
brain-ai --home "$DEMO_HOME" tour
The tour uses synthetic data in a disposable directory. It does not inspect or import your files.
Connect a real project
Install the agent-connection support once:
python -m pip install "brain-ai-memory[mcp]"
Then run setup from the project you want to continue across sessions:
cd /path/to/your/project
brain-ai setup codex --entity my-project
brain-ai setup codex --entity my-project --apply
Use claude-code instead of codex for Claude Code. The first command is a
pure preview. --apply creates one empty project entity when needed or reuses
an existing project entity, applies the shown project-scoped configuration,
and runs diagnostics. It does not import or approve a MEMORY.md file.
By default, setup enables automatic session recall and checkpoints. Choose
--mode tools when you want the host to decide when to call memory operations.
When it is useful
Brain-AI Memory is meant for work where all three conditions hold:
- The work continues across many sessions.
- Facts, rules, or exact state change over time.
- A stale or cross-project memory can cause a real mistake.
Examples include multi-project coding agents, months-long research workflows,
operations agents that track approvals and deployments, and teams that use both
Codex and Claude Code. A one-off chat, a short single-repository task, ordinary
document search, or a small MEMORY.md you can prune by hand usually does not
need this package.
What it manages
- typed episodic and semantic records, exact state, rules, and session handoffs;
- stable project/entity scope so two similar projects do not share records by accident;
- source and lifecycle history when a newer fact replaces an older one;
- automatic source-drift checks that withhold stale imported records and prepare a review audit instead of silently treating them as current, while a stale procedural source places supported actions in a fail-closed review hold;
- local multilingual BM25 recall without downloading an embedding model; and
- optional project hooks for bounded recall, action checks, and checkpoints.
The automatic loop does not save raw prompts, raw tool output, assistant
messages, or edited file contents. The local store is not encrypted, so keep
.brain-ai/ private and out of source control. See the
security policy
and
automatic-session privacy boundary
before using sensitive records.
Bring an existing MEMORY.md
Audit is preview-first and leaves the source file unchanged:
cd /path/to/your/project
brain-ai audit MEMORY.md --entity my-project
It identifies source-addressed entries, exact duplicates, and possible literal conflicts. State, executable rules, and replacements stay unresolved until you make an explicit review decision. The complete workflow is documented in the GitHub README.
Evidence and limits
The public suite contains 135 deterministic tests covering the runtime, adoption workflow, host connections, automatic loop, packaged restart/resume, component contracts, and storage concurrency. Wheel and source distributions are built and smoke-tested before publication.
Those checks establish packaging and integration behavior. They do not yet show that Brain-AI Memory improves end-to-end LLM answers over RAG or a simpler memory file. Reproducible results, including negative findings, are available in the evidence section.
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 brain_ai_memory-0.7.0.tar.gz.
File metadata
- Download URL: brain_ai_memory-0.7.0.tar.gz
- Upload date:
- Size: 159.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14cc3139f80a5793ea0a53869d2c77058b725cd97902ef919ca2d0ed17cc132e
|
|
| MD5 |
8e46cca7e027ff73d4d2c55fca75eaac
|
|
| BLAKE2b-256 |
475e1c0f88a971ea8caba4a9b61557efaefdea722266fbf9e2139c0137c975b2
|
Provenance
The following attestation bundles were made for brain_ai_memory-0.7.0.tar.gz:
Publisher:
publish.yml on Hahyun-Lee/brain-ai-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brain_ai_memory-0.7.0.tar.gz -
Subject digest:
14cc3139f80a5793ea0a53869d2c77058b725cd97902ef919ca2d0ed17cc132e - Sigstore transparency entry: 2216142883
- Sigstore integration time:
-
Permalink:
Hahyun-Lee/brain-ai-memory@7524a382d4ba740b1a5bbe8407840dba41ed5547 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Hahyun-Lee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7524a382d4ba740b1a5bbe8407840dba41ed5547 -
Trigger Event:
release
-
Statement type:
File details
Details for the file brain_ai_memory-0.7.0-py3-none-any.whl.
File metadata
- Download URL: brain_ai_memory-0.7.0-py3-none-any.whl
- Upload date:
- Size: 106.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4fdfc975c4480b5d9f7ee2ae935077484717eff5cbde11370772364f942ba5e
|
|
| MD5 |
7e6d64f8ddee9b1117ab29509374eb7d
|
|
| BLAKE2b-256 |
d2ce8e3c7627870aaa174988c671fc7c72daf4105bdb62fc814dc335f80f5517
|
Provenance
The following attestation bundles were made for brain_ai_memory-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on Hahyun-Lee/brain-ai-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
brain_ai_memory-0.7.0-py3-none-any.whl -
Subject digest:
e4fdfc975c4480b5d9f7ee2ae935077484717eff5cbde11370772364f942ba5e - Sigstore transparency entry: 2216142979
- Sigstore integration time:
-
Permalink:
Hahyun-Lee/brain-ai-memory@7524a382d4ba740b1a5bbe8407840dba41ed5547 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/Hahyun-Lee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7524a382d4ba740b1a5bbe8407840dba41ed5547 -
Trigger Event:
release
-
Statement type: