Skip to main content
Agent execution example showing processing workflow Agent execution example showing processing workflow A saved agent takes name as agent-name:version. A one-off run takes config and omits name. inputs is required. The response includes execution_id. Poll until status is completed, failed, or cancelled.

Configuration Options

Input Modalities

Keys match the agent input schema. Keys are arbitrary. Examples: file, document, reference_image, instruction. Each value is a MessageContent item. type selects the modality. One request can mix modalities. A non-media slot can be a JSON primitive: string, number, boolean, array, or object. Examples: an email_body string, an order_id integer, or a metadata object.
Validate each inputs slot with Pydantic (Python) or Zod (Node.js) before the request is sent. Examples: Multi-modal Inputs.

Generic example: all input types in one request

Document (PDF / Word / file URL)

Document (uploaded via Files API)

Upload the file. Pass the returned file.id as input_file.

Image + text instruction

Video / audio

Combining multiple modalities

Image detail, typed Pydantic and Zod models, and multi-modal chat: Multi-modal Inputs.

Example: Execute Agent by Name

Response Format

Example: Execute with Inline Prompt

Omit name. Pass config.prompt.

Response Format

Checking Execution Status

Response Format (Completed)

Complete Workflow Example

Example Output

Response Fields

execution_mode

How program runs: Program Execution.

Execution Statuses

Retrieving Artifacts

An execution can return images, videos, or documents. The response uses object refs such as ImageRef and VideoRef. Fetch them with the execution id.

Artifacts Guide

Supported types and retrieval.

Best Practices

  • File formats: PDF, PNG, or JPEG.
  • File size: Under 20MB.
  • Polling: Every 2-5 seconds.
  • Errors: Check status. Handle failed.
  • Batches: Run concurrent executions for a large batch.

Monitor Executions

All executions in the dashboard.