GET /v1/loom/runs/:id/trace returns the full record of a run: every model call, every tool call, the arguments, the results, the timings, and the cost.
Where the run object tells you what the agent said, the trace tells you what the agent did.
Shape
Reading one
Start at the last turn and work backwards — that is where the run ended up. Then:- The agent did something you did not expect? Look at
argson the tool call. The model’s decision is visible there before your endpoint is involved. - Your endpoint returned something odd?
requeston the tool call is the egress we actually made, headers and body. - The run cost more than you expected?
input_tokensper turn usually explains it — long context or many tool round-trips. - The agent ignored an instruction?
agent_snapshotshows the spec that actually ran, which may not be the agent as it stands now.
Snapshots make old traces truthful
Because the spec is captured at run start, editing an agent does not rewrite history. A trace from last week shows the instructions that were in force last week. When you are reconstructing an incident, that is the difference between an answer and a guess.Redaction
Fields a patch declares as redacted never reach the trace. What you see is the redacted form; the original was never stored.Cost
Every turn carriescost_credits, and the run totals them. Credits are charged on model usage — input and output tokens, priced by model class — plus any priced patches the run used. See Rate limits and credits.