A single user request to an agent might fan out into a dozen LLM calls: retrieval, tool calls, sub-agent loops. When something goes wrong, you need LLM traces to follow that whole journey. Here's how tracing works, and how Infere turns the same idea into runs you can open, step by step - the backbone of agent observability.
From request to run
A plain request ledger logs each individual LLM call. A trace groups many calls that belong to one logical operation - a RAG pipeline, an agent loop, a multi-step workflow. In Infere that unit is a run, and the grouping key is one header sent on every call:
# Send one run ID with every call of the run
headers = {
"X-Infere-Session-Id": "run-9f3a21",
"X-Infere-Session-Name": "research-copilot",
"X-Infere-Session-Path": "/plan",
"X-Trace-Parent": "step_research_01", # for a nested step
}
# Every request with this ID is grouped into one run in Logs › Runs
Infere groups those calls with X-Infere-Session-Id and shows them in Logs › Runs. X-Trace-Parent nests a step inside its parent, X-Conversation-Id groups the turns of a chat under Conversations, and X-Infere-Batch-Id groups a batch of independent items under Jobs. X-Property-* headers tag requests by feature, tenant, or environment so you can filter and group on them.
What a good run shows you
- Order - which calls happened, and which step called which, nested by
X-Trace-Parent. - Duration - the run's duration and each step's latency, so the slow step stands out.
- Cost - the run's cost across all its steps.
- Errors - which step failed, with the outcome and error code.
- Path - the steps as a Tree, Timeline or Graph, with the gaps between steps.
A run page shows the steps as Tree, Timeline or Graph, with the gaps between steps called out. Click a step to see its request beside the tree, and use Copy link or Export this run to share what you found.
Debugging an agent with runs
Imagine a user reports that a research agent took 40 seconds and returned a partial answer. Without that view, you'd guess. With it, you immediately see: the agent called a slow model, then hit a rate limit, retried, and finally returned a degraded answer. You follow it to the exact step, model, and request - then fix the prompt or the model named for that step.
Run-level observability turns "it was slow" into "this specific retrieval step added 12 seconds and cost $0.08." That's the difference between debugging and guessing.
Grouping steps into runs
For RAG pipelines, group the embedding lookup, the retrieval calls, and the generation into one run. For agents, group the initial turn and every tool-call loop iteration. The pattern is the same: send one X-Infere-Session-Id through the whole flow, label each step with X-Infere-Session-Path, and nest a step under its caller with X-Trace-Parent.
LLM traces turn a black-box agent into a sequence you can inspect, measure, and fix.
Next steps
Infere groups requests into runs from X-Infere-Session-Id and your attributes, and pairs each run with cost, timing and scores. Start sending a run ID with your agent workflows and you'll stop debugging blind.
Runs also reveal where cost accumulates across multi-step calls - read the true cost of agentic coding to understand the token economics behind the workflows you inspect. Our LLM observability guide covers the full telemetry stack that makes runs possible.