Skip to Content
px402Devnet
How it works

Self-held agent

Where the key lives and what limits spending when you run the agent.

Set up and pay
  1. 01
    You → Agent machineA Solana key is created locally and encrypted under your passphrase.
  2. 02
    You → Solana + HeliusYou fund the agent address. This is public on chain.
  3. 03
    Agent machine → Solana + HeliusThe agent moves public USDC into its private balance. The deposit is public.
  4. 04
    You → Agent machineYou set per-request, daily and total caps, stored on this machine.
  5. 05
    Agent machine → px402 gatewayThe agent requests the route and gets a 402.
  6. 06
    Agent machine → Solana + HeliusThe agent signs and sends the transfer through your own Helius key.
  7. 07
    Agent machine → px402 gatewayThe agent proves it paid and gets the response.

What is on your disk

Everything is under $PX402_HOME/<profile>/ (by default ~/.px402/default/):

FileWhat it is
key.jsonThe key seed, encrypted with scrypt and AES-256-GCM
caps.jsonYour spending caps
journal.sqliteEvery payment: reserved, submitted, served, rejected or released

Back up key.json and remember the passphrase. px402 does not hold your key and cannot recover it.

What limits spending

LimitSet withChecked
Highest price you acceptPX402_MAX_PRICE_BASEBefore reserving
Origins you may payPX402_ALLOWED_ORIGINSBefore reserving
Per request, rolling 24 hours, totalpx402 caps set or PX402_CAP_*_BASEIn the same SQLite transaction that reserves the payment

These caps protect you. They are enforced on your machine, so they are only as safe as that machine.

What px402 sees

Only the payments your agent makes to providers it serves. It never receives your key or your balance. Your RPC, indexer and prover traffic goes to Helius with your own API key.