Skip to main content
POST
Create Agent Run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string
required

Body

multipart/form-data
message
string
required

The input message or prompt to send to the agent

stream
boolean
default:true

Enable streaming responses via Server-Sent Events (SSE)

session_id
string | null

Session ID for conversation continuity. If not provided, a new session is created

user_id
string | null

User identifier for tracking and personalization

files
string[] | null

Files to upload (images, audio, video, or documents)

version
string | null

Agent version to use for this run

background
boolean
default:false

Run in background and return immediately with run metadata (requires database)

factory_input
string | null

JSON object with factory-specific parameters for dynamic agent construction

Response

Agent run executed successfully

run_id
string
required

Unique identifier for the run

parent_run_id
string | null

Parent run ID if this is a nested run

agent_id
string | null

Agent ID that executed this run

user_id
string | null

User ID associated with the run

status
string | null

Run status (PENDING, RUNNING, COMPLETED, ERROR, etc.)

run_input
string | null

Input provided to the run

content

Output content from the run

run_response_format
string | null

Format of the response (text/json)

reasoning_content
string | null

Reasoning content if reasoning was enabled

reasoning_steps
Reasoning Steps · object[] | null

List of reasoning steps

metrics
Metrics · object | null

Performance and usage metrics

messages
Messages · object[] | null

Message history for the run

tools
Tools · object[] | null

Tools used in the run

events
Events · object[] | null

Events generated during the run

created_at
string<date-time> | null

Run creation timestamp

references
References · object[] | null

References cited in the run

citations
Citations · object | null

Citations from the model (e.g., from Gemini grounding/search)

reasoning_messages
Reasoning Messages · object[] | null

Reasoning process messages

session_state
Session State · object | null

Session state at the end of the run

images
Images · object[] | null

Images included in the run

videos
Videos · object[] | null

Videos included in the run

audio
Audio · object[] | null

Audio files included in the run

files
Files · object[] | null

Files included in the run

response_audio
Response Audio · object | null

Audio response if generated

input_media
Input Media · object | null

Input media attachments

followups
string[] | null

Followup suggestions generated after the run

forked_from_run_id
string | null

If this run was forked from another run, the source run's ID

forked_from_message_index
integer | null

If this run was forked, the message index at which the source was truncated

forked_from_session_id
string | null

If this run was created via session branch, the source session's ID

regenerated_from
string | null

If this run was produced via regenerate=true, the source run's ID

last_checkpoint_at_message_index
integer | null

Message index of the most recent mid-run checkpoint (checkpoint='tool-batch' runs)