Pattern 1 — same-host agent
An AI agent or script running on the same machine asbreadbox serve. The CLI talks to http://localhost:8080 over loopback; no exposed network surface.
1
Mint a scoped key
From the dashboard or via the CLI, mint a key with the The plaintext key is returned once — store it in the agent’s secret manager.
agent actor type so the audit trail shows what the agent did:2
Wire the key into the agent
Pass the key as Or save it to the CLI’s host file:
BREADBOX_TOKEN and BREADBOX_HOST on the agent’s environment:3
Drive Breadbox
Every CLI command “just works”:
Pattern 2 — remote agent (lite CLI)
An agent running on a different machine — a VPS, a phone, a corporate workstation, a cloud function. Use the lite build (breadbox-cli) so there’s no server code on the agent host at all.
1
Build or download the lite binary
breadbox-cli to the agent host (single static binary, no dependencies).2
Mint a key on the server
From an authenticated session on the Breadbox host:Or use the device-code flow (no operator copy-paste of secrets):
3
Drive Breadbox from anywhere
Pattern 3 — scheduled jobs and CI
The CLI shines in cron, systemd timers, GitHub Actions, and any other “fire a command on a schedule” surface.Cron — nightly sync
--quiet suppresses table output. The exit code (0 success, 4 server down, etc.) is still set, so logger only fires on failure.
Systemd — breadbox doctor health check
node_exporter can scrape.
GitHub Actions — export transactions to a private repo
Authentication recipes
- One agent, many hosts
- Many agents, one host
- Ephemeral CI
Add each host once; switch with
--host:Error handling
Branch on exit codes — they’re the cheapest way to distinguish “retry” from “give up”:
See Output and exit codes for the full table.
Connection link in agent flows
breadbox connections link --wait is the canonical way an agent helps a user add a new bank:
0.
If the agent only needs to mint the URL — letting a separate process handle the polling — omit --wait and call breadbox connections link get <session-id> periodically.
Next steps
Agent automation
Scheduled agents, runs, and the agent SDK smoke test.
Multi-agent reviewer guide
A worked example chaining multiple agents over the same CLI surface.