What is Shotoku?
Shotoku is a local-first authorization layer for AI agents that spend through wallets or payment services. It evaluates budgets and policy rules before an agent’s payment action proceeds, then records whether the request was approved, denied, or sent for human review. Developers can add it through a TypeScript function or MCP server, or place it in front of an agent’s MCP servers. It does not hold funds, credentials, or private keys; payment execution stays with the agent’s existing payment rail.
Shotoku Features:
Per-Vendor Budgets: Set a maximum amount for each transaction and a rolling 24-hour vendor limit, alongside a daily cap for everything one agent spends.
Policy Configuration: Define budgets and rules in one YAML file so policy changes do not require embedding every condition in agent code.
Pre-Payment Decisions: Shotoku evaluates each spend request before payment, allowing it, denying it, or marking it pending approval when a limit is exceeded.
MCP Enforcement: Use its MCP server with compatible agents, or wrap the agent’s existing MCP servers so tool calls are checked before they reach services such as PayPal.
Local Decision Ledger: Record approved, denied, and pending decisions in a local append-only JSONL file, with structured reasons and decision IDs.
Human Approval Tools: Review pending requests through Telegram buttons, a local dashboard, or a terminal UI; only your Telegram taps approve or deny.
Signed Receipts: Approved decisions can carry short-lived signed tokens for a payment proxy or CI to verify before executing a payment.
Shotoku Benefits:
Bounded Agent Spend: Transaction, vendor, and agent-level limits help contain the amount an autonomous agent can spend without relying on it to follow instructions.
Selective Oversight: Small requests can proceed within policy while exceptions wait for a person, avoiding manual review of every routine payment.
Private Decisions: Keeping authorization and decision records on your machine means spending decisions do not need to pass through a Shotoku cloud service.
Clearer Troubleshooting: Decision records include outcomes and reasons, making it easier to understand why a spend was allowed, denied, or held.
Use Cases:
Autonomous Refunds: Set per-transaction and daily limits for an agent issuing refunds, letting ordinary amounts proceed while larger requests wait for approval.
MCP Payment Agents: Put spend checks in front of an MCP-connected agent that uses PayPal or other MCP servers to take payment-related actions.
Local Agent Development: Add authorization to a TypeScript-based agent and inspect its local decision history while testing spending policies.
Remote Approval: Route a pending spend decision to Telegram when you want to approve or deny an agent’s request without reviewing its terminal.

