{"uid":"cap_lbjlNlY6cnn5ak-aKyoq_","slug":"agent-exec-code-execution-sandbox-f387002f","name":"Agent-Exec Code Execution Sandbox","description":"Accountless, pay-per-use code execution for software agents: submit source code, get stdout, stderr and exit code back from an isolated, network-less sandbox. No account, no API key -- possession of valid payment is sufficient.","url":"https://agent-exec.45.67.221.128.sslip.io/execute","method":"POST","headers":{},"bodySchema":{"type":"object","required":["source","runtime"],"properties":{"files":{"type":"object","description":"Extra files seeded alongside the entry file, as relative-path -> content."},"stdin":{"type":"string","description":"Written to the payload's stdin, then stdin is closed."},"limits":{"type":"object","description":"Per-request resource budget. Every field is optional; an omitted field takes its documented default. A field outside [minimum, maximum] is rejected outright, never clamped."},"source":{"type":"string","description":"Program source, written to the runtime's entry file."},"runtime":{"enum":["python3","node"],"type":"string","description":"Must be one of the allowlisted runtimes named here -- this enum (and x-runtimes) is the free way to learn the set. An unsupported value is refused only AFTER a payment attempt, as RUNTIME_UNSUPPORTED, not before."}}},"responseSchema":{"type":"object","required":["outcome","stdout","stderr","exitCode","durationMs","truncated","error","payment","receipt"],"properties":{"error":{"type":["object","null"],"properties":{"code":{"enum":["SANDBOX_INVALID_REQUEST","RUNTIME_RESERVED_FILE_PATH","REQUEST_MALFORMED","PAYMENT_MALFORMED","RUNTIME_UNSUPPORTED","RUNTIME_LIMIT_OUT_OF_RANGE","SANDBOX_TIMEOUT","EXECUTION_MEMORY_LIMIT_EXCEEDED","EXECUTION_OUTPUT_LIMIT_EXCEEDED","SERVICE_BUSY","PAYER_RATE_LIMITED","PAYER_CONCURRENCY_LIMITED","EXECUTE_IP_RATE_LIMITED","EXECUTION_RUNTIME_ERROR","EXECUTION_RUNTIME_ERROR_POSSIBLE_SANDBOX_DENIAL","PAYMENT_INVALID","PAYMENT_AMOUNT_INSUFFICIENT","PAYMENT_REQUIREMENTS_MISMATCH","PAYMENT_REPLAYED","PAYMENT_SETTLEMENT_FAILED","PAYMENT_SETTLEMENT_INDETERMINATE","SANDBOX_UNAVAILABLE","SANDBOX_SETUP_FAILED","SERVICE_INTERNAL_FAILURE","PAYMENT_FACILITATOR_UNAVAILABLE"],"type":"string"},"message":{"type":"string"},"billable":{"type":"boolean"},"category":{"type":"string"}},"description":"Null when `outcome` is \"completed\"."},"stderr":{"type":"string"},"stdout":{"type":"string"},"outcome":{"enum":["completed","timeout","error"],"type":"string"},"payment":{"type":"object","properties":{"asset":{"type":"string"},"payer":{"type":"string","description":"The paying wallet's address."},"amount":{"type":"string","description":"Atomic units of the settlement asset that were charged."},"network":{"type":"string"},"transaction":{"type":"string","description":"On-chain settlement transaction hash."}},"description":"The payer is surfaced because it is this service's notion of identity (build.md: the wallet is the account) -- per-payer rate limits and standing are built on it."},"receipt":{"type":"object","required":["requestDigest","payment","priceUsd","price","tier","limits","usage","status","outputDigest"],"properties":{"tier":{"type":"string"},"price":{"type":"string","description":"The same amount as `priceUsd`, formatted as an x402 price string (e.g. \"$1.0000\")."},"usage":{"type":"object","required":["outcome","durationMs","exitCode","truncated"],"properties":{"outcome":{"enum":["completed","timeout","error"],"type":"string"},"exitCode":{"type":["integer","null"]},"truncated":{"type":"object","required":["stdout","stderr"],"properties":{"stderr":{"type":"boolean"},"stdout":{"type":"boolean"}}},"durationMs":{"type":"number"}}},"limits":{"type":"object","required":["timeoutMs","maxMemoryBytes","maxOutputBytes","workDirBytes"],"properties":{"timeoutMs":{"type":"number"},"workDirBytes":{"type":"number"},"maxMemoryBytes":{"type":"number"},"maxOutputBytes":{"type":"number"}},"description":"The purchased resource budget, normalized -- every field filled in, omitted request fields resolved to their documented default."},"status":{"type":"object","required":["code","category","billable"],"properties":{"code":{"enum":["SANDBOX_INVALID_REQUEST","RUNTIME_RESERVED_FILE_PATH","REQUEST_MALFORMED","PAYMENT_MALFORMED","RUNTIME_UNSUPPORTED","RUNTIME_LIMIT_OUT_OF_RANGE","SANDBOX_TIMEOUT","EXECUTION_MEMORY_LIMIT_EXCEEDED","EXECUTION_OUTPUT_LIMIT_EXCEEDED","SERVICE_BUSY","PAYER_RATE_LIMITED","PAYER_CONCURRENCY_LIMITED","EXECUTE_IP_RATE_LIMITED","EXECUTION_RUNTIME_ERROR","EXECUTION_RUNTIME_ERROR_POSSIBLE_SANDBOX_DENIAL","PAYMENT_INVALID","PAYMENT_AMOUNT_INSUFFICIENT","PAYMENT_REQUIREMENTS_MISMATCH","PAYMENT_REPLAYED","PAYMENT_SETTLEMENT_FAILED","PAYMENT_SETTLEMENT_INDETERMINATE","SANDBOX_UNAVAILABLE","SANDBOX_SETUP_FAILED","SERVICE_INTERNAL_FAILURE","PAYMENT_FACILITATOR_UNAVAILABLE",null],"type":["string","null"]},"billable":{"type":"boolean"},"category":{"enum":["invalid_request","unsupported_runtime","limit_out_of_range","timeout","memory_exceeded","output_limit_exceeded","service_busy","runtime_error","payment_required","settlement_failed","settlement_indeterminate","internal_failure","success"],"type":"string"}},"description":"From `classify()` -- the same wire taxonomy every error response already uses, rather than a receipt-local status string that could disagree with `error.category`."},"payment":{"type":"object","required":["payer","amount","asset","network","reference"],"properties":{"asset":{"type":"string"},"payer":{"type":"string","description":"The paying wallet's address."},"amount":{"type":"string","description":"Atomic units of the settlement asset that were charged."},"network":{"type":"string"},"reference":{"type":"string","description":"The facilitator's settlement transaction hash -- the on-chain reference for this payment."}}},"priceUsd":{"type":"number","description":"From `priceForLimits()` -- mechanically equal to what POST /quote returns for `limits`."},"outputDigest":{"type":"string","description":"A hash of exactly the fields returned as the run's result (`outcome`, `stdout`, `stderr`, `exitCode`, `truncated`) -- `durationMs` is deliberately excluded."},"requestDigest":{"type":"string","description":"sha256(rawBody) hex-encoded -- the exact bytes this request sent, hashed with nothing normalized or reinterpreted."}},"description":"Cryptographically binds this exact payment to this exact request and this exact output (src/receipts/receipt.ts) -- so the caller can recompute `requestDigest`/`outputDigest` itself without trusting this service's parsing, rather than a mere echo of what was already charged."},"exitCode":{"type":["integer","null"]},"truncated":{"type":"object","required":["stdout","stderr"],"properties":{"stderr":{"type":"boolean"},"stdout":{"type":"boolean"}}},"durationMs":{"type":"number"}},"description":"This route is paid on every call (POST /execute mounts no free path), so `payment` and `receipt` are always present alongside the run's own fields -- per src/runtime/types.ts's `ExecuteResult` plus what src/app.ts merges in once settlement succeeds."},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eFWKpvltgHjdot5zZRhwi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Executes Python 3 or Node.js code in an isolated, network-less sandbox and returns stdout, stderr, and exit code as JSON","exampleAgentPrompt":"Run this Python 3 snippet for me in an isolated sandbox and give me the stdout output: `import math; print(math.factorial(20))`","exampleUseCases":[{"title":"Quick Python math computation","prompt":"Calculate the first 50 Fibonacci numbers using this Python script and give me the output: `a,b=0,1\nfor _ in range(50): print(a); a,b=b,a+b`"},{"title":"Node.js JSON transformation script","prompt":"Run this Node.js code in a sandbox and return what it prints: `const data={scores:[88,92,75,100]}; console.log(JSON.stringify({avg: data.scores.reduce((a,b)=>a+b)/data.scores.length}))`"},{"title":"Validate algorithm logic output","prompt":"Execute this Python 3 code in a safe sandbox and tell me what gets printed and whether it exits cleanly: `def is_prime(n): return all(n%i!=0 for i in range(2,int(n**0.5)+1)); print([x for x in range(2,30) if is_prime(x)])`"}],"resultDescription":"A JSON object containing three fields: stdout (the standard output produced by the script), stderr (any error messages or warnings), and exit code (integer indicating success or failure — 0 for success, non-zero for errors)","failureModes":["Script syntax error returns non-zero exit code with stderr containing the traceback","Network calls inside the sandbox fail because it is network-less — any HTTP request or socket use will error","Execution timeout if script runs too long","Unsupported language identifier results in error","Payment failure over x402 returns 402 response before code is run"],"whenToPreferThis":"Choose this endpoint when you need to run a small Python 3 or Node.js code snippet in a fully isolated, network-less environment with no account setup required and pay-per-use pricing via x402. Ideal for agents that need on-demand computation, algorithm testing, or data transformation without provisioning any infrastructure. Prefer over cloud function services when you need instant, no-registration, micro-priced execution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:36:04.368Z","isFirstParty":false}