01What is x402
x402 revives a status code the web reserved decades ago but never used — HTTP 402, "Payment Required" — and turns it into a working payment layer for software.
When an agent requests something that costs money, the service answers 402 with a small, machine-readable description of what to pay: which asset, how much, and where. The agent pays on-chain, retries with proof of payment, and the service delivers. The whole exchange happens in two round-trips, in code, with no human, no account creation, and no stored card.
For autonomous agents this is the missing piece. It lets software pay for exactly what it uses, the instant it uses it — metered, permissionless, and settled in stablecoins — the way APIs should have worked in a world where the customer is a machine.
02Why it fits Kestrel
Kestrel is already agentic: each portfolio is run by an autonomous advisor. x402 extends that from the inside out — it lets other agents become clients of the advisor.
A treasury agent managing idle stablecoins, a fund's execution bot, or a personal AI assistant can allocate capital into a professionally-constructed, self-rebalancing portfolio without a human ever opening an app. The agent pays per action; Kestrel does the disciplined work — target allocations, drift-band rebalancing, non-custodial execution — and reports back in a format another machine can act on.
Agentic capital needs an agentic advisor. x402 is the rail that connects them — pay-per-use access to a rules-based portfolio manager, priced by the request and settled on-chain.
03Adding an x402 agent
Onboarding an agent takes no keys to provision and no account to create. Your agent needs a funded wallet and the ability to make HTTP requests — the payment flow does the rest.
- Point & call. Direct your agent at the Kestrel action endpoint (open, fund, query, or rebalance-check).
- Handle the 402. Read the payment requirements returned with the 402 response.
- Pay & retry. Settle on-chain and re-send the request with the payment proof attached.
- Operate. Kestrel verifies and executes within the agent's granted, non-custodial mandate.
# 1. agent asks to open a portfolio POST /v1/portfolio/open # 2. Kestrel: payment required HTTP/1.1 402 Payment Required { "asset": "USDC", "amount": "5.00", "pay_to": "kestrel…9dPq", "nonce": "…" } # 3. agent pays on-chain, retries with proof POST /v1/portfolio/open X-Payment: <settled-tx-signature> # 4. access granted HTTP/1.1 200 OK { "portfolio": "Soar", "status": "active" }
Endpoint names and amounts above are illustrative — the live specification is shared with approved early-access partners.
04What agents can do
An x402 agent operates inside a fixed, transparent mandate. It can:
- Open & fund a managed portfolio at a chosen risk level.
- Read state — current allocations, net asset value, and drift versus target.
- Trigger a rebalance-check — Kestrel evaluates drift and, if a holding is past its band, restores the target.
- Subscribe to ongoing advisory so the portfolio stays managed without further prompting.
What it cannot do is exactly what a good advisor never would: it cannot speculate outside the mandate, add leverage, or move assets anywhere but between approved holdings.
05Guardrails
Agent access inherits every discipline of the core methodology — nothing is relaxed because the client is a machine:
- Rebalance-only. The advisor's authority is limited to whitelisted-asset swaps; withdrawals to the advisor are impossible by construction.
- Capped & screened. Single-name weights are capped and the universe is screened before anything can be bought.
- Metered by design. Each action is a discrete, priced request — no open-ended access, no standing spend.
- Auditable. Every payment and every rebalance is an on-chain transaction the owner can verify.
06Security
x402 access is built to be safe for a counterparty you can't see — because the counterparty is code.
- Non-custodial. Funds stay in a wallet the owner controls; Kestrel never takes custody.
- Verified settlement. Every request is fulfilled only against a confirmed on-chain payment, with replay and spoof protection.
- Least privilege. An agent holds exactly the rebalance-only mandate it was granted — and no more — and it can be revoked at any time.
The result is a payment surface an autonomous agent can use confidently, and one that can never be turned against the assets it manages.