Foundation~25 minHazelJS
Observability Signals for Agent Decisions
Debug Ops Desk with timelines and traces: executionId, tool calls, stop reasons, cost, and HITL waits on HazelJS.
- Authors
- editorial-team
- Published
- Last reviewed
Progress is stored locally in this browser.
Direct answer
If you cannot answer which tool ran, with what args (redacted), at what cost, and why the run stopped, you cannot operate the agent. HazelJS gives you @hazeljs/observability traces and Inspector timelines.
Package: observability. Glossary: /glossary/trace.
Minimum signals (pin this)
| Signal | Why |
|---|---|
executionId | Join HTTP request → AgentRun → spans |
| Agent name (+ DNA version later) | Know which policy/prompt ran |
| Step index | See loop depth |
| Tool name + redacted arg hash | Audit without leaking secrets |
| Tool latency / error class | Spot flaky adapters |
| Tokens / estimated USD | Budget alerts |
| Stop reason | Tune autonomy |
| HITL suspend / resume actor | Compliance |
Step 1Wire timelines in the same app
- Configure observability peers beside
AgentRuntimein your DI/starter app. - Persist timelines (
FileTimelineStorelocally is fine). - After
execute, copyexecutionIdand open the Inspector timeline / stream endpoint your starter exposes. - Confirm you see
lookupOrder(and laterprocessRefundwaits).
Step 2Debug a real failure
Practice this once:
- Break the adapter (throw or return
{ ok: false }). - Re-run the goal.
- Find the run by
executionId. - Write down: tool error class + stop reason + whether the model hallucinated a status anyway.
That exercise teaches more than reading dashboards alone.
Step 3Alerting that helps
Alert on:
- budget /
maxStepsexhaustion spikes - tool-error bursts
- approval queue age (HITL SLA)
Do not page on every model token.
Anti-patterns
- Pasting full tool payloads (with PII) into Slack
- Metrics without
executionId - “It failed” with no stop reason on the run record
Checkpoint
- You can pull a timeline for one Ops Desk
executionId - Stop reason is visible for success and for forced
maxSteps - Secrets are redacted in logs
What to do next
Operate from the terminal: /learn/agentic-development/hazel-cli-agent-ops
Artifact: Runbook snippet: find timeline by executionId for Ops Desk