Runs

A run is one execution of a teammate or task. Use runs for direct messages, follow-ups, and real-time output.

Create a run

Use the context manager so the stream closes cleanly even if you exit early.

Python

Direct iteration is still supported:

Python

Stream text only

Python

Non-streaming

Follow up on a run

Follow-up messages create a new run that keeps context from the previous one.

Python

runs.reply() is always non-interactive. It does not enable AskUserQuestion, approval mode, or plan mode.

Run options

FieldTypeDefaultDescription
messagestring (required)n/aPrompt or instruction for the run
teammate_idintn/aExisting teammate to execute
streambooltrueStream events in real-time
toolsstring[]n/aOverride teammate tools for this run
user_idstringn/aEnd-user scope. See Users
memorybooltrueInclude saved per-user memory
historybooltrueInclude prior run context
task_setup_toolsbooltrueEnable the internal same-scope teammate, task, run, webhook, inbox, and app-management tools for this run
feedbackbooltrueEnable the internal issue-reporting feedback tool (report_issue) for this run
human_in_the_loopboolinheritedOmit to inherit false for autonomous and true for approval/plan
permission_modestringteammate defaultOverride the teammate default with autonomous, approval, or plan
email_inboxboolfalseEnable email inbox on the auto-created teammate. Only applies when creating a new teammate (not when providing teammate_id).

When email_inbox=true, the response includes email_address — forward emails to that address to trigger future runs.

Set task_setup_tools=False when you want a public API run to stay limited to the teammate's normal tools. Set feedback=False when you want to disable the internal issue-reporting feedback tool. Replies inherit both settings unless you override them.

For permission and approval flows, see Human-in-the-Loop.

Run statuses

StatusMeaning
runningRun is executing
pausedRun is paused by execution control flow
awaiting_approvalRun is paused for user input or approval
completedRun finished successfully
failedRun failed
cancelledRun was cancelled
closedRun is closed
archivedRun is archived

Run files

Runs can generate files. List and download them after execution.

Python

What's next