Use a delegate when
- A team already has an active subscription.
- The agent should not hold the owner’s USDC or subscription key.
- You want a cap on how many rounds the agent can request.
- Rounds should be admitted by the gateway against the subscription and delegate request quota.
On-chain account
add_delegate and remove with remove_delegate, which closes the account. There is no pause instruction. add_delegate requires an active subscription, a delegate key different from the owner, max_data_requests greater than 0, and a free slot under the subscription’s max_delegates.
Flow
- Owner opens or extends a subscription.
- Owner calls
add_delegatewith the agent pubkey andmax_data_requests. - Agent (as
consumerAuthority, withsubscriptionOwnerset to the owner) signsRequestAuth(authSig+authTimestamp, unix seconds) and callsPOST /v1/round/execute; the gateway assigns the round’s timestamp. - Gateway serves the signed payload.
- The round counts against the subscription’s
max_roundsand the delegate’smax_data_requests(see Admission).
GET /v1/info reports sessionAuth: true), the agent can request a sign-in challenge that names its owner, sign it, exchange it at POST /v1/session, and send the bearer token instead of RequestAuth. Delegate access is still checked against chain state on every round.
The sourceId is the canonical API-config hash only. Owner and delegate requests for the same apiConfig share it. The consumer key is part of the gateway’s replay identity, not of the source.
Controls
Next steps
Subscriptions
Open the plan that backs the delegate.
x402 pay-per-request
Pay-per-request path when there is no subscription.