Reference brains
Two complete examples ship in the repo, both pkg/bb-only — exactly as an external author writes them, no internal shortcuts.
cmd/jarvis-demo — the runnable smart-home brain
Chosen because it exercises both differentiators — memory and initiative — with the fewest heavy dependencies. Runs over a self-contained dummy world (sensors, devices, a notification sink), with no API key required.
- A keyword router into capabilities: talk / remember / recall / house / briefing.
- Memory kept across turns via
bb.FileStore. - A
Group-based briefing that reads several sensors concurrently. - A
Notifyflow that fires after the reply. - Durable execution and a jsonl trace.
go run ./cmd/jarvis-demo # smart-home brain: world on :8090, brain on :8080cmd/marvis-demo — the API "goal post"
The program the pkg/bb API was designed to make read well — an intent router that classifies each message with a model + typed schema, then Selects a capability. If you want to see the smallest correct multi-flow brain, annotated line by line, start here.
- An intent-discovery agent with a typed schema (
enum-constrained intent field). Selectdispatches totalk/remember/recall/list/house.- Demonstrates both tagged and inline model construction side by side.
Building on these
Both are a good starting skeleton to fork for a new brain: copy the main.go structure, swap the persona and capability flows, and keep the model-registration and Serve wiring as-is until you have a concrete reason to change it.