Skip to main content
POST
/
v1
/
agents
/
sessions
/
{sessionId}
/
turns
/
{turnId}
/
subscribe
Error
A valid request URL is required to generate request examples
{
  "type": "model.message",
  "id": "<string>",
  "thread_id": "<string>",
  "created_at": "<string>",
  "content": "<string>",
  "name": "<string>",
  "refusal": "<string>",
  "reasoning_content": "<string>",
  "tool_calls": [
    {
      "id": "<string>",
      "type": "function",
      "function": {
        "name": "<string>",
        "arguments": "<string>"
      },
      "tool_info": {
        "type": "truefoundry-system",
        "name": "<string>"
      },
      "provider_specific_fields": {}
    }
  ],
  "usage": {
    "input_tokens": 1,
    "output_tokens": 1,
    "input_tokens_breakdown": {
      "harness": 1,
      "skills": 1,
      "instructions": 1,
      "tool_definitions": 1,
      "messages": 1
    },
    "cache_read_tokens": 1,
    "cache_write_tokens": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sessionId
string
required

Session identifier (.).

Minimum string length: 1
Example:

"01arz3ndektsv4rrffq69g5fav.g"

turnId
string
required

Turn identifier (..).

Minimum string length: 1
Example:

"01arz3ndektsv4rrffq69g5fav.g.ab12cd"

Body

application/json

Optional after_sequence_number to resume from (exclusive — events after this sequence_number). When omitted, Last-Event-Id is used if present.

after_sequence_number
integer
Required range: x >= 0

Response

Server-Sent Events stream of turn events (deltas and lifecycle).

type
enum<string>
required
Available options:
model.message
id
string
required

Unique identifier for the event

thread_id
string
required
created_at
string
required
content
name
string
refusal
string | null
reasoning_content
string
tool_calls
object[]
finish_reason
enum<string> | null
Available options:
stop,
length,
tool_calls,
content_filter,
function_call
usage
object