Skip to main content

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

Metadata

Release files for agent-logbook 0.1.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 agent-logbook 0.1.1
File Size Uploaded Provenance Actions
agent_logbook-0.1.1.tar.gz 24.7 kB Without provenance Details for agent_logbook-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-logbook 0.1.1
File Interpreter ABI Platform Actions
agent_logbook-0.1.1-py3-none-any.whl Python 3 none any Details for agent_logbook-0.1.1-py3-none-any.whl

Total release size: 43.0 kB

Release files / agent_logbook-0.1.1.tar.gz

Download URL agent_logbook-0.1.1.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cd9aba4c29739d51231c2a012fffe0019f64c20bb369d892d7ed0a2159a2ba4f
BLAKE2b-256 checksum
How to use checksums
bdf7a30cb20fa5999bf2b97ccbbe80b0e21ebef039fbff73120c849643220384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / agent_logbook-0.1.1-py3-none-any.whl

Download URL agent_logbook-0.1.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f081e93ccf38b0f41014dacf8c9df0886e8d05c458f1ad7b3669b9d8b575b16
BLAKE2b-256 checksum
How to use checksums
918bdafb1ccc6c2f312b745d281fda060458a15c87e2669e7002d2cd74957fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for agent-logbook 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

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