Cap agent purchases with action policy cost limits
Agents that book travel or buy SaaS can exceed budget in a single tool call. Cap purchase-shaped actions with ActionPolicy before the tool runs.
Define the procurement policy
- Allow only the purchase-shaped types you intend (
http_post, or your adapter's purchase type). - Set
max_cost_minorso a single booking cannot exceed your ceiling (for example $600.00 →60000). - Deny everything else, or park high-risk types as
approval_required.
import { createSlimActionPolicy } from "@limetry/sdk"
const policy = createSlimActionPolicy({
allowedTypes: ["http_post"],
maxCostMinor: 60000,
requireApprovalActionTypes: ["http_post"],
auditMode: "minimal",
})
If the agent proposes a $1,200 purchase, evaluate returns deny (or approval_required when configured) before the tool runs.
Run evaluate with the self-run server or SDK locally. See the quick start.
See the OpenAI procurement example.
