How can my coding agent search an agent’s traces in Rius?
Your coding agent searches an agent’s traces in Rius by calling the list_agent_traces tool on the Rius MCP server. You ask in plain words, such as “show me checkout-agent’s failed runs from the last two days”, and the client fills in the tool arguments for you. The reply is a Markdown table of traces, newest first, and each row carries a trace_id you can open with get_agent_trace.
How it works
The Rius MCP server exposes list_agent_traces, which returns one row per trace as a Markdown table, newest first. Your client reads your question and picks the arguments itself. You rarely call the tool by hand.
The main parameters:
agent: the exact agent name, matched against the trace’s root span. Read the name offlist_agentsor off theroot_agentcolumn of a listing instead of guessing it. A run that declares no agent falls back to its service name.hours: a lookback window ending now, 24 by default. “This week” ishours: 168. Usestartandend(RFC3339 timestamps) for an exact range.status:Ok,ErrororIncomplete. A trace reads Error when any of its spans errored, so a run that retried a failing step and then succeeded is included.root_status: the verdict of the root span alone.root_statusset toErrorfinds the runs that genuinely failed.statusset toErrorwithroot_statusset toOkfinds the runs that hit errors but finished cleanly.error_text: free text over the failure itself, so you can find a trace by what it said, such as “rate limit”.search: a case-insensitive match on span name, span id, trace id or session id.service,instance,user_idandanonymous: narrow to a service, one running copy of an agent, or one end user.filters: a list of clauses, each with a field, an operator and values, combined with AND. The fieldsstatus,agent,service,model,span_kind,operationandsession_idare cheap over any window. Keys that start withattr.orresource.reach your own attributes, cost about ten times more, and work only over windows of 31 days or less. Calldescribe_search_catalogbefore guessing a key.limitandcursor: 20 rows by default. When more traces match, the reply carries a next-page cursor that you pass back ascursor.
workspace is optional on every call. Omit it to use your default workspace.
Set it up
- Connect your coding agent to the Rius MCP server. In Claude Code:
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 for Claude Code, Codex (beta) or Cursor (beta), it already registers the server as rius. For agents that run without a browser, use a read-scoped API key. Ingest keys cannot query. The MCP page covers every client and the headless setup.
-
Check the connection by asking “Who am I in Rius, and which workspaces can I access?” Your client should call
get_me. -
Find the agent’s name. Ask “Which of my agents are running right now?” to use
list_agents, or read theroot_agentcolumn from an unfiltered trace list. An agent that sends traces but no heartbeat does not appear inlist_agents, so use the trace list for it. -
Ask for the traces in plain words. For example, “Show me the failed runs from the last two days” becomes:
{ "name": "list_agent_traces", "arguments": { "hours": 48, "status": "Error" } }- Narrow it. “Why did checkout-agent start failing at 14:00?” becomes a call with an agent, a time range, both status filters and an error text:
{
"name": "list_agent_traces",
"arguments": {
"agent": "checkout-agent", "status": "Error", "root_status": "Error",
"start": "2026-09-16T14:00:00Z", "end": "2026-09-16T15:00:00Z",
"error_text": "rate limit"
}
}- Open one trace. Ask “Break down trace 4bf92f3577b34da6a3ce929d0e0e4736 for me”, and your client calls
get_agent_tracewith the trace_id from the table. Addinclude_contentto see what the model said or what a tool returned. Spans exported without content have nothing extra to show.
The tool reference lists every argument and more example calls.
What you get
- A table of matching traces with the trace_id, the root agent, the session, the root status and who sent the trace (
sent_by). A Silent failure column flags traces the failure detectors reported on. - Newest-first results, with a cursor for the next page, so your agent can work through a long list without one oversized reply.
- A trace_id on every row that feeds
get_agent_trace, which returns the span waterfall, in time order and indented by depth. - Filters that compose, so a slice you list and the slice you later summarize with
agent_traces_summaryuse the same grammar. To search spans across traces instead, for example every errored tool call in a day, uselist_spans. - A way to investigate from your editor or terminal instead of the console. To place this in a wider workflow, see Monitor AI agents in production.
When something else fits
- If you want rollup numbers (trace count, error rate, cost, latency) rather than a list of runs, ask for
agent_traces_summary, which takes the sameagent,hoursandfiltersarguments. - If you want to read a single run in full, go straight to
get_agent_tracewith its trace_id, or open the trace in the Rius console to browse the waterfall visually.