Create an agent

Create an agent in the environment. Only name and instructions are required — cadence defaults to manual, which runs only when triggered via POST /agents/{id}/runs. Scheduled cadences require their time fields: minute for hourly, plus hour for daily/weekdays, plus day_of_week for weekly.

post/agents

Request body

namestring required

Unique within the environment

descriptionstring
instructionsstring required

The standing prompt every run executes

modelstring

Explicit model override. Omit to follow the platform default.

cadence'manual' | 'hourly' | 'daily' | 'weekdays' | 'weekly'
hourinteger
minuteinteger
day_of_weekinteger

0 = Sunday

timezonestring

IANA timezone the schedule is evaluated in

activeboolean
handles_file_dropsboolean

At most one active agent per environment can have this enabled

delivery_enabledboolean
delivery_recipientsstring[]
delivery_file_patternstring

Response

Agent created

idstring uuid
namestring required

Unique within the environment

descriptionstring nullable
instructionsstring required

The standing prompt every run executes

modelstring

The model the agent runs on — resolved to the platform default when not set explicitly

cadence'manual' | 'hourly' | 'daily' | 'weekdays' | 'weekly'

manual agents only run when triggered (POST /agents/{id}/runs)

hourinteger nullable

Required for daily, weekdays, and weekly cadences

minuteinteger nullable

Required for every cadence except manual

day_of_weekinteger nullable

0 = Sunday. Required for weekly cadence

timezonestring

IANA timezone the schedule is evaluated in

activeboolean

Inactive agents are never scheduled but can still be run on demand

handles_file_dropsboolean

Whether this agent processes files dropped in the app. At most one active agent per environment can have this enabled.

delivery_enabledboolean

Email output files matching delivery_file_pattern to delivery_recipients after each completed run

delivery_recipientsstring[]
delivery_file_patternstring

Case-insensitive glob selecting which output files are delivered

next_run_atstring date-time nullable
last_run_atstring date-time nullable
created_atstring date-time
updated_atstring date-time

Changes