Create agent schedule
POST/v2/agents/:agent_key/schedules
Creates a schedule that runs an agent automatically at specified intervals. Each execution creates a new session with the configured message and metadata.
Use schedules for automated agent workflows such as daily reports, periodic monitoring, or regular data processing. The schedule tags each created session with metadata that identifies it as a scheduled execution.
Example request
\$ curl -X POST https://api.vectara.io/v2/agents/support-agent/schedules \
-H "Authorization: Bearer YOUR_API_KEY" \c
-H "Content-Type: application/json" \
-d '{
"key": "daily-report",
"name": "Daily Summary Report",
"message": [{"type": "text", "content": "Generate a summary of today's activities"}],
"schedule": {
"type": "interval",
"interval": "PT24H"
},
"session_metadata": {
"report_type": "daily"
}
}'
A successful response includes the unique schedule key, configuration, and creation timestamp.
Request
Responses
- 201
- 400
- 403
- 404
- 409
The created schedule, including the unique schedule key, interval, and timestamps.
The request is malformed or invalid.
Permissions do not allow creating schedules for this agent.
Referenced agent not found.
A schedule with the specified key already exists.