Skip to content

SecondBrain

A local-first runtime for grounded retrieval, durable memory, governed tool execution, and agent workflows. Everything runs on your machine: your vault, your indexes, your decisions, your traces.

Pick a path

Goal Start here
Try it in 5 minutes, no provider keys Tutorials → Quickstart
Use it with your own vault How-to → Ingest and indexChat
Compile company know-how into agent skills How-to → Company Brain
Audit Company Brain readiness Reference → Company Brain Readiness Checklist
Build with it — extend the runtime Reference → Builder APIs · Patterns · Builders → Add a tool · Agent runtime toolsets
Operate local agents — model fit and isolation Reference → Local Agent Stack
Improve it with replayable evidence User Guides → Improvement Loop
Understand it — design rationale Explanation → Architecture
Recover from bad actions — reversibility, compensation, autonomy, audit Explanation → Survival Layer
Contribute to the repo Contributor → Quickstart

Layout

These docs follow Diátaxis:

  • Tutorials — learning-oriented, complete in 5–15 minutes.
  • How-to — task-oriented recipes for specific jobs.
  • Reference — information-oriented, exhaustive. Auto-generated from code.
  • Explanation — understanding-oriented design rationale.

Plus deep dives in Components, Environments, Harness internals, and Contributor docs.

A flat alphabetical index of every page lives at pages-index.md (auto-generated).

When docs and code disagree

Trust, in order:

  1. sb --help and subcommand help.
  2. Current code under brain/.
  3. Current tests under tests/.
  4. The active docs linked here.

Reference pages under docs/reference/ are regenerated from the live registriessb docs check (run by CI on every PR) fails the build if they drift. The CLI reference, providers table, and decision-namespace catalog are always current with the code on main.