AiSession
A session as a response carries it — never its lease.
Shape
- cost_microsinteger · int64Settled spend, fee included, in micro-dollars.
- created_atstring · date-time
- org_idAiOrgId (string · uuid)
- root_group_idGroupId (string · uuid)The top-level group whose organization it ran in.
- session_idAiSessionId (string · uuid)
- stateAiSessionStatequeuedrunningwaiting_gatewaiting_personcompletedfailedcancelledhalted
subjectSessionSubject
- The SessionSubject schema
- addressstring or nulloptionalThe address acted on —
acme/api#412,acme/api!87— when the session has one. - started_bystring or nulloptionalThe person or account whose action started the session, when one did.
- trigger_kindAiTriggerKindassignmentreview_requestreview_feedbackmentionchannel_messageritualpipeline_failuretracker_eventgate_decisionhandoffcontinuationproposalmanualprofile_draftWhat started a session.
- turnsinteger · int32
- agent_idAgentId (string · uuid) or nulloptional
- branchstring or nulloptional
- ended_atstring · date-time or nulloptional
- instructionSessionInstruction (string) or nulloptional
- model_idAiModelKey (string) or nulloptional
- outcomeAiSessionOutcomemerge_request_openedreview_submittedwork_item_updatedmessage_postedproposal_writtenescalatedno_actionbudget_exhaustedrefusederrortaken_overor nulloptional
- repository_idRepositoryId (string · uuid) or nulloptionalThe repository the session works on, when it works on one.
- revision_numberinteger · int64 or nulloptionalThe revision it pinned at start; absent only for a platform session started before any revision was published.
- started_atstring · date-time or nulloptional
- summarystring or nulloptionalThe agent's own account of the session.
Example
Synthesized example{
"cost_micros": 24,
"created_at": "2026-10-13T15:33:39Z",
"org_id": "3e231614-fa4a-4e15-9f90-08739d4d293c",
"root_group_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"session_id": "424fec3b-f4cb-42de-83bf-0e5b2da2e6c4",
"state": "queued",
"subject": {
"address": "address-ab5c",
"started_by": "b7e2d1c0-9f8e-4d7c-a6b5-c4d3e2f1a0b9"
},
"trigger_kind": "assignment",
"turns": 50,
"agent_id": "4fb27f0d-5776-4922-98a1-45c3ab253678",
"branch": "refactor/brand-inline",
"ended_at": "2026-10-15T13:26:58Z",
"instruction": "instruction-834c",
"model_id": "4ab86db5-9659-47a1-a77f-a4973a8c7366",
"outcome": "merge_request_opened",
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"revision_number": 86,
"started_at": "2026-10-15T05:19:55Z",
"summary": "summary-9cbd"
}
Graph
Contains
Used by
Sent by 0 operations
No operation takes it as a request body.
Returned by 6 operations
- POSTStart an agent on a subject. The session is queued until the organization can run it./ai-agents/{agent_id}/sessions
- GETOne session: its summary, outcome, cost and branch./ai-sessions/{session_id}
- POSTCancel a session: it ends at its next step./ai-sessions/{session_id}/cancel
- POSTGive a running session a new instruction./ai-sessions/{session_id}/instructions
- POSTTake a session's work over yourself./ai-sessions/{session_id}/take-over
- GETThe organization's sessions, newest first./groups/{group_id}/ai-org/sessions