← deck | labs
vcn glass box | build your own glass box | hands-on hour

One lab. Instrument the agent. See the trace.

Companion to the talk. This is the take-home of the hands-on hour: a single runnable file that wraps a tiny LLM-plus-tool agent in OpenTelemetry spans and prints its trace as a span waterfall. No build, no API key, no network. Open the lab, copy the file, run it, then watch the slow span light up. ASCII-only so it runs on Windows without a UnicodeEncodeError.

Three labs one agent -> two agents -> click into the trace
01 | ~10 min
easy single agent
Trace your agent

A faithful, minimal OpenTelemetry tracer that instruments an LLM-plus-tool agent loop and prints a real span-tree waterfall: trace ids, parent links, GenAI semconv attributes, and a read-out of latency, token cost, and errors. Run it with --slow and watch the bottleneck light up.

copy | paste | run
02 | ~12 min
A2A two agents
Two agents, one trace

Glass box to glass house. One agent calls another over A2A; the caller injects a W3C traceparent, the callee extracts it, and the whole conversation joins into one multi-agent waterfall. Then run --broken and watch context propagation fail.

copy | paste | run
03 | interactive
no install clickable
Trace explorer

A live multi-agent trace in the page. Click any span to inspect its OTel attributes, then hit "break propagation" to drop the traceparent and watch the researcher fall out of the trace into an orphan. Same trace lab 02 emits, made clickable.

click | inspect | break
The whole idea in one line. Your agent is a black box: prompt in, answer out, and when it is slow or wrong you are guessing. Wrap each step in a span, nest the spans into a trace, and the waterfall shows you exactly where the latency, the cost, and the errors live. That is the glass box.
what to bring

A laptop with Python 3.10+ (the lab uses the standard library only, so there is nothing to install). An agent you ship, or want to. Curiosity about where its time and tokens actually go.

order of operations

Lab 01: trace one agent, run --slow, find the bottleneck. Lab 02: join two agents into one trace with a real traceparent, then --broken to see propagation fail. Lab 03: click into that trace and inspect spans. By 10pm your agents are a glass house.

Bring it to the IC workshop. These labs are the take-home of the Immersive Commons hands-on hour. Wrap your own LLM and tool calls in spans with the same gen_ai.* keys, propagate traceparent across your A2A calls, then point the OTel SDK at a real backend (Jaeger / Grafana Tempo / Langfuse) and the same waterfalls render live. Back to the deck →

Labs are single-file, no build, view-source friendly. The Python recipes are ASCII-only so they run on Windows without UnicodeEncodeError. Swap in the real OpenTelemetry SDK when you want a live backend.