The Dwolla CLI is built to be driven by AI coding agents as well as humans. When it detects that it's running inside an agent, it switches to agent mode: token-efficient structured output, machine-readable errors with recovery hints, and no interactive prompts.
Agent mode turns on automatically when any of these environment variables is set
to a truthy value (1, true, or yes):
| Env var | Agent |
|---|---|
CLAUDE_CODE |
Claude Code |
CURSOR_AGENT |
Cursor |
CODEX |
OpenAI Codex |
AIDER |
Aider |
CLINE |
Cline |
WINDSURF_AGENT |
Windsurf |
GITHUB_COPILOT |
GitHub Copilot |
AMAZON_Q |
Amazon Q |
GEMINI_CODE_ASSIST |
Gemini Code Assist |
SRC_CODY |
Sourcegraph Cody |
FORCE_AGENT_MODE |
Force it on in any environment |
You can also control it explicitly with the global --agent-mode flag, which
overrides auto-detection:
FORCE_AGENT_MODE=1 dwolla customers list # force on
CLAUDE_CODE=1 dwolla customers list --agent-mode=false # force off despite detection- Default output becomes TOON. Without an explicit
--output-format, agent mode emits TOON — a compact, token-efficient structured format. Override per-command with-o json,-o yaml, etc. - Errors become structured JSON on stderr with a machine-readable type and recovery hints (see below).
- Interactive features are disabled. No auto-prompting, no explorer
auto-launch, no TUI forms — the same as passing
--no-interactive. - No color codes are emitted, so output stays clean when captured.
TOON (Token-Oriented Object Notation) encodes the same data as JSON in fewer tokens. Example:
CLAUDE_CODE=1 dwolla workflows listTo get plain JSON instead — for piping into jq or a parser — request it
explicitly:
CLAUDE_CODE=1 dwolla workflows list -o json --jq '.[].name'In agent mode, failures are printed once to stderr as a JSON envelope and the
process exits non-zero. The envelope always includes an error_type and
message, and usually hints — concrete next actions an agent can take.
{
"error": "authentication failed (401)",
"error_type": "authentication_error",
"message": "authentication failed (401)",
"hints": [
"Set credentials via environment variables or CLI flags",
"Run 'dwolla whoami' to check current authentication status"
]
}Error types map from the HTTP status of the failed call:
error_type |
Cause |
|---|---|
authentication_error |
401 |
authorization_error |
403 |
not_found |
404 |
validation_error |
400 / 422 |
rate_limit_error |
429 |
server_error |
5xx |
connection_error |
network failure (status 0) |
api_error |
any other non-2xx |
- Prefer JSON +
--jqwhen you need to extract a specific value:dwolla customers list -o json --jq '.[0].id'. - Use
--dry-runto preview a mutating request (including workflow step plans) before executing it — the hints for422/400errors suggest this. - Use
dwolla whoamito confirm which credentials and environment are active before running commands. - Paginate lists with
--limitand--offset(e.g.dwolla events list --limit 25 --offset 0) and extract fields with-o json --jqrather than parsing pretty output.
- Command reference — every command and flag.
- Workflows guide — multi-step sandbox scenarios, all JSON/TOON-friendly.