Session Activity
The turns, tool calls, and events that make up a session's transcript, and the call that ends it. Each item is appended in order; existing items cannot be edited or removed.
Append turn
Add a message to the session transcript. Token counts are added to the session totals, and `timestamp` is in Unix seconds, defaulting to now. Requires the `agentic-runtime-service:session:update` scope.
Append tool call
Record a tool the agent called. Use `success`, `error`, or `pending` for `status`, as only `success` counts towards the tool success rate; `input` and `output` take any JSON, including null. Requires the `agentic-runtime-service:session:update` scope.
Append event
Record a diagnostic event against the session, for example an `eventType` of `info` or `error`. Requires the `agentic-runtime-service:session:update` scope.
End session
Mark the session `complete` and return it under `data.session`. Every body field is optional, but a body is required, so send `{}` to end the session without a summary or score. `endedAt` is in Unix seconds and defaults to now. Requires the `agentic-runtime-service:session:update` scope.