|
| 1 | +# Spraay — Crypto Payment Sandbox for OpenShell |
| 2 | + |
| 3 | +OpenShell sandbox image pre-configured with [Spraay](https://spraay.app) for AI agent crypto payments via the x402 protocol. |
| 4 | + |
| 5 | +## What's Included |
| 6 | + |
| 7 | +| Component | Description | |
| 8 | +|-----------|-------------| |
| 9 | +| **Spraay CLI** | Shell wrapper for 76+ paid gateway endpoints across 13 blockchains | |
| 10 | +| **x402 Protocol** | HTTP 402-based micropayment protocol — agents pay per request with USDC | |
| 11 | +| **Agent Skills** | Pre-built skills for batch payments, escrow, payroll, token swaps, and Robot Task Protocol (RTP) | |
| 12 | +| **Multi-Chain** | Base, Ethereum, Arbitrum, Polygon, BNB, Avalanche, Solana, Bitcoin, Stacks, Unichain, Plasma, BOB, Bittensor | |
| 13 | + |
| 14 | +## Quick Start |
| 15 | + |
| 16 | +### Using the pre-built image |
| 17 | + |
| 18 | +```bash |
| 19 | +openshell sandbox create --from spraay -- claude |
| 20 | +``` |
| 21 | + |
| 22 | +### Building locally |
| 23 | + |
| 24 | +```bash |
| 25 | +docker build -t openshell-spraay \ |
| 26 | + --build-arg BASE_IMAGE=ghcr.io/nvidia/openshell-community/sandboxes/base:latest . |
| 27 | +``` |
| 28 | + |
| 29 | +Then launch: |
| 30 | + |
| 31 | +```bash |
| 32 | +openshell sandbox create --from openshell-spraay -- claude |
| 33 | +``` |
| 34 | + |
| 35 | +## Environment Variables |
| 36 | + |
| 37 | +| Variable | Required | Description | |
| 38 | +|----------|----------|-------------| |
| 39 | +| `SPRAAY_GATEWAY_URL` | No | Gateway URL (default: `https://gateway.spraay.app`) | |
| 40 | +| `SPRAAY_PAYMENT_ADDRESS` | Yes | Your wallet address for x402 payments | |
| 41 | +| `SPRAAY_CHAIN` | No | Default chain (default: `base`) | |
| 42 | + |
| 43 | +## Skills |
| 44 | + |
| 45 | +The sandbox ships with agent skills in `.agents/skills/`: |
| 46 | + |
| 47 | +| Skill | Description | |
| 48 | +|-------|-------------| |
| 49 | +| `spraay-payments` | Batch send tokens to multiple recipients on any supported chain | |
| 50 | +| `spraay-escrow` | Create and manage escrow contracts with milestone-based releases | |
| 51 | +| `spraay-rtp` | Robot Task Protocol — hire robots and IoT devices via x402 micropayments | |
| 52 | +| `spraay-gateway` | Query gateway endpoints, check pricing, discover available routes | |
| 53 | + |
| 54 | +## Network Policy |
| 55 | + |
| 56 | +The default network policy allows egress to: |
| 57 | + |
| 58 | +- `gateway.spraay.app` — Spraay x402 gateway (HTTPS) |
| 59 | +- `*.infura.io` — RPC provider (HTTPS) |
| 60 | +- `*.alchemy.com` — RPC provider (HTTPS) |
| 61 | +- `*.base.org` — Base chain RPC (HTTPS) |
| 62 | + |
| 63 | +All other egress is denied by default. Customize via OpenShell policy overrides. |
| 64 | + |
| 65 | +## How x402 Works Inside the Sandbox |
| 66 | + |
| 67 | +1. Agent calls a Spraay gateway endpoint (e.g., `/v1/batch-send`) |
| 68 | +2. Gateway returns HTTP `402 Payment Required` with a payment header |
| 69 | +3. Agent signs USDC payment using its configured wallet |
| 70 | +4. Gateway verifies payment on-chain and executes the request |
| 71 | +5. Agent receives the result |
| 72 | + |
| 73 | +The sandbox enforces that all payment signing happens within the isolated environment. Private keys never leave the sandbox boundary. |
| 74 | + |
| 75 | +## Use Cases |
| 76 | + |
| 77 | +- **Autonomous payroll**: Agent runs scheduled batch payments to employees/contractors |
| 78 | +- **Escrow automation**: Agent creates milestone-based escrow for freelance work |
| 79 | +- **Robot hiring**: Agent uses RTP to commission physical tasks from IoT devices |
| 80 | +- **Multi-chain treasury**: Agent manages token distributions across 13+ chains |
| 81 | +- **DCA/Scheduled swaps**: Agent executes dollar-cost averaging strategies |
| 82 | + |
| 83 | +## Resources |
| 84 | + |
| 85 | +- [Spraay Gateway Docs](https://docs.spraay.app) |
| 86 | +- [x402 Protocol Spec](https://www.x402.org) |
| 87 | +- [Spraay MCP Server](https://smithery.ai/server/@plagtech/spraay-x402-mcp) |
| 88 | +- [OpenShell Documentation](https://docs.nvidia.com/openshell/latest/index.html) |
| 89 | + |
| 90 | +## License |
| 91 | + |
| 92 | +Apache 2.0 — see [LICENSE](../../LICENSE). |
0 commit comments