Template
Background Run Monitor
Track background work after the user leaves the composer or page.
Run TraceUsage MeterAgent Status TableBadge
Use
Workflow Guidance
Use for long-running jobs, scheduled work, review tasks, and multi-source scans.
Human Control
Users can inspect progress, cost, confidence, blockers, and cancellation points.
What Can Fail
The run stalls silently, exceeds budget, or hides which source caused the block.
Recovery Behavior
Expose blocked state, partial output, retry action, and cancellation affordance.
State Matrix
Required States
A template is only useful when it shows normal, blocked, and recovery states.
State Coverage
Running
User sees
Progress, cost, confidence, and current task.
System does
Updates status without shifting layout.
Blocked
User sees
The missing input and affected agent.
System does
Stops spending on blocked downstream tasks.
Complete
User sees
Final output, audit trail, and cost.
System does
Archives intermediate work behind a useful summary.
| State | User Sees | System Does |
|---|---|---|
| Running | Progress, cost, confidence, and current task. | Updates status without shifting layout. |
| Blocked | The missing input and affected agent. | Stops spending on blocked downstream tasks. |
| Complete | Final output, audit trail, and cost. | Archives intermediate work behind a useful summary. |
Implementation
Pattern Pieces
Templates are guidance; registry items stay smaller so teams can compose them into their own product surface.
Run Trace
A dense operational trace for background runs with source touches, status, warnings, timing metadata, and expandable recovery detail.
Usage Meter
A compact token, cost, limit, and coverage meter for visible agent run budgets.
Agent Status Table
A rich operational table for multiple agents with status, active task, progress, confidence, cost, and last activity.
Badge
Stock shadcn/ui badge used for status, scope, and state labels.
| Element | Spec |
|---|---|
| Run Trace | A dense operational trace for background runs with source touches, status, warnings, timing metadata, and expandable recovery detail. |
| Usage Meter | A compact token, cost, limit, and coverage meter for visible agent run budgets. |
| Agent Status Table | A rich operational table for multiple agents with status, active task, progress, confidence, cost, and last activity. |
| Badge | Stock shadcn/ui badge used for status, scope, and state labels. |
Build Rules
- ApprovalRisky external actions use a Decision Surface before execution.
- ProvenanceSources, memory, cost, and owner metadata stay visible at the decision point.
- RecoveryBlocked states expose the next input needed instead of showing indefinite activity.