Create a routine — scheduled agent execution [write]
Changed oninitial_events (1–50 user.message events) are delivered on every fire. target picks the mode: new_session creates a fresh session per run, or with reuse_session: true one session that every run continues; session sends the turn into an existing session (busy target → failed run session_busy_error). schedule is a 5-field POSIX cron with an IANA timezone; omit it for a manual-run-only routine. budget bounds each run separately. The answer carries effective_deliver_to: where each run's result goes (metadata created_in_session names the conversation the routine was made in, which receives results by default).
Request
- Base URLhttps://api.agentsky.dev/v1
- URLhttps://api.agentsky.dev/v1/routines
- AuthHTTP bearer
Headers
A repeat with the same key returns the first routine instead of creating another; the same key with a different body is 409 idempotency_conflict.
Request body
Response
Created
Changes
- info
added the new optional
headerrequest parameterIdempotency-Key - info
added the new optional request property
// - info
added the new optional request property
// - info
added the optional property
to the response with the status - info
added the optional property
/to the response with the status - info
the response property
became required for the status - info
the response property
/became required for the status - info
the response property
/became required for the status
- info