Skip to main content

Boring Agent Memory

tests

Local BM25 recall over the files your agent already trusts, with line citations and a check that each source still matches what was indexed.

Status: alpha. The CLI, Python API, and index schema may still change before 1.0.

Most agent memory failures are not failures of semantic search. They are failures of trust: stale state, missing provenance, private data captured by default, and memory overriding the source of truth.

Boring Agent Memory indexes the docs, skills, runbooks, bug logs, and ADRs you choose with SQLite FTS5. It returns source paths and snippets, and your agent reads the cited file before it acts. It needs no hosted service, embedding API, vector database, model download, or account.

Install

python -m pip install boring-agent-memory

It needs Python 3.11 or newer.

Try It

mkdir notes
printf '# Deploys\n\nRoll back database migrations within 15 minutes.\n' > notes/deploys.md

bam build --include notes
bam query "roll back migrations"
deploys.md  score=-3e-06
  /path/to/notes/deploys.md
  # Deploys

[Roll] [back] database [migrations] within 15 minutes.

Now change the file and check whether the index still matches it:

printf '# Deploys\n\nRoll back within 30 minutes.\n' > notes/deploys.md

bam inspect notes/deploys.md
bam update --include notes

bam inspect reports content_hash_match: False until bam update picks up the edit.

Use Your Own Files

Point a config at the files you trust and save it as memory.yaml:

index_path: ~/.bam/memory.db
source_type: canonical_file
workspace: ~/project/app

include:
  - ~/agent/skills
  - ~/project/*/docs

exclude:
  - "**/secrets/**"
bam build --config memory.yaml --json
bam update --config memory.yaml --dry-run --json
bam update --config memory.yaml --json

bam --db ~/.bam/memory.db query "rollback policy" --limit 5 --json

A database that does not exist is an error, so a mistyped path cannot look like an empty memory.

Use It From An Agent

from boring_agent_memory import memory_query

results = memory_query(
    "rollback policy for database migrations",
    limit=5,
    source_type="canonical_file",
    db_path="~/.bam/memory.db",
)

for result in results:
    print(result.citation)
    print(result.snippet)

Other processes can use bam serve --stdio, which speaks JSON lines. See the CLI reference.

Agent instructions to copy are in docs/agent-prompt.md, with setups for Claude Code, Codex, and Hermes.

Evidence

On Benchmark v2's 12 synthetic queries, chunked BM25 finds the right lines first every time, while whole-document BM25 finds the right file 91% of the time and never the right lines. These are deterministic fixture results, not production traffic or a broad semantic-memory claim. See Benchmark v2 and why BM25 comes first.

Knowing when to return nothing matters as much as recall. On Benchmark v1, 20 adversarial no-answer queries pair one system's name with another system's setting, such as "current cobalt idle timeout": every word is in the corpus, but no file answers it.

Query path Recall@3 on 100 answerable queries Vague queries Easy no-answer returned nothing Adversarial no-answer returned nothing
Default 1.00 1.00 20 of 20 0 of 20
--strict 0.80 0.00 20 of 20 20 of 20

The default falls back to an any-term match, so it answers every vague query and every adversarial one; those results carry "strategy": "or", which marks a partial match. --strict skips that fallback and the substring fallback, so a result must match every term the query tokenizer keeps (Latin letters, digits, and CJK; other scripts are dropped) across the chunk's indexed fields (text, heading, title, and path), and it refuses both. A term-coverage threshold seemed to split them, but mostly because of how many terms the templated queries have, so it was not adopted. Neither mode makes a result authoritative: strict results can still come from a stale note or match a term only in the path, so the agent still reads the cited lines. The default keeps recall; --strict is for callers that would rather get nothing than a partial match. See Benchmark v1.

What It Is Not

  • Not a chatbot brain or an auto-capture memory system. It indexes only paths you name.
  • Not a replacement for semantic search over vague queries.
  • Not an authority over current files. Canonical files come first, BM25 recall second, model memory last.
  • Not a hosted service or a vector database.

Privacy

Secret-bearing paths are skipped and common secret patterns are redacted before indexing, but these are guardrails, not a formal secret scanner. Read the privacy model before choosing what to index.

Documentation

Contributing

See CONTRIBUTING.md, and read SECURITY.md before sharing logs, configs, or memory fixtures.

License

MIT

Metadata

Release files for boring-agent-memory 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for boring-agent-memory 0.3.0
File Size Uploaded Provenance Actions
boring_agent_memory-0.3.0.tar.gz 100.4 kB With provenance Details for boring_agent_memory-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for boring-agent-memory 0.3.0
File Interpreter ABI Platform Actions
boring_agent_memory-0.3.0-py3-none-any.whl Python 3 none any Details for boring_agent_memory-0.3.0-py3-none-any.whl

Total release size: 139.2 kB

Release files / boring_agent_memory-0.3.0.tar.gz

Download URL boring_agent_memory-0.3.0.tar.gz
Size 100.4 kB
Tags Source
SHA-256 checksum
How to use checksums
75a38a611174a5a0027d49fba811f37b0240f187eac1ea1a18846784d5bef313
BLAKE2b-256 checksum
How to use checksums
81c04e6bff90db052375e767574607b7ac8c971d7191a01845c18637c23aa91f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Release files / boring_agent_memory-0.3.0-py3-none-any.whl

Download URL boring_agent_memory-0.3.0-py3-none-any.whl
Size 38.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50d24c39d2bfc9ac9e1ad6a1182c5c5c76ffdda30bc973e9cec29af737ac999c
BLAKE2b-256 checksum
How to use checksums
4b5e877054636be282d43ead8f7578fcb4bb8f95bdc1476146c66eaae3e8b157
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Security for boring-agent-memory 0.3.0

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for boring_agent_memory-0.3.0.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 Nov 9, 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.

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

Release history Release notifications | RSS feed

This release

0.3.0 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