Run Lifecycle
Every run moves through these statuses:Cancellation is only supported for runs created via
/run-async, /run-batch, or /run-sse. Runs created via the synchronous /run endpoint cannot be cancelled because the request blocks until completion. Request/response shape and idempotency behavior: Runs Reference.Watching Runs Live
Every run includes astreaming_url where you can watch the browser execute in real time — useful for debugging, demos, or showing users what’s happening behind the scenes. It’s available while the run is active; once the run reaches a terminal status, switch to video_url from the run object to access the recording instead.
Understanding COMPLETED Status
Always check theresult field:
Goal succeeded:
error field covers the other case — when the infrastructure itself fails, error.category tells you how to react: SYSTEM_FAILURE is a TinyFish issue (retry after retry_after), AGENT_FAILURE means the input needs fixing, BILLING_FAILURE means the run was rejected at the billing check before it started — add money at agent.tinyfish.ai/wallet (minimum top-up $10), or add credits on a legacy account — and UNKNOWN should be treated as retryable. Full run object and error object field list: Runs Reference.
Runs can also use vault credentials for authenticated automation. Pass use_vault: true and optionally credential_item_ids when creating a run to let TinyFish log into sites using your connected password manager.
Agent Mode and Limits
agent_config controls how the agent behaves (mode) and how far it’s allowed to go (max_steps,
max_duration_seconds) — see Agent Mode, Max Steps, and Max Duration
for when to use each.
Handling Run Results
Use this pattern to handle both infrastructure failures and goal failures in your code.Related
Runs Reference
List, get, cancel, batch, and per-step screenshots/HTML — full schema
Endpoints
Choose sync, async, batch, or streaming
Agent Mode, Max Steps, and Max Duration
Default vs Strict mode, step and time limits
Error Codes
Handle errors gracefully
Vault Credentials
Use password manager credentials in runs