Skip to Content
px402Devnet
How it works

Hosted agent

How a hosted agent is created, funded, paid from, and revoked.

Devnet preview

Hosted agents change who you trust. px402 can sign payments within your caps and allowlist. While an agent’s session is warm, px402 holds its viewing keys and can read its balance and every payment.

Most hosted agents today use a Solana account in your own Turnkey sub-organization. px402 signs with a delegated key that Turnkey allows to sign for that one address only. The delegated key is held in AWS KMS.

Create and fund

Create and fund
  1. 01
    Your browser → TurnkeyEmail code or passkey. The session is for your own sub-organization.
  2. 02
    Your browser → TurnkeyThe agent's Solana account is made in your Turnkey wallet.
  3. 03
    Your browser → px402The web app registers the agent with px402, with its caps.
  4. 04
    Your browser → TurnkeyYou approve px402's delegated key for this agent.
  5. 05
    px402 → Turnkeypx402 checks the key can sign for that one address and nothing else. It repeats this each time it opens a session.
  6. 06
    px402 → TurnkeyOne signature gives px402 the agent's viewing keys.
  7. 07
    Your browser → TurnkeyYou sign a Rings deposit from your own account in the browser.
  8. 08
    Your browser → SolanaThe funds land in the agent private balance. A little SOL pays its fees. Both are public.
Public

Funding is publicly linkable: a deposit carries the agent’s address in clear data, so anyone can tie your funding wallet to the agent.

Pay

A hosted payment
  1. 01
    App or CLI → px402 walletThe app asks to pay one URL, with a new key for each intended payment.
  2. 02
    px402 walletA repeated key returns the earlier payment. Then: agent active, provider allowed, route payable, price, caps and rate. Nothing is signed until all pass.
  3. 03
    px402 walletThe cap reservation and allowlist are checked again in one database update.
  4. 04
    px402 wallet → Gatewaypx402 requests the route and gets the 402.
  5. 05
    px402 wallet → TurnkeyTurnkey signs, using the delegated key for this one address. The payment is recorded before it is broadcast.
  6. 06
    px402 wallet → SolanaThe same Rings transfer any agent makes.
  7. 07
    px402 wallet → GatewayThe gateway verifies and serves it like any other payment.
  8. 08
    px402 wallet → App or CLIThe provider response, or "pending" if the deadline passed after the transfer started.
  • A lost answer: retry with the same idempotency key. A new key is a new payment.
  • pending: the transfer may have happened. Check history before doing anything else. The provider’s response is not kept.
  • Providers see every hosted call arrive from px402’s address.

Limits you control

ActionWhereNeeds a fresh sign-in
Lower a cap, remove a providerWeb app or connectorNo
Raise a cap, add a providerWeb app onlyYes (adding a provider may ask)
WithdrawWeb app only, to a wallet you proved with a signatureYes
RevokeWeb app or connectorNo
Create an agentWeb appYes

Revoking stops the agent for good and signs out every connected app of yours at once. A withdrawal is public and links the agent’s address to your wallet.

What you are trusting

  • Whoever controls the px402 host could sign for every Turnkey-hosted agent, whatever Turnkey’s policies say.
  • Reading is wider than spending under Turnkey’s access model. The details are in Turnkey and px402.
  • px402 stores the agent’s address and its payments until 30 days after they settle.

Moving to TVC

A private preview runs an agent’s key and payment signing inside Turnkey Verifiable Cloud. See the TVC overview and how hosted payments move there.