Skip to content

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:

Terminal window
butterbase keys generate --substrate
export BUTTERBASE_API_KEY="bb_sk_..."

All commands accept --json to emit the raw API response (suitable for piping to jq).

List actions in the substrate ledger.

Terminal window
butterbase substrate ledger --status executed --capability send_email_draft --limit 25
butterbase substrate ledger --before 2026-05-28T00:00:00Z --json | jq '.actions[].id'

Propose a new action.

Terminal window
echo '{"to":"hello@example.com","subject":"hi","body":"hi"}' > payload.json
butterbase substrate propose send_email_draft --payload @payload.json --idempotency-key my-key-1

butterbase 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.

Terminal window
butterbase substrate approve act_01H...
butterbase substrate reject act_01H... --reason "policy mismatch"
Terminal window
butterbase substrate entities list --type person
butterbase substrate entities get ent_01H...
echo '{"display_name":"Renamed"}' > patch.json
butterbase substrate entities update ent_01H... --patch @patch.json

List and fetch source artifacts — meeting transcripts, email threads, call recordings, documents — that the substrate has extracted into durable memory.

Terminal window
butterbase substrate artifacts list --kind meeting_transcript --limit 25
butterbase substrate artifacts list --q "billing migration" --json | jq '.artifacts[].id'
OptionTypeDefault
--kind <k>stringall
--q <query>string (FTS over title+summary+content)none
--limit <n>int (1–200)50
--jsonflagtable output

Fetch a single artifact, including its full content.

Terminal window
butterbase substrate artifacts get art_01H...
butterbase substrate artifacts get art_01H... --json | jq -r '.content'

Full-text search across decisions, commitments, learnings, and source artifacts.

<query> is optional. When omitted, the command returns the most recent items across the selected kinds ordered by recency, capped by --limit.

Terminal window
# search with a query
butterbase substrate memory "OKR planning Q3" --limit 10
# list most recent items (no query)
butterbase substrate memory --limit 20
# require all words (default)
butterbase substrate memory "billing migration" --match and
# match any word
butterbase substrate memory "billing migration" --match or
# require adjacent words (phrase search)
butterbase substrate memory "billing migration" --match phrase
OptionTypeDefault
<query>string (FTS query; omit to list all)none
--match <mode>and | or | phraseand
--kinds <k,...>comma-separated: decisions, commitments, learnings, source_artifactsall
--limit <n>int (1–200)20
--jsonflagtable output

Each result row includes id, kind, title, body_text, rank (null when no query), updated_at, source_artifact_id, supersedes, and status.

{
"results": [
{
"id": "dec_01…",
"kind": "decision",
"title": "Adopt substrate",
"body_text": "agents need shared memory",
"rank": 0.18,
"updated_at": "2026-05-31T…",
"source_artifact_id": null,
"supersedes": null,
"status": "active"
}
]
}

Chronological browse across decisions, commitments, learnings, and source artifacts with structural filters. Results are ordered by updated_at DESC. There is no relevance ranking.

Terminal window
butterbase substrate memory-list --source-artifact-id art_01H... --kinds decisions,commitments,learnings --superseded false --limit 50
FlagTypeDefault
--kinds <k,...>comma-separated: decisions, commitments, learnings, source_artifactsall
--source-artifact-id <id>string — restrict to rows linked to this source artifact (source_artifact rows excluded when set)none
--superseded <bool>true | false — when false, excludes superseded decisions and expired commitmentsinclude all
--before <timestamp>ISO timestamp keyset cursor (paste next_before from a previous response)none
--limit <n>int (1–100)25
--jsonflagtable output
Terminal window
butterbase substrate outbox list --state pending
butterbase substrate outbox cancel ob_01H...
butterbase substrate outbox retry ob_01H...
Terminal window
butterbase substrate rules list --enabled
butterbase 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.json
butterbase substrate rules enable rule_01H...
butterbase substrate rules disable rule_01H...
butterbase substrate rules firings rule_01H... --limit 50
butterbase substrate rules delete rule_01H...

Daily state snapshots used by attention-rule conditions.

Terminal window
butterbase substrate snapshots --days 7
Terminal window
butterbase substrate settings show
butterbase substrate settings yolo on
butterbase substrate settings yolo off
  • Default: compact, human-readable table where applicable.
  • --json: raw HTTP response body. Useful for scripting.

If a command returns your active key is app-scoped, generate a substrate-scoped key:

Terminal window
butterbase keys generate --substrate