Skip to main content
POST
/
schedule
Create a new schedule
curl --request POST \
  --url https://api.example.com/schedule/ \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "name": "<string>",
  "cron_expression": "<string>",
  "agent_id": "<string>",
  "chat_model_config": {
    "type": "<string>",
    "credential_id": "<string>",
    "model": "<string>",
    "parameters": {}
  },
  "description": "",
  "timezone": "UTC",
  "enabled": true,
  "stateful": false,
  "permission_mode": "dont_ask"
}
'
{
  "schedule_id": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.agentscope.io/llms.txt

Use this file to discover all available pages before exploring further.

Headers

x-user-id
string
required

Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.

Body

application/json

Request body for creating a new schedule.

name
string
required

Display name of the schedule.

cron_expression
string
required

Standard 5-field cron expression, e.g. '0 9 * * 1-5'.

agent_id
string
required

Agent to run when the schedule fires.

chat_model_config
ChatModelConfig · object
required

Model configuration for the auto-created session.

description
string
default:""

Optional description.

timezone
string
default:UTC

IANA timezone name, e.g. 'America/New_York' or 'Asia/Shanghai'.

enabled
boolean
default:true

Whether the schedule is active immediately after creation.

stateful
boolean
default:false

If True, consecutive executions share the same session context.

permission_mode
enum<string>
default:dont_ask

Permission level for the agent during scheduled execution.

Available options:
default,
accept_edits,
explore,
bypass,
dont_ask

Response

Successful Response

Response body after creating a schedule.

schedule_id
string
required

Server-assigned schedule identifier.