Shotoku is an open-source tool for controlling what AI agents can spend or do before an action reaches a payment service or paid API. Its central argument is that safeguards should enforce budgets and require approval before spending, rather than merely record transactions afterward. Developers define policies in YAML, setting per-transaction and rolling daily limits for particular vendors and actions. Requests within policy are approved; others can be denied or held for a human. Each decision includes a reason and ID, and an agent can respond to a denial however its developer chooses.
The tool runs locally, requires no account or internet connection, and stores decisions in an inspectable, append-only JSONL file. It does not hold funds, credentials, or keys, nor execute or settle payments: the agent’s existing wallet or payment system remains responsible for that. Developers can add its TypeScript authorization function directly, use its MCP server, or place it in front of other MCP servers to gate their calls; signed, short-lived receipts can also be verified by a payment proxy or CI system. Pending approvals can be handled through a local dashboard, terminal interface, or Telegram. Shotoku is in beta, with a stable, tested authorization path and end-to-end PayPal sandbox support, but its API may change.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.