Brain Framework (bf) turns a flat folder of human-authored Markdown notes and collected JSON records into a schema-validated, pure-JSON knowledge store (memories/**/*.json) that humans and AI agents query offline with rg and jq (bf query, bf read, or bf mcp).
- Three formats, one job each. YAML for config (
bf.yamlversion: 15,evals/*.yaml, note frontmatter), JSON for records (memories/**/*.json, validated by package-owned core schemas and userschemas/*.json, plus plain JSON lines inlogs/*.log), and Markdown for humans (projects/,concepts/, andactions/parsed with Python-Markdownattr_listmetadata, plus plain Markdown inputs underprompts/). - Agents always query JSON — with minimal tokens.
bf buildcompiles Markdown notes, headings, keyedattr_listmetadata (attrs), links, and open tasks intomemories/{concepts,projects,actions}/*.jsonand maintains.bf/index.jsonl.bf read(--outline,--lines,--fields,--max-bytes),bf query(rg+--jq,--format jsonl|tsv),bf review, andbf statuskeep outputs bounded and fast. - Unified strange-loop orchestration (
loops:). Around 5,000 lines of Python with lazy imports, delegating retrieval torgandjq, cross-references to relative Markdown paths,source:id, andbf://URLs, and every sensor, routine, git hook, continuous listener (daemon: true), and autonomous thinking bot to oneloops:primitive inbf.yaml— with bounded concurrent execution underbf watchand zero custom databases, built-in LLMs, or provider SDKs.
Try it
Requires Linux or macOS, uv, ripgrep (rg), and jq — no model or cloud account needed:
uv tool install --python 3.14 brain-framework
bf init ~/brain
cd ~/brain
bf check
bf review
bf query --jq '{ref, title, attrs}'
Explore the four-tool walkthrough (Workspace, Jira, GitHub, and Google Cloud fixtures) or read Getting started.
How it works
- Notes,
attr_list, & unified links (Authoring): Separate volatile TODOs (projects/), durable knowledge (concepts/), and dated workspaces (actions/*/ACTION.md), scaffold withbf new, attach metadata on headings (## MCP {#mcp creator=Anthropic}) and blocks ({: #summary confidence=high}), and cross-reference notes, records (source:id), or sibling brains (bf://). - Unified
loops:, schemas, & concurrentbf watch(Operations): Ship user-owned JSON Schemas inschemas/, copy stdlib sensors from examples/sensors, and orchestrate multi-schedule, event-triggered, git-hook,emit: true|<kind>, anddaemon: trueloops underbf.yaml(loops:,watch.concurrency) with a live Rich TUI. - Standard JSON retrieval & MCP (Retrieval): Resolve
bf://URLs,#anchorsections,--outline, or--lineswithbf read, search and filtermemories/**/*.jsonviabf query(rg,jq, orrg+--jq), verify in one shot withbf check, or expose strictly read-only tools viabf mcp. - Integrity, freshness, & schemas (Reference):
bf validatechecks every schema, compiled-note sync, link,#anchor, and cross-brainbf://reference with digest caching;bf reviewsurfacesnewer_evidence, overduestale_afternotes, and opendraftactions;bf schemaprints bundled Draft 2020-12 JSON Schemas.
Good to know
- Local-first and private. Zero global config (
--brain->BF_BRAIN-> enclosingbf.yaml->DEFAULT_BRAIN_PATH),O_NOFOLLOWpath confinement, and private0700.bf/andlogs/(Operations). - Harnesses reason; BF verifies. Coding agents load the single
/bfAgent Skill from.agents/skills/bf, track work viabf new action <slug>, emit loop events viabf emit, and runbf check(Example brain). - Git-native collaboration. Track notes,
bf.yaml,evals/, andschemas/in Git while ignoring compiled note JSON files,logs/,actions/, and.bf/.
Documentation · Reference · Issues · Contribute · Governance · MIT License · Third-party notices
Metadata
Release files for brain-framework 30.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brain_framework-30.0.0.tar.gz | 119.2 kB | With provenance | Details for brain_framework-30.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brain_framework-30.0.0-py3-none-any.whl | Python 3 | none | any | Details for brain_framework-30.0.0-py3-none-any.whl |
Total release size: 249.2 kB
Release files / brain_framework-30.0.0.tar.gz
| Download URL | brain_framework-30.0.0.tar.gz |
|---|---|
| Size | 119.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b14791cb850d5b623798a774528b0fac827ebd0cbb5629375130ca4ce56c03e8
|
|
BLAKE2b-256 checksum How to use checksums |
839f16f6ff341799afeb2097eae59bf7127da999bd82fb41435449f982ca04c9
|
| 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 21, 2026.
Transparency logRelease files / brain_framework-30.0.0-py3-none-any.whl
| Download URL | brain_framework-30.0.0-py3-none-any.whl |
|---|---|
| Size | 130.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ffe4af01f1ba840b79d5e7819eead74bc6a7ce9a3eb27f3c378a8ea19bfb78cb
|
|
BLAKE2b-256 checksum How to use checksums |
0b12cac76e5e15c1b805b33de476cd4ada77129f02eb1e4f2e21d4db367d9e4e
|
| 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 21, 2026.
Transparency logSecurity for brain-framework 30.0.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.
Attestation for brain_framework-30.0.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 21, 2026.
Transparency logA 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.