butterbase substrate
butterbase substrate
Section titled “butterbase substrate”The butterbase substrate command group gives you scriptable access to the Butterbase substrate: the per-user memory + action coordination plane that backs your AI agents.
It uses your active Butterbase API key. The key must be substrate-scoped — generate one with:
butterbase keys generate --substrateexport BUTTERBASE_API_KEY="bb_sk_..."All commands accept --json to emit the raw API response (suitable for piping to jq).
Action ledger
Section titled “Action ledger”butterbase substrate ledger
Section titled “butterbase substrate ledger”List actions in the substrate ledger.
butterbase substrate ledger --status executed --capability send_email_draft --limit 25butterbase substrate ledger --before 2026-05-28T00:00:00Z --json | jq '.actions[].id'butterbase substrate propose <capability>
Section titled “butterbase substrate propose <capability>”Propose a new action.
echo '{"to":"hello@example.com","subject":"hi","body":"hi"}' > payload.jsonbutterbase substrate propose send_email_draft --payload @payload.json --idempotency-key my-key-1butterbase substrate approve <id> / butterbase substrate reject <id> [--reason]
Section titled “butterbase substrate approve <id> / butterbase substrate reject <id> [--reason]”Approve or reject a pending action.
butterbase substrate approve act_01H...butterbase substrate reject act_01H... --reason "policy mismatch"Entities
Section titled “Entities”butterbase substrate entities list --type personbutterbase substrate entities get ent_01H...echo '{"display_name":"Renamed"}' > patch.jsonbutterbase substrate entities update ent_01H... --patch @patch.jsonMemory
Section titled “Memory”Full-text search across decisions, commitments, learnings, and principles.
butterbase substrate memory "OKR planning Q3" --limit 10Outbox
Section titled “Outbox”butterbase substrate outbox list --state pendingbutterbase substrate outbox cancel ob_01H...butterbase substrate outbox retry ob_01H...Attention rules
Section titled “Attention rules”butterbase substrate rules list --enabledbutterbase substrate rules get rule_01H...
echo '{ "name": "weekly digest", "trigger_cron": "0 9 * * 1", "condition_mode": "snapshot_predicate", "condition": { ">": [{ "var": "entity_count" }, 0] }, "action_capability": "send_email_draft", "action_payload_template": { "to": "me@example.com", "subject": "Weekly digest", "body": "{{entity_count}} entities." }}' > rule.json
butterbase substrate rules create --file @rule.jsonbutterbase substrate rules enable rule_01H...butterbase substrate rules disable rule_01H...butterbase substrate rules firings rule_01H... --limit 50butterbase substrate rules delete rule_01H...Snapshots
Section titled “Snapshots”Daily state snapshots used by attention-rule conditions.
butterbase substrate snapshots --days 7Settings
Section titled “Settings”butterbase substrate settings showbutterbase substrate settings yolo onbutterbase substrate settings yolo offOutput formats
Section titled “Output formats”- Default: compact, human-readable table where applicable.
--json: raw HTTP response body. Useful for scripting.
Authentication errors
Section titled “Authentication errors”If a command returns your active key is app-scoped, generate a substrate-scoped key:
butterbase keys generate --substrate