How can my coding agent open one trace with all its spans in Rius?
Rius lets your coding agent open one trace with every span through the get_agent_trace tool on the Rius MCP server. You give it a trace id, and it returns the spans as a waterfall in time order, indented by depth. Ask in plain words, such as “Break down trace 4bf92f3577b34da6a3ce929d0e0e4736 for me”, and your client picks the tool and fills in the arguments.
How it works
The Rius MCP server exposes get_agent_trace. It reads one trace and answers in Markdown, which your client renders as a table.
Parameters
trace_id(required): the id of the trace. Read it from thetrace_idcolumn oflist_agent_traces.workspace(optional): a workspace name or ID. Leave it out to use your default workspace. Useorg/workspaceif the same name exists in two of your organizations.include_content(optional,falseby default): set it totrueto also get each span’s captured content, such as model input and output messages, tool inputs and outputs, status messages and events. It is off by default because full message content can be very large.
What comes back
- The spans in time order, indented by depth, so you see which step ran inside which.
- A header that names the root span’s agent. Each row carries its own agent, so in a multi-agent run you can see which agent owned which span.
- The sender of the trace, taken from the email of the ingest key that sent it. It is blank only when the key could not be resolved or the trace predates attribution.
- The root span’s session. A session equal to the trace id means the run carried no session of its own. If the spans carry more than one session, each row gets its own
sessioncolumn. - A “Silent failures” section when Rius reported findings on the trace. Each finding lists the failure mode, subject, severity, state, reason, evidence span ids and metrics.
Content follows your workspace’s privacy controls. Spans exported with content capture off, or with a mask, have nothing extra to show even when you pass include_content.
Set it up
-
Connect your coding agent to the Rius MCP server once. In Claude Code, run:
claude mcp add --transport http rius https://mcp.eu.console.rius-glassflow.com/mcpThe OAuth sign-in opens the first time a session uses the server. If you use the Rius plugin, it already registers the server as
rius. For Codex, Cursor, headless agents and read-scoped API keys, see the MCP page. A headless key needs thereadscope. -
Find the trace id. Ask “Show me the failed runs from the last two days.” Your client calls
list_agent_tracesand returns a table whosetrace_idcolumn feeds the next call. You can also paste an id you already have from the console. -
Ask for the trace in plain words:
- “Break down trace 4bf92f3577b34da6a3ce929d0e0e4736 for me.”
- “Show every span of that failed trace.”
Your client sends a call like this:
{ "name": "get_agent_trace", "arguments": { "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } -
When you need to see what a span said, ask for the content: “What did the LLM actually say in that failed span?” The client repeats the call with
include_contentset totrue:{ "name": "get_agent_trace", "arguments": { "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736", "include_content": true } } -
To keep going, take the agent name from the header or a row and pass it as
agenttolist_agent_tracesorlist_spans. Take the session and pass it assession_idtolist_spansto see the rest of that conversation. Every argument of every tool is in the tool reference.
What you get
- One trace as a full span waterfall inside the chat or terminal where your coding agent already works, with no trip to the console.
- A clear view of which agent owned which span in a multi-agent run.
- The sender, the session and any silent-failure findings in the same reply.
- Prompts, completions and tool inputs and outputs on request, through
include_content, without loading them every time. - A natural next step. From one trace you move to the agent’s other runs or the whole session. The same traces and spans power the wider workflow described in Monitor AI agents in production.
When something else fits
- If you want the failing runs rather than one trace, ask for a trace list first.
list_agent_tracesfilters by status, agent, error text and more, andlist_spansfinds spans across traces by kind or session. - If you want totals rather than span detail,
agent_traces_summarygives error rate, cost, tokens and latency for a window, andworkspace_metrics_overviewcovers the whole workspace. - If you prefer to browse visually, the trace view in the Rius console shows the same trace as a waterfall.