Local Codex memory manager with an official Python SDK-based MCP server.
Project description
Breathing Memory
Breathing Memory is a local memory support system for coding agents. It runs as a stdio MCP server through the official Python MCP SDK, stores memory in SQLite, and isolates memory by project so one installation can be reused across repositories without mixing contexts.
Overview
Breathing Memory keeps collaboration context that an agent should remember but a repository should not need to encode everywhere.
- local stdio MCP server
- SQLite storage under user app-data, isolated by project
- fragment-centric public model built around
anchorandfragment - text-first retrieval today, with a public search surface already aligned for later semantic retrieval work
- dynamic
working / holdingmaintenance with a compression backend that uses a supported coding agent without polluting normal conversation history
Supported Clients
- Codex
Installation
The intended long-term user path is:
pip install breathing-memory
breathing-memory install-codex
breathing-memory install-codex registers the breathing-memory MCP server with the currently supported client and creates or updates the managed Breathing Memory block in the current repository's AGENTS.md.
This repository is configured for tag-based PyPI publishing through GitHub Actions. Until the first public release is published, install from Git or from a local clone:
pip install git+https://github.com/KazinaG/breathing_memory.git
# or inside a clone:
pip install -e .
breathing-memory install-codex
Release notes:
- PyPI publish runs from
.github/workflows/publish.yml - pushing a tag such as
v0.1.0triggers the build and PyPI publish workflow
Quickstart
Recommended first run:
python3 -m venv .venv
. .venv/bin/activate
pip install -e .
breathing-memory doctor
breathing-memory install-codex
Useful commands:
breathing-memory doctor: inspect installation, active project identity, DB path selection, and client registration statebreathing-memory serve: start the stdio MCP serverbreathing-memory inspect-memory --json: inspect current memory state
How Memory Works
Breathing Memory does not auto-capture the full client conversation by itself. The supported operating path is explicit MCP use by the calling agent.
The basic flow is:
- If there is an unremembered final agent answer from the previous turn, save it first with
memory_remember(actor="agent") - Save the current user message with
memory_remember(actor="user") - Search before an answer with
memory_search - Record feedback with
memory_feedbackwhen the user clearly confirms or corrects remembered information
Key points:
- one user utterance becomes one fragment
- one final user-facing agent answer is normally remembered on the next user turn
- commentary is not remembered
- if the final answer materially used remembered fragments, pass those ids in
source_fragment_ids - edits are modeled as forks rather than overwrites
- duplicate deferred agent capture for the same reply target and content is suppressed
- archived runtime files such as
archived_sessions/*.jsonlare not the primary capture path - if no later user turn arrives, the final agent answer may remain unremembered
Current MCP tools:
memory_remembermemory_searchmemory_fetchmemory_feedbackmemory_stats
Runtime Notes
Breathing Memory stores data under the user app-data directory resolved by platformdirs, then separates memory by project identity. The exact SQLite path can be inspected with breathing-memory doctor.
The current implementation is text-only. Runtime auto resolves to super_lite, which performs lexical retrieval only. The public search surface is already aligned for later semantic retrieval work, but explicit lite and default modes are not supported in this slice.
The current compression backend invokes a supported coding agent without leaving normal conversation history. In the current supported setup, that path uses Codex through codex exec --ephemeral.
Further Reading
- docs/user-guide.md: installation, runtime operation, storage behavior, and MCP tool usage
- docs/dev-guide.md: contributor-oriented setup and repository layout
- docs/spec.md: normative behavior and implementation-facing rules
- docs/design-rationale.md: adopted design choices and the reasons behind them
Project details
Release history Release notifications | RSS feed
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 breathing_memory-0.1.0.tar.gz.
File metadata
- Download URL: breathing_memory-0.1.0.tar.gz
- Upload date:
- Size: 32.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42e9d67de73752b5dc473535deb55a37e4a0025a7cad5d7512afeb7b55de5ed1
|
|
| MD5 |
52e5a275ada903cdc086fb9f0573055d
|
|
| BLAKE2b-256 |
763a23cf19bc0f5ad22d511efd79c9b14e11f789a46208e3f35e44d9e52d4810
|
Provenance
The following attestation bundles were made for breathing_memory-0.1.0.tar.gz:
Publisher:
publish.yml on KazinaG/breathing_memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
breathing_memory-0.1.0.tar.gz -
Subject digest:
42e9d67de73752b5dc473535deb55a37e4a0025a7cad5d7512afeb7b55de5ed1 - Sigstore transparency entry: 1189193008
- Sigstore integration time:
-
Permalink:
KazinaG/breathing_memory@da3f3ebcacee523d003a97e4fc3b7c58dc7e259d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KazinaG
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da3f3ebcacee523d003a97e4fc3b7c58dc7e259d -
Trigger Event:
push
-
Statement type:
File details
Details for the file breathing_memory-0.1.0-py3-none-any.whl.
File metadata
- Download URL: breathing_memory-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fbd0658a3c1335e6dd37a4a2706e1eee9e4b7b4d85e260e119693e164cce18d
|
|
| MD5 |
4e65c7827e8b2a6cd3093c2701b0dad3
|
|
| BLAKE2b-256 |
91d096101901555beadb0a5c39d3f1f413bdc5a2f9a144b2ccbeb9a928de50e9
|
Provenance
The following attestation bundles were made for breathing_memory-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on KazinaG/breathing_memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
breathing_memory-0.1.0-py3-none-any.whl -
Subject digest:
6fbd0658a3c1335e6dd37a4a2706e1eee9e4b7b4d85e260e119693e164cce18d - Sigstore transparency entry: 1189193009
- Sigstore integration time:
-
Permalink:
KazinaG/breathing_memory@da3f3ebcacee523d003a97e4fc3b7c58dc7e259d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/KazinaG
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@da3f3ebcacee523d003a97e4fc3b7c58dc7e259d -
Trigger Event:
push
-
Statement type: