Create a routine — scheduled agent execution [write]

Changed on

initial_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).

post/routines

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/routines
  • Auth
    HTTP bearer

Headers

Idempotency-Keystring

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

namestring required
descriptionstring
metadataobject

Response

Created

Changes

    • info

      added the new optional header request parameter Idempotency-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