For the complete documentation index, see llms.txt. This page is also available as Markdown.

Traces

Get Trace Content Policy

get

What this deployment keeps of agent sessions, and who besides a session's owner can open it.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Responses
200

Successful Response

application/json

What this deployment keeps of agent sessions, and who besides a session's owner can open it.

content_availablebooleanRequired

Whether this deployment lets a workspace keep what its agent sessions were about. A workspace keeps it only once its managers turn it on as well.

platform_break_glassbooleanRequired

Whether the deployment's operator may open any organization's session content without its owner's share, recorded with a reason and a reference.

retention_daysintegerRequired

Days after its last activity that a session, with what it was about and its shares, is deleted.

session_max_age_daysintegerRequired

Days after it started that a session is deleted, however active it still is.

tool_outputbooleanRequired

Whether content also keeps what each tool returned, on a request routed through the gateway. Never true where content_available is false.

get/api/v1/trace-content/policy
GET /api/v1/trace-content/policy HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "content_available": true,
  "platform_break_glass": true,
  "retention_days": 1,
  "session_max_age_days": 1,
  "tool_output": true
}

List Traces

get

List agent sessions, most recently active first unless sort says otherwise.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Query parameters
skipintegerOptionalDefault: 0
limitinteger · min: 1 · max: 100OptionalDefault: 50
sortstring · enumOptional

What to order by. Latency runs from a session's start to its last activity.

Default: last_activityPossible values:
orderstring · enumOptional

The direction of sort.

Default: descPossible values:
workspace_idstring · uuid · nullableOptional

Only sessions in this workspace. Narrows the caller's scope; never widens it.

startstring · date-time · nullableOptional

Sessions active at or after this instant (ISO 8601).

endstring · date-time · nullableOptional

Sessions started before this instant (ISO 8601).

user_idstring[] · max: 50 · nullableOptional

Owning users.

api_key_idstring[] · max: 50 · nullableOptional

API keys.

modelstring[] · max: 50 · nullableOptional

Sessions with an LLM call recorded under any of these model ids (exact match).

harnessstring[] · max: 50 · nullableOptional

Agent harnesses.

has_errorboolean · nullableOptional

Only sessions with, or without, an unrecovered error.

qstring · max: 128 · nullableOptional

Part of a trace id, session name, harness or user id, in any case.

Responses
200

Successful Response

application/json
has_morebooleanRequired
get/api/v1/traces
GET /api/v1/traces HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "has_more": true,
  "items": [
    {
      "api_key_id": "text",
      "cost": 1,
      "error_count": 1,
      "harness": "text",
      "input_tokens": 1,
      "last_activity_at": "2026-01-01T00:00:00.000Z",
      "name": "text",
      "output_tokens": 1,
      "session_source": "client",
      "span_count": 1,
      "started_at": "2026-01-01T00:00:00.000Z",
      "step_count": 1,
      "trace_id": "text",
      "user_id": "text",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

List Break Glass Reads

get

The operator's recorded break-glass openings, in any organization, newest first.

An organization owner's openings are listed for that organization's owners alone, at GET /organizations/me/traces/audit/break-glass: their reasons can name the people under investigation, which is no business of the operator's.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Query parameters
skipintegerOptionalDefault: 0
limitinteger · min: 1 · max: 100OptionalDefault: 50
Responses
200

Successful Response

application/json
has_morebooleanRequired
get/api/v1/traces/audit/break-glass
GET /api/v1/traces/audit/break-glass HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "has_more": true,
  "items": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "kind": "organization",
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "read_at": "2026-01-01T00:00:00.000Z",
      "reader_email": "text",
      "reader_user_id": "123e4567-e89b-12d3-a456-426614174000",
      "reason": "text",
      "reference": "text",
      "session_user_id": "text",
      "trace_id": "text",
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

Count Traces

get

Count the agent sessions that match.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Query parameters
workspace_idstring · uuid · nullableOptional

Only sessions in this workspace. Narrows the caller's scope; never widens it.

startstring · date-time · nullableOptional

Sessions active at or after this instant (ISO 8601).

endstring · date-time · nullableOptional

Sessions started before this instant (ISO 8601).

user_idstring[] · max: 50 · nullableOptional

Owning users.

api_key_idstring[] · max: 50 · nullableOptional

API keys.

modelstring[] · max: 50 · nullableOptional

Sessions with an LLM call recorded under any of these model ids (exact match).

harnessstring[] · max: 50 · nullableOptional

Agent harnesses.

has_errorboolean · nullableOptional

Only sessions with, or without, an unrecovered error.

qstring · max: 128 · nullableOptional

Part of a trace id, session name, harness or user id, in any case.

Responses
200

Successful Response

application/json
countintegerRequired
get/api/v1/traces/count
GET /api/v1/traces/count HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "count": 1
}

Trace Of Request

get

The session a gateway request was traced into, by the Otari-Request-ID it was sent.

The usage log's request_group_id is that id, so a request log row opens its session here. A request outside the scope, or with no trace stored, is a 404.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
request_idstringRequired
Responses
200

Successful Response

application/json

One agent session as the session list shows it.

api_key_idstring · nullableRequired
costnumberRequired

USD, a snapshot of the usage rows' cost. Usage stays the billing record.

error_countintegerRequired

Spans that ended in an error no fallback recovered, including tools' errors, which do not fail the session.

harnessstring · nullableRequired

The agent or client that sent the requests, from its User-Agent.

input_tokensintegerRequired
last_activity_atstring · date-timeRequired
namestring · nullableRequired
output_tokensintegerRequired
session_sourcestring · enumRequired

What grouped the session's requests: the client's own id, its agent harness's id, an OTLP conversation id, or nothing (a single request).

Possible values:
span_countintegerRequired
started_atstring · date-timeRequired
step_countintegerRequired

Requests the gateway served in the session.

trace_idstringRequired
user_idstring · nullableRequired
workspace_idstring · uuidRequired
get/api/v1/traces/requests/{request_id}
GET /api/v1/traces/requests/{request_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "api_key_id": "text",
  "cost": 1,
  "error_count": 1,
  "harness": "text",
  "input_tokens": 1,
  "last_activity_at": "2026-01-01T00:00:00.000Z",
  "name": "text",
  "output_tokens": 1,
  "session_source": "client",
  "span_count": 1,
  "started_at": "2026-01-01T00:00:00.000Z",
  "step_count": 1,
  "trace_id": "text",
  "user_id": "text",
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
}

Trace Series

get

Count the sessions active in each bucket, split by whether they failed.

A session is active from its start to its last activity, so a long one counts in every bucket it ran through. Here start and end bound the buckets: a session that began before start or was still active at end counts in the buckets between them it overlaps. Buckets are aligned to their size in UTC and only the populated ones are returned. A session failed when it holds an unrecovered error other than a tool's. A tool's error goes back to the model, an MCP tool's included, so a session whose only errors are tools' counts as succeeded.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Query parameters
bucketstring · enumOptionalDefault: hourPossible values:
workspace_idstring · uuid · nullableOptional

Only sessions in this workspace. Narrows the caller's scope; never widens it.

startstring · date-time · nullableOptional

Sessions active at or after this instant (ISO 8601).

endstring · date-time · nullableOptional

Sessions started before this instant (ISO 8601).

user_idstring[] · max: 50 · nullableOptional

Owning users.

api_key_idstring[] · max: 50 · nullableOptional

API keys.

modelstring[] · max: 50 · nullableOptional

Sessions with an LLM call recorded under any of these model ids (exact match).

harnessstring[] · max: 50 · nullableOptional

Agent harnesses.

has_errorboolean · nullableOptional

Only sessions with, or without, an unrecovered error.

qstring · max: 128 · nullableOptional

Part of a trace id, session name, harness or user id, in any case.

Responses
200

Successful Response

application/json
bucketstring · enumRequiredPossible values:
get/api/v1/traces/series
GET /api/v1/traces/series HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "bucket": "1m",
  "points": [
    {
      "bucket": "text",
      "failed": 1,
      "succeeded": 1
    }
  ]
}

Get Trace

get

One agent session: its turns, and every span inside them.

A trace outside the scope is a 404. Without workspace_id, an id in more than one of the caller's workspaces is a 409 rather than a guess.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
trace_idstringRequired
Query parameters
workspace_idstring · uuid · nullableOptional

The workspace the trace is in, as its list entry names it.

Responses
200

Successful Response

application/json
content_accessstring · enumOptional

How this read reached the session's content: 'owner' for its own user, 'share' through a share its user made, 'break_glass' for a recorded opening without one, 'none' otherwise.

Default: nonePossible values:
statestring · enumRequiredPossible values:
truncatedbooleanRequired

True when the session holds more spans than one read returns.

get/api/v1/traces/{trace_id}
GET /api/v1/traces/{trace_id} HTTP/1.1
Otari-Key: YOUR_API_KEY
Accept: */*
{
  "content_access": "none",
  "content_share": {
    "active": true,
    "audience": "organization_admins",
    "created_at": "2026-01-01T00:00:00.000Z",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "note": "text",
    "read_count": 0,
    "reads": [
      {
        "read_at": "2026-01-01T00:00:00.000Z",
        "reader_email": "text",
        "reader_user_id": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "revoked_at": "2026-01-01T00:00:00.000Z"
  },
  "gates": [
    {
      "blocked": 1,
      "enforcement": "required",
      "flagged": 1,
      "gate_id": "text",
      "gate_type": "text",
      "message": "text",
      "origin": "repo",
      "passed": 1,
      "refused": 1,
      "runs": [
        "text"
      ],
      "span_id": "text",
      "undecided": 1
    }
  ],
  "spans": [
    {
      "approximate": true,
      "attributes": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "cache_read_tokens": 1,
      "cache_write_tokens": 1,
      "content": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "content_private": false,
      "context_window": 1,
      "cost": 1,
      "duration_ms": 1,
      "end_time": "2026-01-01T00:00:00.000Z",
      "error_class": "text",
      "input_tokens": 1,
      "kind": "text",
      "model": "text",
      "name": "text",
      "opens_turn": true,
      "operation": "text",
      "origin": "gateway",
      "otel_span_id": "text",
      "otel_trace_id": "text",
      "outcome": "ok",
      "output_tokens": 1,
      "parent_span_id": "text",
      "provider": "text",
      "reasoning_tokens": 1,
      "recovered": true,
      "request_id": "text",
      "span_id": "text",
      "start_time": "2026-01-01T00:00:00.000Z",
      "tool_call_id": "text",
      "tool_name": "text",
      "tool_type": "text"
    }
  ],
  "state": "active",
  "summary": {
    "api_key_id": "text",
    "cost": 1,
    "error_count": 1,
    "harness": "text",
    "input_tokens": 1,
    "last_activity_at": "2026-01-01T00:00:00.000Z",
    "name": "text",
    "output_tokens": 1,
    "session_source": "client",
    "span_count": 1,
    "started_at": "2026-01-01T00:00:00.000Z",
    "step_count": 1,
    "trace_id": "text",
    "user_id": "text",
    "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "tool_costs": [
    {
      "calling": 1,
      "calls_sharing_request": 1,
      "calls_sharing_result": 1,
      "later_requests": 1,
      "rereading": 1,
      "result_tokens": 1,
      "span_id": "text",
      "subagent": 1,
      "total": 1,
      "writing": 1
    }
  ],
  "truncated": true,
  "turns": [
    {
      "cache_read_tokens": 1,
      "continued": true,
      "cost": 1,
      "ended_at": "2026-01-01T00:00:00.000Z",
      "errors": 1,
      "index": 1,
      "input_tokens": 1,
      "llm_calls": 1,
      "output_tokens": 1,
      "started_at": "2026-01-01T00:00:00.000Z",
      "state": "active",
      "step_ids": [
        "text"
      ],
      "tool_calls": 1
    }
  ]
}

Platform Break Glass

post

Open a session's content in any organization without its owner's share, as the deployment's operator.

Only where trace_platform_break_glass_enabled is on; a 404 otherwise. The opening is recorded with its reason and reference before anything opens, and listed at GET /traces/audit/break-glass.

Authorizations
Otari-KeystringRequired

Enter your API key here (sent as Otari-Key header).

Path parameters
trace_idstringRequired
Query parameters
workspace_idstring · uuidRequired

The workspace the session is in.

Body

Why the deployment's operator is opening a session's content, and what asked for it.

reasonstring · min: 10 · max: 1000Required
referencestring · min: 1 · max: 200Required

What the opening answers: a legal request's number, a ticket.

Responses
200

Successful Response

application/json
content_accessstring · enumOptional

How this read reached the session's content: 'owner' for its own user, 'share' through a share its user made, 'break_glass' for a recorded opening without one, 'none' otherwise.

Default: nonePossible values:
statestring · enumRequiredPossible values:
truncatedbooleanRequired

True when the session holds more spans than one read returns.

post/api/v1/traces/{trace_id}/break-glass
POST /api/v1/traces/{trace_id}/break-glass?workspace_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 36

{
  "reason": "text",
  "reference": "text"
}
{
  "content_access": "none",
  "content_share": {
    "active": true,
    "audience": "organization_admins",
    "created_at": "2026-01-01T00:00:00.000Z",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "note": "text",
    "read_count": 0,
    "reads": [
      {
        "read_at": "2026-01-01T00:00:00.000Z",
        "reader_email": "text",
        "reader_user_id": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "revoked_at": "2026-01-01T00:00:00.000Z"
  },
  "gates": [
    {
      "blocked": 1,
      "enforcement": "required",
      "flagged": 1,
      "gate_id": "text",
      "gate_type": "text",
      "message": "text",
      "origin": "repo",
      "passed": 1,
      "refused": 1,
      "runs": [
        "text"
      ],
      "span_id": "text",
      "undecided": 1
    }
  ],
  "spans": [
    {
      "approximate": true,
      "attributes": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "cache_read_tokens": 1,
      "cache_write_tokens": 1,
      "content": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "content_private": false,
      "context_window": 1,
      "cost": 1,
      "duration_ms": 1,
      "end_time": "2026-01-01T00:00:00.000Z",
      "error_class": "text",
      "input_tokens": 1,
      "kind": "text",
      "model": "text",
      "name": "text",
      "opens_turn": true,
      "operation": "text",
      "origin": "gateway",
      "otel_span_id": "text",
      "otel_trace_id": "text",
      "outcome": "ok",
      "output_tokens": 1,
      "parent_span_id": "text",
      "provider": "text",
      "reasoning_tokens": 1,
      "recovered": true,
      "request_id": "text",
      "span_id": "text",
      "start_time": "2026-01-01T00:00:00.000Z",
      "tool_call_id": "text",
      "tool_name": "text",
      "tool_type": "text"
    }
  ],
  "state": "active",
  "summary": {
    "api_key_id": "text",
    "cost": 1,
    "error_count": 1,
    "harness": "text",
    "input_tokens": 1,
    "last_activity_at": "2026-01-01T00:00:00.000Z",
    "name": "text",
    "output_tokens": 1,
    "session_source": "client",
    "span_count": 1,
    "started_at": "2026-01-01T00:00:00.000Z",
    "step_count": 1,
    "trace_id": "text",
    "user_id": "text",
    "workspace_id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "tool_costs": [
    {
      "calling": 1,
      "calls_sharing_request": 1,
      "calls_sharing_result": 1,
      "later_requests": 1,
      "rereading": 1,
      "result_tokens": 1,
      "span_id": "text",
      "subagent": 1,
      "total": 1,
      "writing": 1
    }
  ],
  "truncated": true,
  "turns": [
    {
      "cache_read_tokens": 1,
      "continued": true,
      "cost": 1,
      "ended_at": "2026-01-01T00:00:00.000Z",
      "errors": 1,
      "index": 1,
      "input_tokens": 1,
      "llm_calls": 1,
      "output_tokens": 1,
      "started_at": "2026-01-01T00:00:00.000Z",
      "state": "active",
      "step_ids": [
        "text"
      ],
      "tool_calls": 1
    }
  ]
}

Last updated

Was this helpful?