Operations / Observability
Observe agent workflows, not just single runs
Run-level tracing (BP-0039) shows what one agent did. A workflow (BP-0048) spans many runs, agents, retries and human waits. Observe it as one thing.
Structure the telemetry like the workflow
Section titled “Structure the telemetry like the workflow”- MUST trace each workflow as one root span (OpenTelemetry GenAI defines an
invoke_workflowoperation, still in development status), with a child span per phase, a child span per unit, andinvoke_agent/ model / tool spans beneath. - MUST give every workflow and unit a stable ID, carry it into dispatched agents and tools, and write it on the matching ledger line, so the ledger and the traces can be joined.
- MUST record on each unit span: role, model, effort (
gen_ai.request.reasoning.level), attempt number, escalation step, outcome (done, failed, blocked, needs human), gate result, and rulings made. - MUST NOT record prompts or outputs in full by default; the redaction and retention rules of BP-0039 apply.
Measure the workflow
Section titled “Measure the workflow”-
MUST measure, per workflow type:
Metric Why Lead time, total and per phase Where time goes Units done / failed / blocked Throughput and failure points Retries and escalations per unit Weak briefs, wrong model or effort Human wait time and interventions Where people are the bottleneck or the safety net Review findings by severity; rework (units reopened) Quality escaping the execute phase Tokens and cost per completed unit and per workflow, by role, model and effort Whether the role table pays off (BP-0049) -
SHOULD count cost per completed unit, so failed attempts and retries are included rather than hidden (BP-0041).
Catch trouble early
Section titled “Catch trouble early”- MUST emit a heartbeat from long-running units and alert on: no progress for a set time, the same tool call repeated, attempts above the retry cap, budget or time above the stop condition, and workers left running after the workflow ends.
- MUST make alerts actionable: route them to the workflow owner with the workflow ID, failing unit and a trace link.
- SHOULD show drift signals beside workflow metrics: served model, effort and golden-set results (BP-0050), so a quality drop can be traced to a model change rather than guessed at.
Close the loop
Section titled “Close the loop”- SHOULD review the numbers on a regular cadence (for example weekly): most-failing phases, most expensive roles, escalation hotspots. Change briefs, model or effort, or the workflow shape, and record the change.
- SHOULD keep the audit trail separate from telemetry: traces may be sampled; actions with side effects are always recorded (BP-0040).
When to apply
Section titled “When to apply”Any multi-step or multi-agent workflow that runs repeatedly, unattended, or across sessions.
Examples
Section titled “Examples”invoke_workflow wf=feature-x-20261124 2h41m $18.40 status=done├─ phase clarify 9m human_wait=7m├─ phase plan model=opus-5.5 effort=high 6m $1.20├─ phase execute 1h58m│ ├─ unit 1 role=implementer model=sonnet-5.5 effort=medium attempt=1 gate=pass $1.90│ ├─ unit 2 role=implementer model=sonnet-5.5 effort=medium attempt=2 gate=fail│ │ escalate→effort=high attempt=3 gate=pass rulings=1 $4.70│ └─ unit 3 role=explorer model=haiku-5.5 effort=low attempt=1 gate=pass $0.20├─ phase verify role=final-reviewer model=opus-5.5 effort=high findings=I1,M2 $3.10└─ phase integrate human_approval=merge 12mAlert rules (pseudo):
# author: Stephen Eaton- alert: unit_stalled when: unit.heartbeat_age > 15m and unit.status == running- alert: retry_cap_exceeded when: unit.attempt > 2- alert: served_model_mismatch when: gen_ai.response.model != gen_ai.request.model- alert: workflow_over_budget when: workflow.cost_usd > workflow.budget_usdAnti-patterns
Section titled “Anti-patterns”- Traces per agent run with no workflow ID, so nobody can see the whole job.
- Measuring cost per call instead of per completed unit.
- Retries and escalations that leave no record.
- Dashboards nobody reviews, and alerts nobody owns.
Checklist
Section titled “Checklist”- Workflow root span with phase and unit spans; IDs joined to the ledger
- Role, model, effort, attempt, outcome and gate recorded per unit
- Workflow metrics measured, cost per completed unit included
- Heartbeats and stall, loop, retry and budget alerts with owners
- Drift signals shown alongside; regular review changes the workflow