Make consequential actions explicit and reversible
Haz que las acciones de consecuencia sean explícitas y reversibles
Mark irreversible or costly actions, support dry-runs and idempotency keys, and require confirmation before they execute.
Why
Missing confirmation on consequential actions is how agents wipe data or overspend. The canonical AX framework (agentexperience.ax, Agent Interactivity Patterns) expects most standardized interaction patterns to surface in the most sensitive flows: purchases, authentication, credential changes and destructive actions. Anthropic's guidance has agents pause for human feedback at checkpoints, and because autonomy brings higher costs and compounding errors, it recommends extensive sandboxed testing with appropriate guardrails. 12-Factor Agents names the gap: many orchestrators can pause and resume an agent, but not between choosing a tool and executing it (Factor 6), which is exactly where a confirmation belongs; Factor 7 treats asking a person as one more structured tool call. Cross-links to the human anti-pattern AX-HUM-05 (agentic sludge).
Do
Flag side effects and offer a dry-run.
Don't
Let a destructive call run on first inference.
Artifact
POST /v1/refunds HTTP/1.1
Idempotency-Key: 5f3c...-once-per-intent
X-Dry-Run: true
Content-Type: application/json
{ "order_id": "ord_123", "amount": 4200 }
{ "dry_run": true, "would_refund": 4200, "currency": "usd", "reversible": false,
"confirm_with": { "header": "X-Dry-Run", "set_to": "false" } }
Citations
- [01]agentexperience.ax: Principles of AX(opens in a new tab)
Agent Interactivity Patterns: standardized interactivity patterns will mostly surface in flows that are very sensitive in nature, such as initiating purchases, authenticating users, modifying credentials, and destructive actions
- [02]Anthropic: Building Effective AI Agents(opens in a new tab)
Agents can pause for human feedback at checkpoints or when encountering blockers; their autonomy means higher costs and compounding errors, so test extensively in sandboxed environments with appropriate guardrails
- [03]12-Factor Agents (Factor 6: Launch/Pause/Resume with simple APIs)(opens in a new tab)
Orchestrating code should be able to pause an agent; often AI orchestrators allow pause and resume, but not between the moment of tool selection and tool execution
- [04]12-Factor Agents (Factor 7: Contact humans with tool calls)(opens in a new tab)
An agent can contact a person through a structured tool call, declaring an intent such as request_human_input