agentbox-bootstrap
AgentBox Operating Instructions
You are running on a dedicated AgentBox agent - a single-tenant cloud instance with OpenClaw gateway, HTTPS, web terminal, and a Solana wallet for x402 micropayments.
Services
| Service | Port | Managed by |
|---|---|---|
| OpenClaw gateway | :18789 (loopback) | openclaw gateway restart |
| Caddy (HTTPS reverse proxy) | :443 | sudo systemctl restart caddy |
| ttyd (web terminal) | :7681 (loopback) | sudo systemctl restart ttyd |
Caddy routes HTTPS traffic to the gateway and terminal. Do NOT modify Caddy or systemd configs directly.
Key paths
| What | Path |
|---|---|
| OpenClaw config | ~/.openclaw/openclaw.json |
| Solana wallet | ~/.openclaw/agentbox/wallet-sol.json |
| EVM wallet | ~/.openclaw/agentbox/wallet-evm.key |
| Mnemonic (root secret) | ~/.openclaw/agentbox/mnemonic |
| Workspace | ~/.openclaw/workspace/ |
| Skills (managed) | ~/.openclaw/skills/ |
| x402 plugin | ~/.openclaw/extensions/openclaw-x402/ |
| Gateway logs | ~/.openclaw/logs/ |
x402 payment plugin
The openclaw-x402 plugin patches globalThis.fetch to handle HTTP 402 Payment Required responses automatically. When an LLM inference call returns 402, the plugin signs a USDC payment on Solana and retries. This is transparent - you don't need to do anything special.
The wallet at ~/.openclaw/agentbox/wallet-sol.json must have USDC balance for payments to work. Check balance with /x_wallet or:
spl-token balance --owner $(solana address) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Commands and tools
Slash commands:
/x_wallet- wallet dashboard with balance, token holdings, recent transactions/x_wallet send <amount|all> <address>- send USDC to a Solana address/x_wallet history [page]- paginated transaction history/x_status- system overview (version, model, pricing, wallet summary)/x_update- update plugin and skills, restart gateway
Agent tools:
x_balance- check wallet SOL and USDC balancesx_swap- swap any Solana token for another (SOL, USDC, meme tokens, any SPL token)x_launch_token- launch a new token on pump.funx_token_info- look up token price, market cap, volume, liquidityx_payment- call any x402-enabled paid API
Swaps use Jupiter aggregator for best routing, with automatic fallback to PumpPortal for bonding curve tokens. Amount is in input token units, slippage in basis points (default: 250 = 2.5%).
Default model provider
This instance comes with a preconfigured LLM provider (blockrun) that uses x402 for payments. To use a different provider like OpenRouter, see the OpenRouter Setup section below.
OpenRouter Setup
To configure OpenRouter as LLM provider (access to Claude, GPT, Gemini, and more via a single API key):
-
Get an API key: Sign up at https://openrouter.ai, go to https://openrouter.ai/keys, create a key (starts with
sk-or-) -
Configure OpenClaw:
jq --arg key "sk-or-USER_KEY_HERE" \
--arg model "openrouter/anthropic/claude-sonnet-4-5" \
'.env.OPENROUTER_API_KEY = $key | .agents.defaults.model.primary = $model' \
~/.openclaw/openclaw.json > /tmp/openclaw-update.json \
&& mv /tmp/openclaw-update.json ~/.openclaw/openclaw.json
- Restart gateway:
openclaw gateway restart
Popular models: openrouter/anthropic/claude-sonnet-4-5, openrouter/anthropic/claude-opus-4-6, openrouter/openai/gpt-4o, openrouter/google/gemini-2.5-pro. Full list at https://openrouter.ai/models.
Switch model later (without re-entering API key):
jq --arg model "openrouter/anthropic/claude-opus-4-6" \
'.agents.defaults.model.primary = $model' \
~/.openclaw/openclaw.json > /tmp/openclaw-update.json \
&& mv /tmp/openclaw-update.json ~/.openclaw/openclaw.json
openclaw gateway restart
Restarting the gateway
After any config change to ~/.openclaw/openclaw.json:
openclaw gateway restart
Check status:
openclaw status
Updating skills
To get the latest AgentBox skills:
npx skills add -g cascade-protocol/agentbox
Skills are installed to ~/.openclaw/skills/ (OpenClaw's managed skills path, auto-discovered). Changes take effect on the next new session.
Troubleshooting
- Gateway won't start: Check
openclaw statusand gateway logs at~/.openclaw/logs/ - x402 payments failing: Check USDC balance (see above). Wallet needs USDC on Solana mainnet.
- Config changes not taking effect: Run
openclaw gateway restartafter editing~/.openclaw/openclaw.json - Skills not showing: Check
ls ~/.openclaw/skills/. Runnpx skills add -g cascade-protocol/agentboxto refresh. - "Invalid API key" (OpenRouter): Verify the key starts with
sk-or-and has credit on https://openrouter.ai/credits - Model not responding (OpenRouter): Check model availability on https://openrouter.ai/models
- Config broken after edit: Check JSON syntax with
cat ~/.openclaw/openclaw.json | jq .
Important rules
- Always use
openclaw gateway restartto restart the gateway. Never use systemctl directly for the gateway. - When editing
~/.openclaw/openclaw.json, read the current file first, modify it, write it back. Don't write partial configs. - The wallet keys are at
~/.openclaw/agentbox/(wallet-sol.json, wallet-evm.key, mnemonic). Never share them or display them to users.
More from cascade-protocol/agentbox
agentbox
Provision dedicated AI agents on AgentBox via x402 payment ($5 USDC on Solana). Use when creating cloud instances running OpenClaw AI gateways with HTTPS and web terminal. Requires Node.js and a Solana wallet.json with USDC funds. Covers: provisioning new instances, polling status, interacting via OpenAI-compatible chat completions, extending, and listing instances.
47agentbox-twitter
Twitter/X research via paid API: search tweets with 50+ operators, fetch tweets with threads/replies/quotes, get user profiles with tweets/followers/following. Uses x_payment tool for automatic USDC micropayments ($0.003/call). Use when: (1) searching tweets by keyword, user, or advanced operators, (2) fetching specific tweets by ID/URL with context, (3) looking up user profiles and their activity.
41web
Web scraping and search via paid API: crawl any URL with cascade escalation (fast HTTP -> browser -> stealth+proxy), bulk crawl multiple URLs, and search the web via Exa. Uses x_payment tool for automatic USDC micropayments ($0.005/crawl, $0.01/search). Use as escalation when built-in web_fetch fails or is blocked. Use when: (1) web_fetch returned empty/blocked content, (2) scraping JS-rendered or anti-bot protected pages, (3) bulk-crawling multiple URLs, (4) searching the web by query via Exa.
39arena-trader
Trading personality and arena behavior for pump.fun token trading. Governs how the agent trades, announces trades, reacts to other agents, and handles wins and losses in the shared arena group.
31agentbox-inference
LLM inference via paid API: OpenAI-compatible chat completions proxied through x402 providers. Supports Kimi K2.5, MiniMax M2.5. Uses x_payment tool for automatic USDC micropayments ($0.001-$0.003/call). Use when: (1) generating text with a specific model, (2) running chat completions through a pay-per-request LLM endpoint, (3) comparing outputs across models.
30agentbox-provision
Provision dedicated AI agent VMs on AgentBox via x402 payment ($5 USDC on Solana). Use when creating cloud instances running OpenClaw AI gateways with HTTPS and web terminal. Requires Node.js and a Solana wallet.json with USDC funds. Covers: provisioning new instances, polling status, interacting via OpenAI-compatible chat completions, extending, and listing instances.
1