Skip to content

Browse sessions and traces in Studio

View as Markdown

A session recorded by weft/thread shows up on Studio’s Sessions page: one row per conversation, and a page per session that opens on a timeline of its turns. Any OpenTelemetry trace in the database, from weft or from any other instrumented app, shows up on the Traces page, with a span tree per trace. Both are in the sidebar and in the ⌘K palette.

/sessions lists every thread session, most recently seen first. A row shows the newest turn’s status, the session’s title with its id and public id under it, the agent, the number of turns, tokens in and out, the cost (turns’ own plus their subagents’, under pricing), and when it was last seen. Since 0.18.0 a row also says what state the conversation is in: ⏸ awaiting a decision · 1 call when its newest turn is parked with no resume yet; an outcome strip of its newest 40 turns, oldest first, one glyph per turn (✓ succeeded, ✗ failed, a neutral ✗ ended by a newer message, ● running, ◌ interrupted, ⊘ cancelled, ⏸ parked or decided); the failed, busy-ended and cancelled turns counted apart, only failures in red (1✗ failed, 2✗ ended by a newer message, 1⊘ cancelled); and 3 exchanges · 5 turns when resumes fold turns into exchanges. In a narrow column awaiting a decision · 1 call and 1 exchange · 2 turns break only at their dot.

The title is the session’s own when the app named one: thread’s SetInfo title, recorded on every later turn as the weft.session.title metadata, which survives a content-off destination. Without one the row is titled by its first turn’s prompt, then “(content not captured)” when that turn stored no content, then the id.

Studio's sessions list with its status, time and kind filters: each row's status, title (Order 4411 refund, Checkout latency watch) or first prompt, its session and public id, agent, turns, tokens in / out, cost and last seenStudio's sessions list with its status, time and kind filters: each row's status, title (Order 4411 refund, Checkout latency watch) or first prompt, its session and public id, agent, turns, tokens in / out, cost and last seen
The sessions list: titled sessions (Order 4411 refund, Checkout latency watch) and untitled ones under their first prompt, with the status, time and kind filters above.

Three boxes filter the list, each a key in the URL; the third is wide enough to show its placeholder, “find title, prompt, id”, whole:

BoxURL keyMatches
agentagentThe agent’s name
public idpublic_idThe sessions one of whose turns carries this public id
find title, prompt, idqEvery term in the title, the first turn’s prompt, the id, the public id or the agent

A public_id filter scopes the whole row to that public id: its turns, usage, first and last seen, status and cost are the turns carrying it, so another app’s runs that share the session id change nothing.

Since 0.18.0, one wrapping row of chips under the boxes, in three groups split by dividers, filters by state. A chip toggles its URL key, and every chip you turn on narrows the list further:

ChipURL keyKeeps the sessions
⏸ awaiting a decisionawaiting=1whose newest turn is parked with no resume yet
✗ has a failed turnfailed=1with a turn whose loop returned an error. A turn ended by a newer message, or cancelled, is not a failure
⌗ compactedcompacted=1that weft/thread compacted: a compaction marker is in the session’s state log
↳ delegatedlineage=childanother session delegated (thread/pool)
⑃ forkslineage=forka Fork made from another session
✓ succeeded, ✗ failed, ● running, ◌ interruptedstatus=succeeded … status=interruptedwhose newest turn has that outcome. failed leaves out a newest turn that was cancelled or ended by a newer message, and succeeded leaves out a parked one: for that, use awaiting
last hour, last 24 h, last 7 dayssince=1h, 24h, 7dlast seen within that window

↳ delegated and ⑃ forks share the one lineage key, so only one of them is on at a time; the same goes for the status chips and for the window chips. The window is measured from when the first page loads, and the pages after it keep that bound, so the list does not shift while you scroll. A refresh measures it again. A link with a value the list does not know drops that key.

/sessions/<id> heads with the title, the newest turn’s status, the agent, the turn count and tokens, the public id and when it was last seen. Since 0.18.0 the page opens on the timeline: one row group per exchange (a turn and the resumes that decided its parked calls) on a shared time axis, with each turn’s state-log marks under it. ?view=table is the turns table, newest first (&order=oldest for the old order): one row per turn with its status, the turn number with its prompt (“t3 Here is the photo of the cracked dripper…”), agent, steps, tokens and start. Each turn’s title links its run page. ?view=tree draws the lines the turns continue, and ?view=approvals every decision and grant. A link made before 0.18.0 for the turns table adds ?view=table.

On the timeline, each mark opens a drawer, and ?mark=<id> in the URL names the open one. The lanes filter, ?lanes=, dims the lanes you did not pick and never hides them. The tree view follows weft.turn.parent: a turn after a Branch, Uncompact or rollback continues the turn it names, so abandoned turns sit off the path and forks hang on their origin. The page stays live over /api/live?session=. On a turn’s run page, { and } step to the previous and next turn of its session.

The marks are the session’s state log: every thread record and compaction marker with a weft.session.id, indexed by session as it is ingested (SQLite’s session_events, ClickHouse’s weft_session_events, both backfilled), records filed under no run included. A mark reads in the state log’s words, and a skipped turn number is said with the receipt that took it (“t2 · consumed by a steer · delivered into t1”); a gap nothing explains is one not_recorded hole. A turn a busy policy ended reads neutral, not failed, here and on its run page: ”✗ interrupted by t7”, ”↶ rolled back by t9 · off path” (weft.cancel.cause thread.interrupted); a cancel with any other cause keeps the failure’s colour. A session recorded before 0.18.0 shows only compaction markers on its timeline, since the thread records start with 0.18.0, and a turn there that parked or resumed reads the not_recorded hole.

The header’s cost covers the session’s turns and its delegated sessions, thread/pool children at any depth. A session is priced up to 10,000 runs, and a level’s reads stop at 20 pages; past either, the figure is unknown with a reason. The summarizer’s calls (compaction) are priced at read time, never added to usage, and the page draws them as their own line. The header’s verbs, in order, are copy public id, export jsonl, open in app and delete session…. copy public id shows only when the session has one, and export jsonl only under the export capability. Where Studio cannot delete (no delete capability, a panel token, or neither the dev token nor a loopback Host), delete session… is replaced by a line saying why. open in app opens the newest turn’s host page (weft.page_url); without one it is disabled and says why. export jsonl says saved <file> or export refused: <reason> in a toast. delete session… asks first (Delete session <id>?, naming how many turns go); done, a toast says deleted session <id> and the page returns to the list, and a refusal stays in the dialog as delete refused: <reason>.

A session can be made of derived runs: the conversation of a stock OpenTelemetry app. Since 0.20.0 the page numbers its derived top-level runs 1 to n by start order, after the thread’s highest turn, for display only. A session whose every run is derived is badged “derived (stock OTel)”.

A turn that resumed a park and carried no new prompt reads “resume of t1 · 1 decided call”, and the parked turn before it reads parked → t2, a link to it. Playground experiments forked from a turn are listed under it, and the page ends with the count: “0 experiments forked from these turns”. Studio finds them by reading the playground runs beside the session, scoped to its public id (else its agent), up to 4 pages of 500. When more remain, the count covers only those 2,000 and adds — only the newest 2,000 playground runs were searched; an older experiment forked from a turn is then neither listed nor counted. While the read runs the line says looking for experiments…, and a failed read says experiments could not be read: <error>.

The sessions list’s status is the newest turn’s outcome: succeeded, failed, running, interrupted, cancelled, ended (a busy policy ended it), parked or resumed. Before 0.18.0 a cancelled or busy-ended turn read failed and a parked one succeeded. The turn rows use the full vocabulary, parked and cancelled included.

/conversations/<public id> (0.18.0) is a public id’s page: every run that carries it, the handle the devtools panel follows. It is the only page a public id without a thread session has, such as a test harness’s or a non-thread app’s. A public id with sessions lists them, each linked to its own page with its state. Otherwise the page says no session carries this public id — the runs are its conversation.

The table lists the turns newest first, as the panel and the session table do; ?order=oldest reverses it. Playground experiments forked from a turn sit under that turn. Experiments whose source turn is not on the page are listed apart, as N experiments of runs not on this page. The header counts the turns, the exchanges too when a turn resumed another, and the experiments, then the tokens in and out. Under pricing it shows the turns’ own cost and, apart, + $y delegated for their subagents, never folded together.

The page reads GET /api/runs?public_id= once, up to 500 runs; past that it says showing the newest 500 runs of this public id — the runs list pages through all of them. the flat runs list opens /runs?public_id=<id>. Under the live capability the page stays live: a run frame of the public id re-reads it, at most once a second.

Two links lead here: a session header’s public id, and the panel header’s conversation ⤢. The panel shows that button when its scope has a public id but no session; with a session it shows session ⤢ instead. The sidebar marks Sessions while it is open.

RouteAnswers
GET /api/sessionsThe rows above; agent, public_id, q; paged by before and before_id (on last seen) with limit
GET /api/sessions/{id}The row and its top-level turns in order
GET /api/sessions/{id}/timelineThe turns and the state log’s marks the timeline draws (capability timeline)
GET /api/sessions/{id}/entriesThe same marks paged by offset and limit; run narrows to one run’s
GET /api/sessions/{id}/export?format=jsonlThe conversation as JSON lines, streamed: a session line, every turn’s run export in turn order (at most 200 turns), the state log’s marks (at most 2,000), holes, and a closing session_end line. Past 64 MiB it ends with a truncated hole, cause response_cap
GET /api/sessions/{id}/public_idThe public id the session’s turns carry, or "" with the not_recorded badge
GET /api/public/{public_id}The reverse: the session a public id names
DELETE /api/sessions/{id}Deletes the session’s runs from Studio’s tables (capability delete)

/api/sessions/{id}/public_id answers the dev token, or setup A’s open API, only: every panel token gets a 403 with the hidden badge before the session is looked up. DELETE takes the dev token or, with no token, a loopback Host; it removes rows, records, the search index, spans and app logs from Studio’s database, never your app’s session store. The session header’s delete session… calls it.

Since 0.18.0 a session is grouped over its own turns (runs whose id is <session>-t<turn>, or runs linked to no run), not playground runs. A thread/pool child session is listed as a session of its own, with its lineage (parent_session, parent_turn, parent_call, parent_run), and is counted in total; its runs do not appear as rows of the parent’s. A client after top-level sessions only skips the rows with a parent_session. What is a session? covers how a session records its turns.

/traces lists every trace the database holds, weft or not, newest first. A row shows the title, the root span’s name and the trace id, an error mark when any span ended in error, the service, the weft runs it holds (“3 runs · 1 failed”, linked to the top run), the span count, the start and the duration.

The title is the trace’s top run as the runs list words it, the agent and the prompt (“director · How many units …”) or either alone, else the root span’s name, else “(no root span)”. A trace whose root span never arrived (only child spans did) carries the gap badge, and a trace of non-weft spans only shows ”—” for runs.

Filter it by service (a resource service name, exact: the traces holding a span of it), since and until (a day YYYY-MM-DD in UTC, or an RFC 3339 time, on the trace’s earliest span). A trace’s start is its earliest span, so one whose earlier span arrives late can appear again on a later page; the list removes the repeat.

Since 0.20.0 the list also finds the GenAI traces that make no run: OpenTelemetry GenAI spans with no weft run and no derived run, such as a chat-only instrumentation or an agent whose root span has not arrived. When the database holds any from the last 7 days, the runs list says so beside its count (and on its empty state): 3 GenAI traces not runs in the last 7 days — why, a link to /traces?not_run=1&since=<7 days ago>. There the filter is a chip, GenAI traces that are not runs, that clears it. The trace page of such a trace says why in its header, not a run: <reason> · fix: <fix>, from the API’s not_run (GET /api/traces/{id}).

/traces/<trace id> draws any trace as a span tree on a time axis: one row per span with its name (invoke_agent director, chat script, execute_tool ops_manager), its status, service and duration. Select a span for its attributes. The header names the root span, the service, when it started and whether it failed, and lists the trace’s weft runs, each linking its run page.

A trace page for a director that delegates to an ops-manager, which delegates again: the three runs it holds, and the span tree of invoke_agent, chat and execute_tool spans on a time axisA trace page for a director that delegates to an ops-manager, which delegates again: the three runs it holds, and the span tree of invoke_agent, chat and execute_tool spans on a time axis
A director's trace: the three weft runs it holds, and its invoke_agent, chat and execute_tool spans as a tree on a time axis.

The chat view (?view=chat) draws each model call’s messages, role by role, from the OpenTelemetry GenAI attributes: gen_ai.input.messages, gen_ai.output.messages and gen_ai.system_instructions, or the older gen_ai.prompt and gen_ai.completion keys. A model call that carries neither says not_recorded; weft’s own chat spans carry no content (weft records it as log records), so for a weft run read the run page instead. A Python or TypeScript app’s GenAI spans read here as they are (Inspect agents written in other languages).

Every selection is a URL: ?sel= takes the same row keys as the run tree, so a link names the same row on the run page and here. r:<run> is an invoke_agent span, s<step>:m a chat span, c:<step>:<call id> a tool call, and other runs of the trace are run-qualified (s:<run>:<step>:m); t:<span id> names any other span (t:<run>:<span id> in a run-qualified key). The run page’s scope switch, this run | whole trace (0.20.0), opens the trace with its selection kept, and names the run it came from in ?run=. The trace page draws the same switch: its this run goes back to that run, else to the trace’s root run, carrying the selection. On a playground run, an errored chat span offers replay from this step.

GET /api/traces (capability traces) answers one row per trace: trace_id, root ({span_id, name}, or null with the gap badge), service, start, end, duration_ms, span_count, error, run_ids, root_run and failed_runs. It takes since and until (RFC 3339 only; the page’s boxes also take a bare day and convert it), service and public_id, and pages by before and before_id with limit (50 by default, 500 at most). A panel token lists only the traces every span of which carries its public id. GET /api/traces/{id} is one trace’s spans.

Terminal window
curl -s -H "Authorization: Bearer $TOKEN" \
'http://127.0.0.1:7331/api/traces?service=checkout&since=2026-10-17T00:00:00Z&limit=20'

Both read obsdb.DB’s Traces method, which both backends implement over their spans table.

  • Title your sessions. A session titled through SetInfo keeps its title on a content-off destination; an untitled one falls back to its first prompt, which content-off does not store. (Source: CHANGELOG.md:343; studio/api.go:903-960)
  • Create sessions with a public id when the panel or a hosted Studio will read them. GET /api/sessions/{id}/public_id answers not_recorded (cause no_public_id) for a session whose turns carry none, and panel tokens are scoped by public id. (Source: CHANGELOG.md:2255)
  • A trace page is not a run page. It shows spans; the transcript, events, the Request pane and the story are on the run page its run links open. (Source: studio/README.md:2353-2396)

Symbols used: thread · obsdb.DB