# VpsAgent

> Disposable VPS instances for AI agents. Pay via x402 (USDC on Base L2).
> Pay-on-success: charged only when the box is reachable on TCP :22.
> Failed provisions never settle — agent pays nothing.

No signup, no API key. Machine-to-machine over HTTP 402.

## Two product tracks

- **Sandbox** (Phase 2 — gated on DigitalOcean account verification): `sandbox_1h` / `sandbox_6h` / `sandbox_24h` at `$0.50` / `$2` / `$5`. 1 vCPU / 1 GB. Code execution, CI runs, browser automation, throw-away build envs.
- **Server** (live now): `server_{small,medium,large}_{1mo,12mo}` at `$9.99`–`$359.99`. 2–8 vCPU / 4–16 GB. Persistent rentals; renewable.

## API
- [OpenAPI spec](https://vpsagent.fly.dev/openapi.json): full machine-readable API.
- [Rendered docs](https://vpsagent.fly.dev/docs).

## Key endpoints
- `GET /catalog` — full SKU table, prices, availability (paid discovery, 0.01 USDC).
- `POST /rent` — 402 → sign EIP-3009 → 200 with `{rental_id, ipv4, expires_at, root_token}`. No settle until the box is up.
- `GET /instance/{rental_id}?token=…` — poll for running flag + IPv4.
- `GET /rentals/{rental_id}` — public status snapshot.
- `POST /rentals/{rental_id}/renew?token=…&periods=N` — extend expires_at; stack cap 1–12.

## Payment
- Network: `base`
- Asset: USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`)
- Scheme: x402 `exact` with deferred settlement. Server calls /settle only when the box is reachable; otherwise the authorization expires unused.
