Skip to main content
Version: 2.0

Create agent schedule

POST 

/v2/agents/:agent_key/schedules

Supported API Key Type:
Personal

Create a new schedule for automatically executing an agent at specified intervals. Each execution creates a new session with the configured message and metadata.

Schedules enable automated agent workflows such as daily reports, periodic monitoring, or regular data processing. The schedule will create sessions tagged with metadata to identify them as scheduled executions.

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

The response includes the complete schedule configuration including the unique schedule key, interval, and timestamps.