sessions

Hand this session's context to another agent [write]

Changed on

Accepted immediately; the move runs in the background. Poll the status_url in the response (also sent as the Location header) until status is terminal, then talk to target_session. target_agent is an agent id or a catalog @handle; llm and reasoningEffort choose the new session's model and thinking level. last_message_id bounds how much history is carried; omitted = all of it. The Idempotency-Key header is required and dedupes retries.

post/sessions/{id}/handoff

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/sessions/{id}/handoff
  • Auth
    HTTP bearer

Path parameters

idstring required

The source session id (sess_…)

Headers

Idempotency-Keystring required

Required; a retry with the same key returns the same hand-off instead of starting another.

Request body

target_agentstring required

The agent to continue with: an agent id, or "@handle" for an agent from the catalog

last_message_idstring
llmstring

The new session's model; omitted = the target agent's model

reasoningEffort'none' | 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'ultra' nullable

The new session's thinking level; omitted or null = the target agent's

Response

Accepted — poll status_url

Changes

    • breaking

      added the new required 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

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status