agentbox-bootstrap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAgentBox Operating Instructions
AgentBox 操作说明
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.
你当前运行在专属的AgentBox agent上——这是单租户云实例,搭载OpenClaw网关、HTTPS、网页终端,以及用于x402微支付的Solana钱包。
Services
服务
| Service | Port | Managed by |
|---|---|---|
| OpenClaw gateway | :18789 (loopback) | |
| Caddy (HTTPS reverse proxy) | :443 | |
| ttyd (web terminal) | :7681 (loopback) | |
Caddy routes HTTPS traffic to the gateway and terminal. Do NOT modify Caddy or systemd configs directly.
| 服务 | 端口 | 管理方式 |
|---|---|---|
| OpenClaw 网关 | :18789 (环回地址) | |
| Caddy (HTTPS 反向代理) | :443 | |
| ttyd (网页终端) | :7681 (环回地址) | |
Caddy会将HTTPS流量路由到网关和终端。请勿直接修改Caddy或systemd配置。
Key paths
关键路径
| What | Path |
|---|---|
| OpenClaw config | |
| Solana wallet | |
| EVM wallet | |
| Mnemonic (root secret) | |
| Workspace | |
| Skills (managed) | |
| x402 plugin | |
| Gateway logs | |
| 项目 | 路径 |
|---|---|
| OpenClaw 配置 | |
| Solana 钱包 | |
| EVM 钱包 | |
| 助记词 (根密钥) | |
| 工作区 | |
| Skills (托管) | |
| x402 插件 | |
| 网关日志 | |
x402 payment plugin
x402 支付插件
The plugin patches 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.
openclaw-x402globalThis.fetchThe wallet at must have USDC balance for payments to work. Check balance with or:
~/.openclaw/agentbox/wallet-sol.json/x_walletbash
spl-token balance --owner $(solana address) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vopenclaw-x402globalThis.fetch路径 对应的钱包必须有USDC余额才能正常完成支付。你可以通过 或以下命令查询余额:
~/.openclaw/agentbox/wallet-sol.json/x_walletbash
spl-token balance --owner $(solana address) EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vCommands and tools
命令与工具
Slash commands:
- - wallet dashboard with balance, token holdings, recent transactions
/x_wallet - - send USDC to a Solana address
/x_wallet send <amount|all> <address> - - paginated transaction history
/x_wallet history [page] - - system overview (version, model, pricing, wallet summary)
/x_status - - update plugin and skills, restart gateway
/x_update
Agent tools:
- - check wallet SOL and USDC balances
x_balance - - swap any Solana token for another (SOL, USDC, meme tokens, any SPL token)
x_swap - - launch a new token on pump.fun
x_launch_token - - look up token price, market cap, volume, liquidity
x_token_info - - call any x402-enabled paid API
x_payment
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%).
斜杠命令:
- - 钱包面板,展示余额、代币持有情况、最近交易记录
/x_wallet - - 向Solana地址发送USDC
/x_wallet send <amount|all> <address> - - 分页查看交易历史
/x_wallet history [page] - - 系统概览(版本、模型、定价、钱包摘要)
/x_status - - 更新插件和skills,重启网关
/x_update
Agent 工具:
- - 查询钱包SOL和USDC余额
x_balance - - 兑换任意Solana代币(SOL、USDC、meme币、任意SPL代币)
x_swap - - 在pump.fun上发行新代币
x_launch_token - - 查询代币价格、市值、交易量、流动性
x_token_info - - 调用任意支持x402的付费API
x_payment
兑换操作使用Jupiter聚合器实现最优路由,债券曲线代币会自动回退到PumpPortal。金额单位为输入代币单位,滑点以基点计算(默认: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.
本实例预装了LLM提供商(blockrun),使用x402进行支付。要使用OpenRouter等其他提供商,请参阅下方的OpenRouter设置部分。
OpenRouter Setup
OpenRouter 设置
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:
bash
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: , , , . Full list at https://openrouter.ai/models.
openrouter/anthropic/claude-sonnet-4-5openrouter/anthropic/claude-opus-4-6openrouter/openai/gpt-4oopenrouter/google/gemini-2.5-proSwitch model later (without re-entering API key):
bash
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如需将OpenRouter配置为LLM提供商(可通过单个API key访问Claude、GPT、Gemini等更多模型):
-
配置OpenClaw:
bash
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- 重启网关:
openclaw gateway restart
热门模型:、、、。完整列表可查看https://openrouter.ai/models。
openrouter/anthropic/claude-sonnet-4-5openrouter/anthropic/claude-opus-4-6openrouter/openai/gpt-4oopenrouter/google/gemini-2.5-pro后续切换模型(无需重新输入API key):
bash
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 restartRestarting the gateway
重启网关
After any config change to :
~/.openclaw/openclaw.jsonbash
openclaw gateway restartCheck status:
bash
openclaw status每次修改配置后执行:
~/.openclaw/openclaw.jsonbash
openclaw gateway restart查看状态:
bash
openclaw statusUpdating skills
更新Skills
To get the latest AgentBox skills:
bash
npx skills add -g cascade-protocol/agentboxSkills are installed to (OpenClaw's managed skills path, auto-discovered). Changes take effect on the next new session.
~/.openclaw/skills/获取最新的AgentBox skills:
bash
npx skills add -g cascade-protocol/agentboxSkills会安装到(OpenClaw的托管skill路径,会自动发现)。修改会在下一次新会话生效。
~/.openclaw/skills/Troubleshooting
故障排查
- Gateway won't start: Check and gateway logs at
openclaw status~/.openclaw/logs/ - x402 payments failing: Check USDC balance (see above). Wallet needs USDC on Solana mainnet.
- Config changes not taking effect: Run after editing
openclaw gateway restart~/.openclaw/openclaw.json - Skills not showing: Check . Run
ls ~/.openclaw/skills/to refresh.npx skills add -g cascade-protocol/agentbox - "Invalid API key" (OpenRouter): Verify the key starts with and has credit on https://openrouter.ai/credits
sk-or- - 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 .
- 网关无法启动:查看和
openclaw status下的网关日志~/.openclaw/logs/ - x402支付失败:检查USDC余额(见上文),钱包需要在Solana主网有USDC
- 配置修改未生效:编辑后执行
~/.openclaw/openclaw.jsonopenclaw gateway restart - Skills未显示:执行检查,运行
ls ~/.openclaw/skills/刷新npx skills add -g cascade-protocol/agentbox - OpenRouter提示「无效API key」:确认密钥前缀为,且https://openrouter.ai/credits页面有余额
sk-or- - OpenRouter模型无响应:查看https://openrouter.ai/models确认模型可用性
- 编辑后配置损坏:执行检查JSON语法
cat ~/.openclaw/openclaw.json | jq .
Important rules
重要规则
- Always use to restart the gateway. Never use systemctl directly for the gateway.
openclaw gateway restart - When editing , read the current file first, modify it, write it back. Don't write partial configs.
~/.openclaw/openclaw.json - The wallet keys are at (wallet-sol.json, wallet-evm.key, mnemonic). Never share them or display them to users.
~/.openclaw/agentbox/
- 始终使用重启网关,请勿直接使用systemctl操作网关
openclaw gateway restart - 编辑时,请先读取当前文件内容,修改后再写回,不要写入部分配置
~/.openclaw/openclaw.json - 钱包密钥存放在下(wallet-sol.json、wallet-evm.key、mnemonic),请勿共享或向用户展示
~/.openclaw/agentbox/