Built a local DevTools for inspecting the v0.7 observability events #2047
Replies: 1 comment 1 reply
|
Re#2 – did you have chatStreamStallTimeoutMs set? It defaults to 0 (off) and that's what actually emits chat:stream:stalled before recovery kicks in. If it's unset in your setup, the stall is probably getting caught by a transport-level timeout instead and jumping straight to chat:recovery:*, skipping that event entirely. Not necessarily a bug, more likely the watchdog just isn't armed Re#1, I don't think there's a public commitment to schema stability across minors yet, this is still pretty fresh off the v0.7 observability rewrite. I'd treat it as best-effort for now and keep the raw JSON fallback you already have. Might be worth tagging a maintainer here directly since it matters for anyone building on the typed exports Also curious if you're planning to surface chat:recovery:exhausted differently in the UI, that's the one event that actually needs a human to notice it, everything else in the chain is more "here's what happened.." |
Uh oh!
There was an error while loading. Please reload this page.
I have been building on the Agents SDK and ran into a debugging problem locally. When a chat stream stalled and recovery kicked in, I could not follow what was happening from console output. The
chat:recovery:*events form a state machine, and reading it as a flat log meant losing track of which incident an attempt belonged to.Since v0.7 publishes everything as structured events on diagnostics channels, I wrote a small tool that subscribes to them and renders them instead: https://github.com/Quant-TheodoreFelix/agents-devtools
It runs next to
wrangler devas a local collector plus a web UI. Integration is a customObservabilityimplementation, so nothing else in the agent changes:It groups events per Durable Object instance and adds views for recovery chains, schedules, fibers, and WebSocket lifecycles. Sessions can be recorded to NDJSON and replayed later. The default emission is preserved, and if the collector is not running the agent is unaffected.
To be clear, this is an unofficial community tool, MIT licensed, not affiliated with Cloudflare. State snapshots are off by default because
state:updatecarries an empty payload and capturing state means touching user data.Two things I would appreciate input on
Is the event schema expected to stay stable across minor versions? I currently import types from
agents/observabilityand fall back to a raw JSON view for unknown types, but I am not sure that is the right assumption.With
@cloudflare/ai-chat0.10.1, a watchdog stall appears to route straight into recovery without a separatechat:stream:stalledevent. Is that intended? I render the event into the chain when it does appear.Happy to hear if anything about the event surface would be worth showing differently.
All reactions