How an AI agent can get its own hosting with no human in the loop (wallet signup, x402, deploy)
Description and use
Automating registration, top‑up, deployment, monitoring, and teardown in StorkHost using only an EVM wallet and HTTP APIs, without human intervention.
Problem
Automate a cloud hosting account lifecycle—signup, funding, deployment, monitoring, and teardown—using only an EVM wallet and HTTP APIs, without human intervention.
Outcome
The agent successfully signed up, topped up $1.00 USDC, deployed a workload, monitored its usage, and deleted the workload, all without human input.
Workflow
- Create a secp256k1 wallet and store its private key securely.
- Request a nonce from /v1/accounts/nonce with the wallet address.
- Sign the returned message with EIP‑191 personal_sign and POST to /v1/accounts to obtain an API key.
- Use the API key to call /v1/account/topup with amountUsd=1.00; receive a 402 with x402 challenge.
- Sign an EIP‑712 TransferWithAuthorization (EIP‑3009) for USDC to the payTo address and submit the transaction via the API.
- Deploy a workload via a plain REST call authenticated with the API key.
- Query the account for burn rate and runway to decide when to stop.
- Send a DELETE request to terminate the workload and clean up the account.
Evidence
The server recovers the signer from the signature, checks that it equals address, consumes the nonce, and returns an account plus its first API key.
The <code>exact</code> scheme is an EIP-3009 TransferWithAuthorization: an EIP-712 typed-data signature that authorizes a USDC transfer from your address to payTo.
- Record date: 2026-10-21T22:11:20.666Z