Skip to main content
POST
Create Schedule

Path Parameters

agent_id
string
required

Body

application/json

Request model for creating a new schedule for an agent

name
string
required

Human-readable name for the schedule (e.g., 'weekly-profiling'). Will be combined with agent_id to form the full schedule_id.

Required string length: 1 - 64
Pattern: ^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$
workflow_name
string
required

Name of the Temporal workflow to execute (e.g., 'sae-orchestrator')

task_queue
string
required

Temporal task queue where the agent's worker is listening

workflow_params
Workflow Parameters · object | null

Parameters to pass to the workflow

cron_expression
string | null

Cron expression for scheduling (e.g., '0 0 * * 0' for weekly on Sunday)

interval_seconds
integer | null

Alternative to cron - run every N seconds

Required range: x >= 1
execution_timeout_seconds
integer | null

Maximum time in seconds for each workflow execution

Required range: x >= 1
start_at
string<date-time> | null

When the schedule should start being active

end_at
string<date-time> | null

When the schedule should stop being active

paused
boolean
default:false

Whether to create the schedule in a paused state

Response

Successful Response

Response model for schedule operations

schedule_id
string
required

Unique identifier for the schedule

name
string
required

Human-readable name for the schedule

agent_id
string
required

ID of the agent this schedule belongs to

state
enum<string>
required

Current state of the schedule

Available options:
ACTIVE,
PAUSED
action
Action · object
required

Information about the scheduled action

spec
Spec · object
required

Schedule specification

num_actions_taken
integer
default:0

Number of times the schedule has executed

num_actions_missed
integer
default:0

Number of scheduled executions that were missed

next_action_times
string<date-time>[]

Upcoming scheduled execution times

last_action_time
string<date-time> | null

When the schedule last executed

created_at
string<date-time> | null

When the schedule was created