RunBox — Paid Code Execution for AI Agents
by @daraijaola
Execute code in a remote, isolated Docker sandbox — paid autonomously with USDC on Stellar. Use when the user asks to run, execute, test, or benchmark code i...
# Python — data analysis
python3 {baseDir}/scripts/run.py --language python --code "
import statistics
data = [2,4,4,4,5,5,7,9]
print('mean:', statistics.mean(data))
print('stdev:', statistics.stdev(data))
"JavaScript — Node.js
python3 {baseDir}/scripts/run.py --language javascript --code "
const fib = n => n < 2 ? n : fib(n-1)+fib(n-2)
console.log([...Array(10).keys()].map(fib).join(', '))
"Bash — system inspection
python3 {baseDir}/scripts/run.py --language bash --code "uname -a && python3 --version"Go — compiled language
python3 {baseDir}/scripts/run.py --language go --code '
package main
import "fmt"
func main() { fmt.Println("Go in a Docker container!") }
'Get full JSON output (stdout, stderr, exit_code, execution_ms, session_token)
python3 {baseDir}/scripts/run.py --language python --code "print(42)" --jsonReuse a session — no second payment within 5 minutes
python3 {baseDir}/scripts/run.py --language python --code "print(42)" --session-token eyJ...Use testnet (free USDC from faucet — for development)
python3 {baseDir}/scripts/run.py --language python --code "print(1)" --testnet
| Variable | Required | Default | Notes |
|---|---|---|---|
| STELLAR_SECRET_KEY | YES | — | Starts with S. Your Stellar wallet secret. |
| RUNBOX_ENDPOINT | no | http://46.101.74.170:4001 | Override to point to testnet or self-hosted |
| STELLAR_NETWORK | no | mainnet | Set to testnet for free test payments |
| Error | Cause | Fix |
|---|---|---|
| STELLAR_SECRET_KEY not set | Missing env var | openclaw set-env STELLAR_SECRET_KEY=S... |
| Account not found | Account not created on Stellar | Fund via friendbot (testnet) or send XLM (mainnet) |
| Insufficient payment | Not enough USDC | Add USDC to your Stellar wallet |
| Transaction already used | Replay attack prevention | Each tx hash can only buy one session |
| Session not found or expired | Session > 5 min old | Pay for a new session |
| Unsupported language | Wrong language name | Use exact names from the table above |
clawhub install runbox