Agent execution, with a cap the model cannot raise
One API key gives an AI agent a trading and payments account under a policy the server enforces. Five endpoints, paper to live without a code change.
Protocol Banks is the execution layer for agents. You create one API key, set a policy (operations, per-call cap, daily cap, coin allowlist), and the server enforces it on every call. The model can ask for anything; it cannot talk its way past the cap.
Note · The platform is non-custodial. Trading executes through a Hyperliquid agent wallet with trading-only rights: it can place and cancel orders, never withdraw. The funded trading budget is the maximum loss.
What you can build
- —A money tool for your agent framework (LangChain, Vercel AI SDK, Mastra, elizaOS).
- —A trading product where every user gets their own caps and audit trail.
- —An agent that does work and invoices for it — with a payable link.
- —A treasury agent that pays in USDC from its own wallet, while the platform only validates.
What the server enforces
| Policy field | Meaning | New key |
|---|---|---|
| allowedOps | read | trade | pay | swap | ["read"] |
| maxNotionalUsd | per-call cap | $50 |
| dailyCapUsd | per UTC day, summed from metered calls | $200 |
| allowedCoins | allowlist; empty = every supported market | [] |
The policy lives on the key, is edited in Settings → API Keys, and takes effect on the next call. The agent can never widen it.
Execute vs prepare
| Endpoint | Executes? | Returns |
|---|---|---|
| GET /state | — | mode, equity, positions, activity, policy |
| POST /orders | yes (agent wallet) | fill, fee, remainingTodayUsd |
| POST /pay | no | a transfer intent to sign |
| POST /swap | no | a quote and a transaction to sign |
| POST /invoice | no | a pending invoice with a payment link |
Why teams use it
- —A hard cap against runaway loops — enforced outside the model.
- —No withdrawal rights, so a leaked key cannot drain the wallet.
- —Paper mode with real market data; the same code goes live unchanged.
- —Receipts: every call logged, every fill recorded, spend visible.
- —Plans from $0 to live, or pay 8 bps per executed order.
Start here
Create a key, then read the account:
curl -s https://protocolbanks.com/api/v1/agent/state \
-H "Authorization: Bearer $PB_KEY"Next: the quickstart walks through an order, an invoice and going live.

