Conversations
On this page
- The analysis table
- Columns
- What the aggregates count
- Filters, order and the segment
- The view lives in the URL
- Export CSV
- Deep links into a turn
- Lining a conversation up with what it produced
- Conversation detail
- Show activity and Live
- Per-message telemetry
- Conversation state
- Hook executions
- Message details
- The request path
- Voice call review
- Rename, reset and deletion
The Conversations screen (/organizations/{org}/workspaces/{ws}/conversations) is the browse view across every agent in the active workspace and every channel.
The same list narrowed to one agent is a section of that agent, under its Overview group - same data, one subject. Use the workspace list to search across agents, the agent section when you already know which agent you are investigating. A conversation opened from the agent’s section keeps the agent in its breadcrumb and goes back to that section.
The analysis table
Managed services. The column catalogue, the per-column filters, the CSV export and the URL-held view described in this section ship in the managed-services build. The open-source build serves the same screen as a fixed table with an agent drop-down, a Contact column and a full-text search that also matches the contact, 20 rows a page, ordered by last activity; a link with
?contact=narrows it to one contact. Everything from Conversation detail onwards is the same in both.
The screen answers which conversations deserve a look, rather than listing the ones that exist. Every dimension of it - which columns, which order, which thresholds, which segment - is a parameter of GET /api/conversations, so the table and an API consumer see the same thing by construction.
Columns
The panel’s catalogue is 26 columns in five groups, made visible through the column picker:
| Group | Columns |
|---|---|
| Identity | Conversation, Agent, Contact, Channel, Source |
| Volume | Messages, User messages, Assistant messages, Tokens, Cached tokens, Cache hit rate |
| Cost | Total cost, Conversation cost, Service cost |
| Health | LLM errors, Error kinds, Tool errors, Hook errors, Governance blocks, Anomalies |
| Time | Avg latency, Max latency, Avg TTFB, Duration (ms), First message, Last activity |
Eight are visible on a first visit: Conversation, Agent, Contact, Channel, Messages, Tokens, Total cost, Last activity. Contact is the caller’s identity exactly as the channel stored it (an email, a phone number, a channel handle). A title never begins with a speaker label: the engine no longer stores one, and the list drops the User: prefix older titles still carry.
Behind them the engine holds a column registry of 39 entries - the single source of what can be selected, sorted, filtered and exported. The panel surfaces 23 of them by name and computes three of its own from other columns: Agent (returned outside the cols mechanism), Cache hit rate (from cached and total tokens) and Anomalies (from the unanswered, single-turn and truncated flags). The remaining 16 are available to an API caller and not rendered as columns - the title, the summary, whether a context prompt is set, first and last message timestamps, the LLM/tool/hook call counts beside their failure counts, and the token and cost breakdowns.
Nothing a client sends reaches SQL. cols, sort and a filter’s column name are keys looked up in the registry; an unknown key is dropped rather than rejected, so a stale bookmark degrades to a usable table instead of a 400.
The Health and Time columns are aggregates, and they are computed per request from ai_logs, pipeline_traces, tool_audit_logs, hook_executions and governance_events - not denormalized onto the conversation row. That is why the column selection has a cost: a view with none of them joins none of those five subqueries, rather than all of them.
Note. The registry records the extra permission a column would need - the aggregate columns name
analytics:read- but no per-column gate is built, because every permission it names is one a conversation reader already holds. A test keeps that true, so a column gated behind something a reader lacks cannot be added without building the gate.
What the aggregates count
This table is read for triage, so each aggregate is defined by what an operator would act on rather than by what is cheapest to count. Four definitions are worth knowing before reading a red cell:
- LLM errors and LLM calls count conversation turns only. A service call - memory extraction, a summary - is not a turn anybody waited for, and its failure is invisible to the correspondent. Counting them painted a perfectly answered conversation red. The agent’s Status section uses the same restriction, so the two readers agree by sharing one definition rather than two copies of a string.
- Total cost and Tokens do not make that split; Conversation cost and Service cost are the two halves. A conversation whose total exceeds its conversation cost spent the difference on extraction and summaries.
- Governance blocks count blocked turns, not events. One verdict is one row, so a turn stopped by three gates is one block. A neutralized prompt-injection span is excluded: the poisoned text was replaced and the turn proceeded normally, so counting it pointed triage at healthy conversations.
- Avg latency and Duration are not the same quantity. Avg latency is the mean of a turn’s end-to-end time, from the pipeline traces. Duration is wall-clock from the first message to the last - a conversation with two turns an hour apart has a duration of an hour and a latency of seconds. Its filter is in milliseconds, the unit the column renders.
Filters, order and the segment
Three narrowing controls sit above the table - agent, channel, and one period control that clears back to all time - beside the full-text search and the column picker. Two more narrowings exist on the wire without a control of their own: source and userIdentifier (the contact, matched as a substring). They arrive from the URL (?source=, ?user=), which is what makes a link into a narrowed table possible, and each shows as a removable chip once active. The full set is instanceId, channel, source, userIdentifier, the half-open updatedSince/updatedUntil window, and search.
The search is one predicate among the others. It covers the conversation id, the title, the summary, the contact and message content, and it composes with everything else - a channel filter or a date window is not dropped while the reader types.
A numeric column carries its own header filter: a threshold with one of four operators (>=, >, <=, <). On the wire that is the repeatable f=column:operator:value, at most 20 of them per request; a non-numeric value, an unknown column, a non-filterable column or an unknown operator is a 400. Every active filter, whatever its source, is shown as a removable chip - and a chip whose column is currently hidden is marked as such, so a table cannot be narrowed by something invisible.
Sorting is by any sortable column, in either direction; an unknown or non-sortable sort falls back to last activity. The panel pages 20 rows at a time and the API caps limit at 100.
Ordering by an aggregate scans the whole filtered segment. Past the Conversations list query timeout, an installation policy (default 15000 ms, accepted range 1000 to 120000), the statement is cut and the API answers 503 {"error":"query_timeout","sort":…} rather than holding a connection open. The screen says which column took too long and offers to limit the window to the last 30 days - an inline banner, not a toast, because the corrective action is a click and not something that should vanish in three seconds. It is the predictable price of that sort over that segment, not a fault.
The view lives in the URL
A filtered, sorted, column-picked table is a link. encodeTableState writes only what differs from the default, so a fresh link stays short; a discrete decision (a filter, a sort, a column toggle) goes through the history, so the back button undoes it, while typing is debounced.
The same view is also remembered per reader, in that browser’s local storage, and re-applied by rewriting the URL on a bare landing. A link that carries a view always wins over the recipient’s saved one: a table someone sends must not be silently overwritten by the recipient’s own columns. Clearing the view forgets it rather than leaving the saved copy to come back on the next visit.
Export CSV
GET /api/conversations/export.csv streams the whole filtered segment, not the page on screen. It shares the list’s predicates, ordering and column resolution, so the file cannot contain a column, an order or a row the table did not select, and its row count is the count the table reports.
- The cap is 50,000 rows. It rides on every list response as
exportRowCap, so the panel disables the button instead of starting a download the engine would refuse. The engine refuses above the cap, so a segment of exactly 50,000 rows exports; and while the cap is unknown - a failed fetch leaves it so - the button stays disabled, because an unknown limit is never “no limit”. Over the cap the request answers413 {"error":"export_too_large","rowCount","cap"}; the screen says so and asks for a narrower segment. - The button stays disabled while the segment’s row count is unknown - loading, or a failed list - because “I cannot tell whether this would be refused” is not the same as “this is fine”.
- A cell that a spreadsheet would read as a formula is prefixed with an apostrophe, on top of RFC-4180 quoting. A conversation title is text somebody else wrote, and leading whitespace does not exempt it: a title beginning with a tab or a carriage return followed by
=cmd|…opens as a formula just the same. - The header always wins for tenancy, and this is the one route that also accepts it as a query parameter. A CSV download is a top-level browser navigation, which cannot send the
x-workspace-slugheader the rest of the panel stamps from the URL; withoutorg/wsthe request fell back to the caller’s stored preference and delivered another workspace’s rows. The parameter is consulted only where the header is absent, carries slugs and never ids, and grants nothing: membership of the named workspace is still checked, and a caller who is not a member gets a 403.
Deep links into a turn
GET /api/conversations/{conversationId}/messages accepts around=<messageId> and returns a 40-message window centred on that message, with the conversation’s real total and the absolute offset the window starts at. With the #msg-<messageId> fragment, a link opens the exact turn instead of the top of the thread.
- A message id that was never persisted - an aborted turn leaves audit rows behind - degrades to the newest page with the real total, and the screen still reports that the linked message was not found.
- Scrolling up from a centred window loads the page immediately before it, sized to the gap, so no request overlaps a message already on screen.
Lining a conversation up with what it produced
Three routes filter by the conversation, and one by the turn:
| Route | Parameter |
|---|---|
GET /api/audit-logs | conversationId |
GET /api/instances/{slug}/governance/events (managed services) | conversationId, messageId |
GET /memories (managed services) | sourceConversationId |
A tool-call row from GET /api/audit-logs carries the messageId of the assistant message that issued it, so ?around=<messageId>#msg-<messageId> opens the conversation at that turn. The Monitor drawer of a tool call links to the conversation itself. The message id is missing on pre-LLM hooks, the opt-out gate, spawnTask, and every row written before migration 0099, which added tool_audit_logs.message_id and is deliberately not backfilled.
With managed services, the governance-events section and the saved memories screen accept the same narrowing from their URL (?conversationId=, ?messageId=, ?sourceConversationId=) and show it as a removable chip. Nothing in the panel links into them yet, so today that is a hand-built link or an API call.
Conversation detail
A row navigates to the conversation and its title is a real link, so middle-click, ctrl-click and keyboard focus behave as they do everywhere else. A conversation’s own page keeps its agent’s sidebar rather than falling back to the workspace navigation.
- Header. The title, with a green dot while the view is live, and one metadata line: channel, agent, message count, when the conversation started, total tokens and estimated cost (each split into the conversation’s own and service work on hover). The ⋯ menu beside the title holds the view switches, copy ID, rename and delete; the conversation id is no longer shown in the header. The summary the engine writes for the conversation sits under the title and stops at two lines, with Show more and Hide when it is longer.
- Origin. The source of the conversation and, where the channel supplies one, the user identifier - a stable caller identity rather than a per-conversation id.
- Context prompt. Free text injected into every turn’s system prompt for this conversation, typically written by a webhook trigger. It is read only by the detail view: the list and the search queries deliberately do not select it, because it can be arbitrarily long.
- Message list. Each message displays role (
user,assistant,tool,system), content, and timestamp. - Steps and tool calls. An assistant turn is rendered as its steps, not as a flat list of calls: each step carries its own text and the tools it called, with their arguments and results. Tool calls appear under the step that issued them.
- Reasoning. Where the model produced it, thinking is shown per step - signed thinking blocks on Anthropic, summaries on OpenAI. A turn’s message-level reasoning is not repeated when the same content is already on the steps, and a step that only reasoned reads as reasoning-only rather than as “0 tool calls”.
- Attachments. Photos and PDFs from WhatsApp/Telegram appear inline when that agent has object storage configured - its own bucket, set as the agent’s secrets, not a deployment-wide setting. Without it the agent still sees the file (the bytes reach the model inline); it just cannot be reopened here afterwards. The same holds when an upload fails: the message and the reply are saved without the stored copy, and the turn is not lost.
Steps backfilled from the pre-steps schema are marked legacy: they were synthesised from the old flat {tool, args, result} triples and carry no real timing or reasoning.
Show activity and Live
Two switches sit in the header’s ⋯ menu, which stays open while you flip them.
- Show activity decides how much of the agent’s work the transcript shows. Off, it reads as a chat: user and assistant messages, attachments, and the badge of a reply a hook or a dev session served. On, it adds the steps, tool calls and reasoning above each reply, the per-message pills (model, provider, tokens, cache, cost, latency), system messages, and the hook executions, placed by time among the messages. The preference is remembered in the browser and shared with the Playground.
- Live follows the conversation as it happens, on whatever channel it runs. While a turn is in progress the transcript shows it from live activity events: the incoming message, then the agent’s reasoning and tool calls (with Show activity on), then its reply. When the turn’s rows are stored the stored messages take its place. A green dot beside the title says the view is live, and the view keeps the newest activity in sight unless you have scrolled up to read something older.
Live reads GET /api/activity-stream/conversation?conversationId=…&instanceId=<agent slug>, which needs conversation:read on the agent. It is described in Activity Stream → One conversation.
Per-message telemetry
Telemetry is merged into the messages API rather than served separately, and it lands where it belongs: prompt tokens on the user message, and completion tokens, cache counts, model, provider, cost, thinking flag and temperature on the assistant message. Cache, model and cost are null on legacy rows with no linked trace.
An assistant turn also carries:
- Per-phase latency - context preparation, governance input, tool building, the LLM call, governance output, time to first byte, and the total. The two governance phases are what tell an operator whether a slow turn was the model or the gates.
- Per-tool timings - name, duration and success per tool call, under
toolTimings. This is the only per-tool duration there is.
Note for API consumers. The field is
toolTimings, nottoolCalls, and its duration isdurationMs. The old name collided with the unrelatedsteps[].toolCallson the same response. Once a trace exists the field is always an array -[]for a turn that called no tool - andnullnow means there is no trace at all, which the previous shape could not express.
There is no per-step duration, and there deliberately is not: the value that used to be shown was the turn’s total divided by the number of steps, never a measurement, so reading a slow tool off it was reading an average.
Conversation state
Besides its messages, a conversation carries a state store: a small key/value blob that tools and hooks read and write during a turn. It is how one tool hands a derived value (a resolved customer id, a field mapped in from an HTTP-channel payload) to the next tool or to the next turn, without routing it through the model.
- The store is read once per turn; writes are buffered and flushed when the turn commits, so a failed turn does not leave half-written state.
- Concurrent turns on the same conversation merge per key rather than overwriting the whole blob.
- It is not in the prompt by default. Turning on Conversation state in prompt (Advanced) renders a truncated, read-only view into the turn so the model can see the known facts; the store stays the source of truth either way.
_privateis a reserved key for data a plugin keeps for an external integration that the model must not see (the candidate names a voice integration passes to speech-to-text, say). Tools and hooks read and write it like any other key and the state API returns it, but it is never rendered into the prompt, whatever the setting above. Other keys starting with_are left out of the prompt too.- A caller can seed the state before the turn: the HTTP channel through its field mapping, and the web API through the request’s
context(see Channels → Web/API).
GET /api/conversations/{conversationId}/state returns the current blob (permission conversation:read).
Hook executions
GET /api/conversations/{conversationId}/hooks returns the lifecycle-hook executions recorded for the conversation: event, function, success, duration, and any control signal the hook requested. Use it to confirm whether a hook fired on a given turn and what it did. See Hooks.
Message details
The Inspect turn icon beside an assistant message’s time, on the detail page and in the Playground, opens the Message details sheet for that turn. Its tabs:
| Tab | What it shows |
|---|---|
| Model | the turn’s tokens and cost split into input, cache read, cache write and output, its latency phases, temperature and extended thinking, the channel, whether it streamed and, on a voice turn, the speech-to-text provider, audio length and transcription time; then the turn’s request path |
| Prompt | the full system prompt sent to the model |
| Tools | the tools offered to the model, by name and description, with their count |
| Messages | the messages array sent to the model, as a JSON tree with each message’s index and role |
| Context | the conversation state the turn’s prompt carried, as a JSON tree |
Prompt, Messages and Context each have a Copy action: the prompt as text, the messages and the state as raw JSON. In a JSON tree a branch opens and closes from its key or its toggle, and a leaf value copies itself on click.
The Model tab is always there. Prompt, Tools, Messages and Context read the exact LLM request behind the turn, which is stored only when the agent has Debug payload enabled (Advanced); it is off by default because it stores personal data at rest, and without it those tabs say so. In the open-source build the stored request is cleared after DEBUG_PAYLOAD_RETENTION_DAYS (default 7). With managed services it stays with its conversation and is deleted with it, by hand or by the agent’s retention policy.
The request path
The Request path shows everything that happened in the turn on the turn’s own clock: the hook runs, the agent’s model calls and their steps, the tools each step ran, the model calls a hook or a tool made nested under it, the background calls the turn caused (title, memory, summary), and the moment the reply was handed to the channel. Each row has its start time, duration on a time bar, tokens in and out, cost and outcome, and the head of the table gives the turn’s total cost.
A row opens onto what went in and came out: a hook’s or a tool’s input and output, or a model call’s raw request and response. A step’s text written alongside a tool call is shown with what became of it. The Reply sent to the user row opens on the exact text handed to the channel. The raw request and response are kept only while the agent’s Debug payload is on, per step and per retry; without it the row keeps its figures and says the exchange was not saved. They are cleared with the other debug payloads and with their conversation.
Calls are filed under the message they belong to. A turn recorded before 1.3.6 opens in the same layout with the data it has: its hooks and background calls do not appear, and steps without a recorded start show no time. Turns run by Room cycles and by webhooks are not filed yet.
The sheet reads GET /api/conversations/{conversationId}/messages/{messageId}/debug (permission conversation:read). Besides the debug payload and the steps it returns turn, the turn’s channel, streaming flag and transcription from the pipeline trace, modelCalls, the turn’s rows from the AI logs, and path, the request path. One model call’s raw exchanges are read from GET /api/conversations/{conversationId}/messages/{messageId}/debug/calls/{callId}/exchanges when its row is opened.
Voice call review
Managed services. Call recordings and call review are available with Polyant managed services, on the voice channel.
A voice conversation has a Recording button in its header. It opens the call’s Twilio recording, read on demand with the voice channel’s credentials, so the channel needs its Twilio Account SID as well as the Auth Token; the agent’s Status notes when the Account SID is missing. Only the recordings of the conversation’s own calls are served, and each playback is recorded in the audit trail (conversation.recording_listen).
The recording panel shows:
- The audio, both sides together or the caller or the agent alone, at 1×, 1.5× or 2×, with a waveform of both channels on which the agent’s response times and the moments both spoke are drawn. A call recorded on a single channel cannot be split by side.
- The transcript, with the conversation’s turns lined up with the audio; a turn opens the audio at its moment.
- The voice module’s decisions, when the agent records them: switch on Record the voice module’s decisions in the voice channel’s Connection section (off by default). Each call then keeps its timeline (interruptions, pauses, cuts of the agent’s voice, ignored audio and background voices, how the call was answered (Call answered, or Call answered with the greeting ready, with how long the phone rang for the greeting, whether it was ready and the pause before the first words), the Background ambience on level, voices ignored because they did not answer the agent before the caller’s voice was known, words the transcription had dropped and that came back, waits, silence, judges that did not answer, failures) and what the transcriber gave, and the panel places them on the audio. The rows stay with the conversation and are deleted with it, by hand or by the agent’s retention policy, and with the agent.
- The call’s options, folded at the top of the call as The agent’s settings during this call: the voice settings the call ran with, including Ring until the agent is ready, Pause after answering (in ms) and, when the ambience played, Ambience level (in dB).
A reviewer can label each transcribed final (said to the agent, to other people, by the caller to someone else, or unclear), mark a decision Wrong with a note, and correct a final’s transcription or mark it as words nobody said. Reading needs conversation:read; writing labels needs conversation:delete and is audited. Labels are deleted with the call’s timeline.
Download for testing exports one call as a versioned bundle with what a replay needs: transcriber events with word timings, each judge’s question and answer, every attempt to recover words the transcription dropped, recovered or not, what the agent played and when, the configuration in force and the labels. It carries no phone number and no reviewer’s name. The export needs conversation:read and is audited.
| Route | Permission | What it does |
|---|---|---|
GET /api/conversations/{conversationId}/recordings | conversation:read | the call’s recordings, or why none can be read |
GET /api/conversations/{conversationId}/recordings/{recordingSid}/audio | conversation:read | one recording’s audio |
GET /api/conversations/{conversationId}/call-timelines | conversation:read | the voice module’s decisions and the labels |
PUT /api/conversations/{conversationId}/calls/{callSid}/labels | conversation:delete | write a label |
DELETE /api/conversations/{conversationId}/calls/{callSid}/labels/{target}/{index} | conversation:delete | remove a label |
GET /api/conversations/{conversationId}/calls/{callSid}/export | conversation:read | the call bundle for testing |
Rename, reset and deletion
PATCH /api/conversations/{conversationId} changes the title, the conversation id, or both - the Rename action on the detail page. Two rules bound it:
- The new id must keep the agent’s slug as its prefix. The panel derives an agent’s scope from that prefix and a rename does not move the row to another agent, so a different prefix would make the conversation unopenable.
- An id already in use is a 409. The rename then rewrites the key across every table that stores it, in one transaction, so nothing is orphaned.
Renaming a channel conversation away from its canonical <slug>:<channel>:<identity> key is how a live thread is reset: the next inbound message recomputes that key, finds nothing, and starts a fresh conversation, while the archived history stays browsable under the new id.
Delete a conversation from its detail page (top-right, Delete button; permission conversation:delete). Deletion cascades in one transaction: messages, AI-gateway call logs, pipeline traces, tool audit logs, governance events, hook executions, memories scoped to the conversation, its state store, its encrypted per-conversation credentials, the raw model exchanges kept for its request path, the voice module’s decisions and labels of its calls, and its entry in the email thread index.
The same cascade runs unattended when an agent has a retention policy.
Note. There is no bulk delete on the list, and no per-conversation JSON export. The CSV export described above carries the table’s columns for a whole segment, not a conversation’s messages; a single conversation’s full content is read through
GET /api/conversations/{conversationId}/messages.