Example workflows
Four investigation patterns you can run entirely from your AI client once the Rius MCP server is connected. Each starts from a plain-language prompt; the tool sequence shows what your client does with it.
Investigate a slow agent run
My agent felt slow this afternoon. Find the slowest runs from the last 6 hours and show me where the time went in the worst one.
What the client does:
list_spanswithhours: 6, kind: "agent", sort_field: "duration_ms", which returns the agent runs in the window, longest first.get_agent_tracewith the slowest run’strace_id.
Don’t sort list_agent_traces for this: it returns the 20 newest traces by
default, so sorting that page by dur_ms only finds the slowest of the 20.
The waterfall shows every step indented by depth with its duration, so the bottleneck is visible at a glance: one LLM call dominating the total is a model latency problem, many sequential tool calls of similar size is a fan-out you could parallelize, and a gap between spans points at uninstrumented work.
Follow-ups that work well in the same conversation:
Is that latency normal? Compare against the p95 for the last week.
(The client calls agent_traces_summary with hours: 168 and compares the
percentiles against the slow run.)
Find failed runs this week
Which of my agent runs failed this week, and what actually went wrong?
What the client does:
list_agent_traceswithhours: 168, root_status: "Error".get_agent_traceon one or more failing runs.
root_status: "Error" keeps the runs whose root span ended in error, the
genuine failures. status: "Error" matches any trace with an errored span,
so it also returns runs that retried and recovered. The list returns 20
traces at a time; the reply carries a cursor for the next page.
In the waterfall, the failed span carries the error status. Failed tool
calls show up as error-status TOOL steps inside otherwise healthy runs, so
status: "Error" answers “find failed tool calls” too. If the list is long,
narrow it:
Only the checkout-agent service, and group the failures by root span name.
(service: "checkout-agent" on the list call; the grouping happens in the
client from the returned table.)
Watch cost and compare models
What did my agents cost this week, and which service is spending the most?
What the client does:
agent_traces_summarywithhours: 168for the total.agent_traces_summaryper service (service: ...) for the split.
Because list_agent_traces includes a model and cost column per trace,
model-level comparisons work from the same data:
List this week’s traces and compare average cost per run between the gpt-4o runs and the gpt-4o-mini runs.
For a recurring version of this, ask the same question tomorrow; the tools always answer from a lookback window ending now, so “this week” stays current.
Let one agent learn from another’s failures
A supervisor agent checks your other agents on a schedule, finds the one that is failing, and passes what it learned to the team or back to that agent.
Give the supervisor its own key with read, and a name, for example
X-MCP-Agent-Name: supervisor (see
Name your agent). Then prompt it:
Every hour, use Rius to find the agent with the highest failed rate in the last 24 hours. Group its errors, compare its current version with the previous one, and read two failing traces. Summarise the most likely cause and a suggested fix.
A typical run calls:
list_agentsfor the agent names, thenagent_traces_summarywithagent: ..., hours: 24for each, to find the highest failed rate. (list_agentslists heartbeat instances only and has no error figures. To start from the failures instead, callagent_error_groupswithhours: 24across the workspace.)agent_error_groupswithagent: ...to group that agent’s failures by cause.agent_versionsfor the versions that agent ran, thencompare_agent_versionswithagent,dimension,base, andheadtaken from that list, to check whether a new version introduced the problem.list_agent_traceswithagent: ..., root_status: "Error", thenget_agent_traceto read the failing runs.- Optionally, with
alerts:manage:create_alert_ruleto watch for the same failure next time. Addchannels:manageif the rule should notify a channel.
What the supervisor does with the result is up to you: post it to a channel, open a ticket, or pass it to the failing agent as context for its next run. The supervisor can’t acknowledge alerts; a person always does that.
Check that the loop is working on Usage and access: the supervisor shows up as a Named client with a high answered rate and a low Asked again rate.
Writing your own
The pattern behind the first three: start wide with agent_traces_summary
(is anything wrong? how much?), narrow with list_agent_traces filters
(which runs?), finish with get_agent_trace (why?). Any question you can
phrase in those three steps works, and the tool reference
lists every filter available at each step.
Next steps
- Tool reference: every argument available at each step.
- Usage and access: see what your agents ask and whether they get an answer.
- Exploring traces: the same investigations in the console, when you want the full waterfall UI.