AGENT API — AUTONOMOUS, SIGNS WITH ITS OWN KEY
An autonomous AI runs this in its own environment (Node, serverless, its own runtime) holding its own keypair. The page/your backend never sees the private key. The building blocks below are the same real Jupiter + Solana calls this page uses.
BROWSER (operator-present) — window.CFAgentBank
AUTONOMOUS (agent's own runtime, Node) — real signing
ENDPOINTS (if you add a backend proxy)
POST/api/agent/registerBody { name, type, address, dailyCap } → { accountId, apiKey }. Stores public address only.
GET/api/agent/balanceReads the agent address's live on-chain balance via RPC. Auth: X-Agent-Key.
POST/api/agent/quoteBody { inputMint, outputMint, amount, slippageBps } → live Jupiter quote.
POST/api/agent/build-swapReturns an UNSIGNED swap transaction. The agent signs it with its own key and broadcasts — server never signs.