agentic-commerce
Agentic Commerce
Use when: building a feature where an autonomous agent needs to buy something — subscribe to a SaaS tool, pay a per-call API, purchase goods — and you must keep a human in control of the money.
This skill is a design pattern, not an implementation. It encodes the invariants that make agent purchasing safe to ship.
The one rule
The LLM proposes a purchase. Hardware/code/humans dispose. Nothing spends without a human approving that specific spend, and nothing exceeds a limit enforced outside the prompt.
Six invariants (don't ship without all six)
-
Gate every spend. The agent gets exactly one spend tool (e.g.
request_purchase). It does not call a provider SDK directly. The tool creates a pending intent and pauses the run for human approval (Slack card, web thread, whatever your surface is). Execution only happens on the approved re-invocation. An agent must not be able to approve its own purchase — a direct call always routes to the real approval gate; only a genuine human approval flips it to an auto-approve context. -
Hard backstops live in code, not the prompt. A misbehaving or jailbroken model must still be unable to overspend:
- a per-agent + global budget cap checked in code before execution (and re-checked at execution time — the kill-switch could flip or budget exhaust between approval and execution: guard the TOCTOU window);
- the provider's own spend controls (e.g. per-authorization + monthly caps, merchant lock on an issued card);
- a kill-switch that freezes all spend.