Pattern
Tool Contracts for Agents That Touch Money
Schema, idempotency, and refusal rules for agents that create tickets, quotes, or payments under thin margins and high dispute cost.
1 min readJaneiro.ai
When an agent can quote, book, or pay, freestyle JSON is a liability. Thin margins make disputes expensive.
The pattern
Give every money-adjacent tool a strict contract—and eval it.
- Define input/output schemas with required fields, currency, and locale.
- Enforce idempotency keys and explicit confirmation before irreversible side effects.
- Refuse when confidence, missing fields, or policy checks fail—then assert those refusals in the golden set.
Minimum viable contract checks
schema valid → idempotent retry → confirmation gate → refusal path tested
No tool ships without a failure mode in CI.
When to use
- Checkout, quoting, collections, or ticket-creation agents
- Ops copilots that write to billing or ERP systems
- Extends Eval Gates into agent tool surfaces
Trade-offs
- More engineering upfront than demo agents
- Prevents the “it worked in the recording” incident that burns trust
If money can move, the contract is the product.
agentstoolsevals
Published by Janeiro.ai. Original editorial for operators. How this was made