Local SQLite long-term memory for AI assistants, served over MCP
Project description
agent-logbook
Local SQLite long-term memory for AI assistants, served over MCP. Context window = working memory. This database = long-term memory.
Every decision logged, nothing erased: agent-logbook writes distilled facts and decisions to a plain SQLite file as your assistant works, ranks them by relevance and salience so retrieval stays cheap no matter how old the project gets, and keeps a full supersession chain when something changes — so you can always ask "why did we think that before."
Install
pip install agent-logbook
Quickstart
cd your-project
agent-logbook-init
That's it — init detects which agentic tool you're using and wires up both
the MCP server registration and the memory-protocol instructions for it.
Works with
| Tool | Instructions written to | MCP config written to |
|---|---|---|
| Claude Code | CLAUDE.md |
.mcp.json |
| Cursor | .cursor/rules/agent-logbook-memory.mdc |
.cursor/mcp.json |
| GitHub Copilot | .github/copilot-instructions.md |
.vscode/mcp.json |
init never clobbers an existing config file — it merges in a memory server
entry alongside whatever's already there, and the protocol block is idempotent
(rerun it as many times as you want). If none of these three are detected, it
prints the protocol text and a generic MCP config snippet for you to adapt by
hand — see IMPLEMENTATION_GUIDE.md for the manual
steps and agent-logbook-init --help for --dry-run and --tool to force a
specific one.
Because the underlying intelligence (conflict checks, budgeted retrieval,
supersession) lives in the server, not the prompt, any MCP-compatible client
gets the same guarantees — the three above are just the ones init knows how
to wire up automatically today.
Explore what's stored
agent-logbook-viewer --dir /path/to/projects
Generates a self-contained HTML report comparing every project's memory
database it finds — savings metrics (recall count, tokens served, savings
ratio) side by side, plus a searchable table of each project's actual stored
memories. Point it at one --db path or a parent folder containing several
projects.
Docs: IMPLEMENTATION_GUIDE.md (architecture + setup) and TESTING_GUIDE.md (test strategy).
Development
pip install -e ".[dev]" && pytest
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 agent_logbook-0.1.1.tar.gz.
File metadata
- Download URL: agent_logbook-0.1.1.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd9aba4c29739d51231c2a012fffe0019f64c20bb369d892d7ed0a2159a2ba4f
|
|
| MD5 |
87d7c54f549340d30e9fbd013457ada6
|
|
| BLAKE2b-256 |
bdf7a30cb20fa5999bf2b97ccbbe80b0e21ebef039fbff73120c849643220384
|
File details
Details for the file agent_logbook-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agent_logbook-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f081e93ccf38b0f41014dacf8c9df0886e8d05c458f1ad7b3669b9d8b575b16
|
|
| MD5 |
7192661eac0f99361dab706a9616d851
|
|
| BLAKE2b-256 |
918bdafb1ccc6c2f312b745d281fda060458a15c87e2669e7002d2cd74957fc0
|