/v1.
To create a session, send environment plus either agent_id (a saved agent) or agent (an inline configuration). input is optional; if present, it starts the first turn. Other optional fields are vault_ids and metadata. Use {"type":"none"} when no sandbox is needed.
Sessions
Session items and turns
Subagents and their history
Artifacts
Create and read a conversation:
Statuses
See turns and statuses for what each means.
Notes
GET .../turns lists subagent turns alongside the session’s own; they carry a non-null subagent_id, while session items list only the session’s own conversation. POST /agents/sessions/{session_id} updates metadata only. List sessions accepts agent_id, after, limit, order; history and artifact lists accept after, limit, order (artifacts also accept environment_id). A turn may still be in progress after session creation: inspect its status or subscribe to events. Artifact content is binary, not a JSON resource. Deleting a session does not delete its saved agent.