A trace session is one conversation with an agent, with every model call, its tokens, cost and errors; traces cover all agent work, not only evaluation runs. The session, call and histogram reads cut a range longer than 90 days (the deployment's default limit) to its most recent 90 days. An organization admin reads every trace, a workspace admin the traces in the workspaces they administer, and anyone else the traces of agents they own and their own chats. The cost dashboard needs organization-wide trace access.
List trace sessions
Returns trace sessions one window at a time, latest activity first (ordered by each session's latest call in the range). Follow nextCursor until it is null. The first page fixes three things that the cursor carries through the rest of the walk: the calls stored by the time of that read (window.writtenBy), the range end it used (window.to), and the data source it read (readSource). As a result, every session with such a call is returned once, in last-activity order, with no duplicates; calls stored later appear in the next walk. startedAt is the session's first call, even if it falls before the range; calls, tokens, cost, and duration cover only the range. filters is a JSON-encoded array of filter conditions. totalCount stops at 10,000; totalCountIsCapped: true marks a capped count.
query Parameters
fromStart of the date range (ISO 8601)
toEnd of the date range (ISO 8601)
pagePage number, starting at 1, for table-style paging. Ignored when cursor is set.
cursorToken from a previous response's nextCursor. Gives stable iteration and is the preferred way to page through results in code. A walk keeps the range end it started with (returned as window.to). A token from the older start-time order, or a malformed token, returns 400 INVALID_CURSOR: start again from the first page.
pageSizeSessions per page
searchToken search over trace text. Terms match as whole tokens (runs of letters, digits, or non-ASCII characters; punctuation and underscores split terms). Matching ignores ASCII case, and every term must match. A * widens a term: zip* matches words starting with zip (zip, zipped, zipping), *ip matches words ending in ip, and *ognit* matches any text containing ognit. A match covers the whole conversation: every turn of a conversation whose text contains all the terms is returned, not only the turn that introduced them, and the terms may appear in different turns. Terms must occur inside the queried time range. Input with no searchable tokens (punctuation only) returns 400. Some time ranges are served from a data source that matches terms by substring instead; readSource in the response says which source served the range.
filtersSend it as JSON in one value, for example filters=[{"field":"success","operator":"equals","value":"false"}]. Any other value is refused with 400.
matchAllCombine filter conditions with AND (true) or with OR (false)
List trace sessions › Responses
Successful response
totalCountNumber of matching sessions for pagination, counted up to a cap of 10,000
totalCountIsCappedtrue when more sessions matched than the cap; totalCount is then the cap, not the exact total
nextCursorToken for the next window; null when every matching session has been returned
The time range the server searched, so you can display it
readSourceWhich data source served this range; it decides how search terms match
searchModeHow the search was matched, in words (for example, 'zip* (starts with), earlier (whole word)'); null when no search is given
viewerTimeZoneIANA time zone from the requesting person's profile, for showing dates in their zone; null when no person is behind the request or no zone is set
Get a trace session
An unknown session ID answers 200 with an empty session (turnCount 0, taskId null) and no calls, not 404.
path Parameters
sessionIdTrace session ID
Trace session ID
query Parameters
fromOptional range start (ISO 8601). When both bounds are given, the server skips data outside the range.
toOptional range end (ISO 8601)
cursorToken from a previous response's nextCursor; omit it for the first window
Get a trace session › Responses
Successful response
Session summary computed over the whole session, not only the returned window. Totals are exact no matter how many windows you have fetched.
This window's turns, ordered by timestamp, then trace ID, ascending
nextCursorToken for the next window; null when the whole session has been returned. You can fetch any amount; keep following windows.
totalCostSourceWhere the session's totalCost comes from. billing_ledger: the session's calls in scope (inside the requested range, if one is given) belong to task runs, and totalCost is the billed amount for those runs, including sub-agents' and auxiliary calls (null while the billed amount cannot be determined). warehouse: no call in scope belongs to a run, and totalCost is the sum of those calls' costs, which excludes sub-agents.
The workflows of the session's chat, read the same way as in the list row
Turn boundaries for this window, computed by the server (turnIndex counts from the start of this window). Present only when the session is stored in the current trace format. When joining windows, offset the indexes by the number of turns collected so far, and merge the first turn into the previous window's last turn when windowStartsMidTurn is true.
windowStartsMidTurntrue when this window's first calls continue a turn that started in a previous window (no boundary before them); use it to join windows. false or absent when the first turn starts in this window (with user text or compaction) or this is the first window of a continuation session. Current trace format only.
List model calls
Paginated flat list of calls (one row per model turn), with the same filter and search syntax as the session list but applied to each call. Numeric filters (cost_usd, duration_ms, input_tokens, output_tokens) compare the call's own value rather than a session total. Each row includes sessionId, taskId, taskTitle, agentName, userName, and workspaceName, so the response is self-contained for bulk export. Rows carry inputPreview and outputPreview (first 2048 characters) instead of full input and output; use the session detail endpoint for the full text. totalCount stops at 10,000; totalCountIsCapped: true marks a capped count.
query Parameters
fromStart of the date range (ISO 8601)
toEnd of the date range (ISO 8601)
pagePage number, starting at 1
pageSizeCalls per page
searchToken search over trace text. Terms match as whole tokens (runs of letters, digits, or non-ASCII characters; punctuation and underscores split terms). Matching ignores ASCII case, and every term must match. A * widens a term: zip* matches words starting with zip (zip, zipped, zipping), *ip matches words ending in ip, and *ognit* matches any text containing ognit. A match covers the whole conversation: every turn of a conversation whose text contains all the terms is returned, not only the turn that introduced them, and the terms may appear in different turns. Terms must occur inside the queried time range. Input with no searchable tokens (punctuation only) returns 400. Some time ranges are served from an older data source that matches terms by substring instead; this response does not say which (GET /traces/sessions does, in readSource).
filtersSend it as JSON in one value, for example filters=[{"field":"success","operator":"equals","value":"false"}]. Any other value is refused with 400.
matchAllCombine filter conditions with AND (true) or with OR (false)
List model calls › Responses
Successful response
totalCountNumber of matching calls for pagination, counted up to a cap of 10,000
totalCountIsCappedtrue when more calls matched than the cap; totalCount is then the cap, not the exact total
Get a message part's full content
Looks up the raw JSON of one stored message part by key (complete tool results, every nested field). The session detail endpoint returns the key fields (chatId, messageId, partIndex, day) on each part's payloadKey; pass them back unchanged. Returns 404 for unknown keys.
query Parameters
chatIdStable conversation ID the part belongs to
messageIdID of the message (msg_...) that owns the part
partIndexPosition of the part within its source array (an identifier, not a dense sequence)
day^\d{4}-\d{2}-\d{2}$ · requiredDate of the trace row that introduced the part (YYYY-MM-DD); narrows the lookup to one day
Get a message part's full content › Responses
Successful response
payloadRaw part JSON exactly as stored (complete tool results, every nested field)
partTypeRaw part type: text, tool, file, step-start, compaction, and others
Get the session histogram
Counts the sessions matching the filters over time: each bucket holds its sessions and the ones with at least one failure. Buckets are hourly for a range of up to 7 days, daily up to 90 days and weekly beyond that.
query Parameters
fromStart of the date range (ISO 8601)
toEnd of the date range (ISO 8601)
searchToken search over trace text. Terms match as whole tokens (runs of letters, digits, or non-ASCII characters; punctuation and underscores split terms). Matching ignores ASCII case, and every term must match. A * widens a term: zip* matches words starting with zip (zip, zipped, zipping), *ip matches words ending in ip, and *ognit* matches any text containing ognit. A match covers the whole conversation: every turn of a conversation whose text contains all the terms is returned, not only the turn that introduced them, and the terms may appear in different turns. Terms must occur inside the queried time range. Input with no searchable tokens (punctuation only) returns 400. Some time ranges are served from an older data source that matches terms by substring instead; this response does not say which (GET /traces/sessions does, in readSource).
filtersSend it as JSON in one value, for example filters=[{"field":"success","operator":"equals","value":"false"}]. Any other value is refused with 400.
matchAllGet the session histogram › Responses
Successful response
List trace filter values
Returns the values you can filter traces by, read from the last 90 days of traces you can see: models, providers, agents, users, workspaces and skills. The workspace list is capped, and workspacesTruncated says when it is incomplete.
List trace filter values › Responses
Successful response
modelsDistinct model names from recent traces
providersDistinct provider names from recent traces
Agents with trace data
Users who own agents with trace data
First page of workspaces that appear in recent traces, with names (capped; see workspacesTruncated). Search for workspaces in the app to find the full set.
workspacesTruncatedtrue when more workspaces appear in recent traces than this list holds, so the list is incomplete
Skills invoked in recent traces, with names
Get an agent's usage profile
Returns one agent's usage from since to until (now by default): its sessions, cost, duration and tokens, the models it used and its cost per day. An agent with no traces in the range, or one you can't read, returns a profile of zeros.
path Parameters
agentIdAgent ID
Agent ID
query Parameters
sinceuntilGet an agent's usage profile › Responses
Successful response
totalSessionsTotal number of sessions
totalCostTotal cost in USD
totalDurationMsTotal duration in milliseconds
avgSessionDurationMsAverage session duration in milliseconds
avgCostPerSessionAverage cost per session in USD
totalTokensBilled tokens (input, output, reasoning, cache write, and cache read)
modelsDistinct models used
Daily cost breakdown, oldest date first
Per-model cost and token usage
Get a user's usage profile
Returns one person's usage from since to until (now by default): their sessions, cost, duration and tokens, the models and agents they used and their cost per day. Work an evaluation started, such as runs, judges and monitors, is not counted.
path Parameters
userIdUser ID
User ID
query Parameters
sinceuntilGet a user's usage profile › Responses
Successful response
totalSessionsTotal number of sessions
totalCostTotal cost in USD
totalDurationMsTotal duration in milliseconds
avgSessionDurationMsAverage session duration in milliseconds
avgCostPerSessionAverage cost per session in USD
totalTokensBilled tokens (input, output, reasoning, cache write, and cache read)
modelsDistinct models used
Daily cost breakdown, oldest date first
Per-agent usage breakdown
Per-model cost and token usage
Get the cost dashboard
Returns the organization's cost from since to until (now by default): a row per agent with its trend against the previous period of the same length, organization totals, cost per day, media and image generation cost, and cost per skill. It needs organization-wide trace access.
query Parameters
sinceStart date (ISO 8601)
untilEnd date (ISO 8601); defaults to now
Get the cost dashboard › Responses
Successful response
Per-agent cost rows, highest totalCost first (includes media generation cost)
orgTotalCostOrganization-wide total cost in USD for the period, including media and image generation
orgTotalSessionsOrganization-wide total sessions for the period
orgAvgCostPerSessionOrganization-wide average cost per session in USD
orgTotalDurationMsOrganization-wide total session duration in milliseconds
Daily cost breakdown, oldest date first (includes media generation cost)
Media and image generation share of the period's spend
Per-skill cost for the current period, highest totalCost first. Estimated provider cost only. Empty when the period's costs come from billing records, which do not track skills.