All patterns
P-03 · Patterns

Budgeted agent with human in the loop

The agent runs within limits on steps, cost and permissions; irreversible actions go through approval.

agente-com-orcamento.archClick a component in the diagram
Supervisor · Controls steps, cost and time. Stops and escalates when the budget runs out.
Problem

Agents without limits fall into costly loops, call tools too often and sometimes take actions nobody approved.

Solution

Each tool is classified by reversibility. A supervisor controls the run budget and pauses for human approval before irreversible writes.

When to use
  • →Agents with access to real systems
  • →Financial actions, sending messages, deletions
  • →Teams starting to grant agents autonomy
## Trade-offs
  • +Predictable cost per run
  • +Predictable failure instead of silent failure
  • +Autonomy grows with trust
  • −Approvals add latency
  • −Requires designing the failure path