SPINE Demos Trace Viewer

Trace Viewer

Visualize ToolEnvelope + TraceScope hierarchical tracing across agent orchestration.

Trace Hierarchy

Click a node or bar to inspect trace details

Trace Summary

0
Envelopes
0
Max Depth
0
Total Tokens
0ms
Total Duration
$0.00
Estimated Cost

How Tracing Works

Every LLM and tool call in SPINE is wrapped in a ToolEnvelope that captures the call ID, provider, token usage, timing, and cost. Envelopes are linked into hierarchies via TraceScope, which propagates trace context (root_id, parent_id, span_id) across agent boundaries.

with TraceScope("orchestrator") as scope:
    envelope = create_envelope(tool="anthropic:claude-opus-4-6")
    child = envelope.create_child(tool="anthropic:claude-sonnet-4-6")
    # child inherits root_id, links via parent_id

This creates a full trace tree: orchestrator calls fan out to subagents, each subagent makes tool calls, and every step is correlated back to the root session. The ToolCallResult captures success/failure status, token counts, duration, and cost estimates.