traces
Search and inspect AI agent execution records: recent runs, span trees, transcripts, tool calls, errors, sessions, and call-recording metadata for debugging.
Instructions
Trace explorer (mirrors /admin/observability/explorer). action:
search (filters -> recent traces, newest first, paged by limit/offset:
{traces, total, offset, limit, has_more, notice, ...}) |
get (trace_id -> span tree) | span (trace_id + span_id -> full span
detail) | transcript (trace_id -> persisted conversation turns +
tool calls) | overview (trace_id -> session, per-tool rollup, errors) |
session (session_id -> that chat session's traces, newest first — the
portal's /admin/sessions/{id} lookup) | audio (trace_id, or session_id
-> call-recording METADATA for that conversation: duration, status and
the portal path of the playable WAV; never the audio bytes).
hours (search only) is clamped to [1, 8760]; status must be
success | error | ''; tool (search only) narrows to traces that called
that tool by name. search always returns tool_filter_applied: if a
tool filter was requested and this is false, the tracing store's
match query failed and traces is the UNNARROWED list for the window — do
not treat it as "every trace called tool".
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "traces"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Config branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves. | staging |
| tool | No | Only traces that called this tool (by name). | |
| hours | No | search: look-back window in hours (1-8760). | |
| limit | No | search: max traces to return (1-100, default 25). | |
| action | No | Operation to run: search | get | span | transcript | overview | session | audio. The tool description lists what each action needs. | search |
| offset | No | search: skip this many traces (paging). | |
| status | No | success | error | '' (both). | |
| span_id | No | Span id within the trace (traces action=get). | |
| trace_id | No | Trace id (traces action=search). | |
| agent_kind | No | Only traces of this agent kind. | |
| session_id | No | session / audio: the chat session to look up. | |
| search_text | No | Free-text match over trace input/output. | |
| channel_slug | No | Only traces from this channel slug. | |
| include_background | No | Include background/diagnostic traces (default off). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |