Skip to main content

Brain Framework: a robot head whose shell opens on a brain, above twin aperture eyes

Brain Framework 🧠

🧠 Brain Framework: from information to informed actions.

A second brain for you, your team and your AI agents, on your own computer. Gather what matters from every tool you work with, connect it into one knowledge graph and open your agent there, so it acts with everything you know instead of starting from scratch.

CI PyPI Python License: MIT

Why · How it works · Try it · Agents · Good to know · Four-tool walkthrough · Documentation

The Brain Framework loop: sensors gather evidence from your tools into a brain folder; bf.yaml declares the ontology, sensors, routines and watch; memories, projects, concepts and actions form a knowledge graph; agents read that context, act through the same CLIs, APIs, MCP servers and browsers, and write outcomes back.

Stop starting from scratch

Open an agent anywhere on your computer and it knows nothing: not your projects, not what you decided last week, not what changed overnight in the tools you rely on. It asks you to paste context, queries the same APIs again and forgets its conclusion when the session ends. Everyone starts from zero, every time.

Brain Framework (BF) changes the starting point. Create a brain, a plain folder, and let small programs called sensors fill it with evidence from your tools. Open your agent there: it searches your projects, decisions and collected records, cites where each fact comes from, acts through the tools you already use and writes the outcome and next step back for the next session.

Two fictional sessions ask whether the new website can launch. Opened anywhere, the agent asks you to paste Jira, GitHub and Google Cloud. Opened in a brain, it reads project:new-website and answers: not yet, Jira still blocks launch on accessibility review, citing each record, then notes the launch hold in the project note.

Questions that once took a tour of your tools become one prompt, once you write or adapt a sensor for each source:

Ask your agent Gathered from
“Can the new website launch?” The brief in Google Drive, the review in Jira, the pull request in GitHub and the deployment in Google Cloud, all linked to the project note.
“Prepare my two o'clock meeting.” The Google Calendar event, the last Google Meet notes, the attendees' recent Gmail and Slack threads and the projects they own.
“Where did we leave the migration?” The last action's next step, the Notion spec and the latest GitHub commits.
“What did the team decide on pricing?” Google Meet notes, Slack threads and Confluence pages in the team brain, and the decision recorded in the project note.
“Which decisions need another look?” Projects whose linked Jira issues, GitHub pull requests or Drive documents changed since their last update.
“What changed in my stack this week?” Release notes from RSS feeds, GitHub and OSV security advisories, Dependabot alerts and the model deprecation pages of your providers.
“Who is talking about my project?” Mentions on GitHub, Hacker News and Bluesky, beside GitHub traffic and Google Search Console.

Why a second brain?

  • Every source, even the ones no product connects. Mail, calendar, documents, chat, issues and pull requests, of course. But also the release notes and security advisories of the tools you depend on, model retirement dates, provider incidents, mentions of your projects on Hacker News or Bluesky, your domains' certificates and mail security, repository traffic that GitHub forgets after 14 days and your past agent sessions. If you can script it, you can collect it.
  • Unlimited integrations, both ways. A sensor is a small program that prints JSON: wrap a CLI such as gh, gws or gcloud, call an API, drive a browser, query a database or parse an export. The same CLIs, APIs and MCP servers then let your agent act on what it learned: draft the issue, answer the thread, fix the alert.
  • One vocabulary, one knowledge graph. Each tool names things its own way. You declare a small ontology in bf.yaml and sensors map provider fields into it at collection, so the same project, person or repository connects across every tool. BF turns those explicit links into a graph you navigate in one read, each claim pointing back to its evidence.
  • Private by design. Your brain is a folder on your disk. BF has no account, server or telemetry and never runs a model itself: prompts launch your agent harness. Search and read work offline.
  • Portable and versioned. Markdown notes, JSON records and scripts: open them in any editor, grep them, copy them to another machine. Keep the brain in a private Git repository for history, rollback, review and conflict resolution.
  • For you or your whole team. A personal brain stays on your laptop. A team brain is a private Git repository with one clone per teammate, so decisions, reviewed evidence and next steps are shared by everyone and their agents. Your personal brain can include the team's in its searches.
  • Any agent, guided by skills. Claude Code, Codex, GitHub Copilot, Antigravity or your own agent reach the same brain through the bf command, packaged skills or MCP. The skills teach them to find evidence, keep notes current, connect sources and maintain the brain.

Hosted personal agents run on someone else's computer, connect the sources their vendor chose and keep your context on their servers. You already have a computer, with your files, your credentials and every tool you can script. Keep the data, the code and the control.

This project has been a game changer for me, and I hope it will be for you. — Médéric Hurier (Fmind), author of Brain Framework

What one brain can gather

The author's own brain runs more than 50 sensors and holds over 60,000 records (counted on 2026-10-04):

Area Collected evidence
Work Mail, calendar events and meeting notes, Drive documents, chat, tasks, contacts and form responses.
Code Commits, issues, pull requests, reviews, notifications, Dependabot and security alerts.
Agents Claude Code, Codex, Copilot and other agent sessions and memories, so a past conclusion is one search away.
Your stack Release notes, security bulletins and advisories of the tools you use, model retirements and provider outages.
Your presence Mentions on GitHub, Hacker News and Bluesky; domain expiry, mail security and certificate transparency; site and repository traffic.
Reading RSS feeds, newsletters, bookmarks, highlights and Hacker News.

These are personal sensors, not bundled connectors. The repository ships reviewed starting points, and the bf-setup skill helps your agent connect a new source.

How it works

A brain gives your work the structure of a detective's case file, in plain files: evidence bags labeled with where and when each item was collected, case notes with the current theory and next step, and a board with string from each conclusion to its evidence. Five steps run in a loop: gather → normalize → organize and connect → act → learn.

A folder for each kind of knowledge

Folder Holds Example
memories/ One JSON file per collected item: what a source said, its URL and its time. The Jira launch review, as collected on Tuesday.
sensors/ Programs you review that print JSON records from a tool. A script that lists the Jira issues of your projects.
projects/ One Markdown note per project: goal, current state, decisions and tasks. “Start with a single product page because visitors need…”
concepts/ Knowledge you will reuse elsewhere, with its evidence and limits. “Explain the product before asking for signup.”
actions/ One work session: objective, inputs, outputs, outcome and next step. actions/2026-09-27_website-review/ACTION.md, resumed the next day.
routines/ Deterministic programs you review, run on demand, on a schedule or from Git. A weekly review that drafts an action listing projects to revisit.
prompts/ Markdown prompts your agent harness runs; each run's reply is a record. An assistant that reviews new mail and chat every half hour.
evals/ Saved questions with the evidence that search or read must return. “Why one page?” must return the project's Decision section.

Notes are Markdown with YAML metadata, records are JSON, and bf validate checks both. bf init --full creates sensors/ and routines/; create prompts/ when you add a prompt. A prompt's records hold model output, so search weighs them at half, like a low-priority source. The SQLite search cache in .bf/ is disposable and rebuilds itself from the files. See the file conventions.

bf.yaml, the coordination hub

One file declares what the brain knows how to name, collect and check:

# https://fmind.github.io/brain-framework/docs/configuration/
version: 7
name: brain
fields: # the ontology: shared fields and typed relations
  project: { type: identity, cardinality: one, relation: true, description: Project the source names. }
  kind: { type: string, cardinality: one, description: Common kind of item. }
  status: { type: string, cardinality: one, description: The item's state in its own tool. }
sensors: # what to collect, how often, mapped into the ontology
  jira:
    command: [sensors/jira.py]
    mode: snapshot
    refresh: 3600
    fields:
      project: { path: /attributes/workstream }
      kind: { value: issue }
      status: { path: /attributes/status }
routines: # deterministic reviews and checks
  weekly-review:
    command: [routines/weekly-review.py, "{{brain}}", "{{end}}"]
    refresh: 604800
    output: action
watch: # keep sources fresh and alert on failure
  interval: 300
  notifications: failure

BF runs each program with its configured arguments and no shell, bounds its time and output, validates what it prints and keeps its stderr in logs/. A failed run never changes your evidence. bf watch keeps due sensors, routines and prompts fresh in a terminal dashboard, and bf schedule generates native systemd, launchd or cron jobs for you to install. See sensors, routines and watch and schedule.

One vocabulary, set at collection

Workspace, Jira, GitHub and Google Cloud name the project project, workstream, repository_project and service_project. bf.yaml maps them once, at collection, to shared fields, so every record points to project:new-website and one read assembles all four.

Jira calls the project workstream, GitHub repository_project and Google Cloud service_project. Their states read In review, merged and healthy. Left as is, every reader (you, a script or an agent) translates each tool on every question. BF translates once, at the door: each sensor maps its provider's fields into the shared fields: of bf.yaml, and BF validates every value before saving the record.

Because project is a relation, records from all four tools point to the same identity, project:new-website, which the project note declares as an alias. People and repositories work the same way: map a mail sender, a calendar attendee and a commit author to identities such as person:email/alice@example.test, declare them on Alice's note, and one read lists what she sent, attended and wrote. Mappings are explicit: BF never decides that two similar names are the same subject. See shared fields and sensor mappings.

A knowledge graph across sources

Reading files gives you one document at a time, and grep finds words, not connections: it cannot say which deployment belongs to which project or what blocks a decision. BF indexes every explicit connection (Markdown links between notes, declared identities and aliases, relation fields on records) into a knowledge graph, so one read assembles a subject from every source:

bf read project:new-website

The reply holds the project note and its backlinks, grouped by relation: under project, four records from four tools side by side in the shared vocabulary, the Jira review In review, the GitHub pull request merged, the Gcloud deployment healthy and the Workspace brief approved. The four-tool walkthrough shows the reply. From there, follow typed relations such as author, owner, depends-on or your own. Each claim keeps the note section or record that asserted it, so an answer can always cite its evidence. bf export prints the whole graph as JSON Lines for DuckDB or networkx.

Act, then learn

Retrieval assembles the context; people and agents do the work, through the CLIs, APIs and MCP servers they already use. An action keeps each session's objective, inputs, outputs and next step, so the next session, yours or an agent's, resumes instead of starting over.

Four steps: a sensor collects the Jira review In review and you record that launch is on hold; the review moves to Done and bf collect jira updates the record; bf read flags the project with review true, reason newer_evidence and newer jira:review; you update the conclusion and the flag clears.

The graph keeps conclusions current. Each project knows the evidence it links to: when a linked record changes after the note's last edit, bf read flags the project for review and names the record to read first, so a decision does not silently outlive its linked evidence. Try it in the four-tool walkthrough. Routines run deterministic reviews and checks, such as a weekly review action or bf validate before each Git commit, and retrieval cases in evals/ confirm that the questions you rely on still find their evidence as the brain grows.

Try it

You need Linux or macOS and uv, which installs the tested Python 3.14 if needed (install details). No model or provider account is required.

uv tool install --python 3.14 brain-framework
bf --version

Then follow Getting started: create a brain, save a decision, find its reason and link it to a first collected source. The four-tool walkthrough then runs the whole loop offline on fictional Workspace, Jira, GitHub and Gcloud records.

Open your agent in your brain

Use the same brain with Claude Code, Codex, GitHub Copilot or any agent host that can run a command. After Getting started, start your terminal agent in ~/brain and give it this prompt:

Use the bf CLI. Find why we chose a single product page. Read the source, cite its ref and tell me the project's next action.

Check that it cites projects/new-website.md#decision and names “Draft the product page.” as the next task. For ongoing use, install the packaged skills into your host's skills folder:

bf skills ~/.agents/skills

Each host reads its own folder: for Claude Code, use ~/.claude/skills instead. Claude Code 2.1.277+ loads the brain's AGENTS.md when no CLAUDE.md sits in the brain or a folder above it, so do not add one; the agent guide gives the fallback for older versions.

Skill Teaches your agent to…
bf-use Find evidence, cite it, and keep projects and concepts current.
bf-action Start, resume and hand off a tracked work session: /bf-action website-review.
bf-setup Install BF, create a brain, connect the agent and choose sources worth adding.
bf-maintain Run sensors, routines and prompts, check the brain and upgrade it safely.

Working in a code repository instead? The example session hook prints the project that declares the repository, its next task and linked evidence when the session starts. During collection, a usable cached reply carries an “Index refreshing” note. Hosts that prefer tools can call search and read through MCP. See the agent guide, which also points agents to this documentation as Markdown.

Bring your tools

Start with a reviewed sensor, copy it into your brain's sensors/ and adapt it, or write one for another source:

Source Starting point
Local files, highlights and Git Document, highlight and Git history sensors.
Google Calendar, Gmail and Drive Calendar, Gmail headers and Drive folder sensors using gws.
GitHub, Jira, Confluence and Google Cloud The GitHub history sensor, or your own using acli, gcloud or their APIs.
Anything you can script An API, a database query, a browser session or an export: any source you can script becomes a sensor.

Start with one local source, then connect sources through field mappings. Provider tools handle authentication; your program selects what to collect. Nothing is a black box: sensors, routines, hooks, the ontology and the agent instructions are files in your brain. Read them, edit them or ask your agent to adapt one, such as “keep only meetings with notes in the calendar sensor”, and review the change in Git. For example, collect Calendar notes and ask your agent to draft GitHub issues from them for your review.

After reviewing your sensors, run bf watch to keep them refreshed and see failures as they happen:

Watch dashboard for the fictional offline demo: five sensors sorted by state, with a failed sensor's details beside their last success, next due time, item count and record changes.

The dashboard shows the fictional offline watch demo, which needs no provider account.

Share it with Git

A brain is a folder, so Git gives it history, rollback, review and conflict resolution. By default, bf init keeps collected records, logs and the search cache out of Git: commit your curated notes and programs, then share selected sources when an audience may read them. Push a personal brain to a private repository to sync your machines, or give a team its own private brain repository with one clone per teammate and a collecting laptop per source. Personal and team knowledge stay in separate brains, and a personal brain can include the team's in its searches. See team setup and the two-contributor example.

Good to know

  1. It runs on your computer, not in someone else's cloud. That is a feature: your agent works where you can watch it, interrupt it and inspect every file it reads or writes, instead of a black box on a remote server. Sensors collect while your machine is on, through bf watch or a native schedule.
  2. It takes some setup. Each source needs its access: an API key, gh auth login, gws or gcloud authentication, then a sensor you review. Providers ship better CLIs and MCP servers every month, so this keeps getting easier, and the bf-setup skill walks your agent through it.
  3. It needs an agent harness for the reasoning. BF never runs a model itself: it collects, validates, searches and connects, and its prompts launch your harness. Claude Code, Codex, Copilot, Antigravity or another harness does the thinking, so the privacy of what your agent reads depends on that harness's data terms. BF sends no telemetry or personal data to us; see privacy and security for a fully local setup.
  4. It finds what was said and linked, not what was meant. Search matches words and explicit identities, without embeddings, and incomplete results say so. Search and read never contact providers: collect again when you need newer evidence. See what BF does not do.

Browse the commands · Report an issue · Contribute · MIT licensed · Third-party notices

Metadata

Release files for brain-framework 18.5.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 brain-framework 18.5.0
File Size Uploaded
brain_framework-18.5.0.tar.gz 264.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brain-framework 18.5.0
File Interpreter ABI Platform
brain_framework-18.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 557.3 kB

Release files / brain_framework-18.5.0.tar.gz

Download URL brain_framework-18.5.0.tar.gz
Size 264.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc2de15485b71cd23f288c6ad8c6a4b74853e57be46604b9f66f37ff3777b047
BLAKE2b-256 checksum
How to use checksums
7bbe6047d18f0ff5eed85d432ae327086e3d4f0fb334ceb223eb185ce604f6fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release files / brain_framework-18.5.0-py3-none-any.whl

Download URL brain_framework-18.5.0-py3-none-any.whl
Size 293.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0717fa33dab179bafccc296a67c62e5284aa6567ba5f1a0107420e51479105a3
BLAKE2b-256 checksum
How to use checksums
6f7283868ce70e0227b34ef783ecf92166cedf888704b5fa8eb51f39479b8f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

18.5.0 This release

2 release files

18.4.0

2 release files

16.1.1

2 release files

16.1.0

2 release files

16.0.1

2 release files

15.0.0

2 release files

14.0.0

2 release files

13.0.2

2 release files

12.0.2

2 release files

12.0.0

2 release files

11.1.1

2 release files

11.0.0

2 release files

10.0.0

2 release files

9.2.0

2 release files

9.1.0

2 release files

9.0.1

2 release files

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