{"uid":"cap_CQI6IYz78d6I8zf5qFzBi","slug":"agent-exec-sandboxed-code-execution-5117fbc8","name":"agent-exec Sandboxed Code Execution","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.448c.org/execute?utm_source=zero.xyz","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. Accepted as `code` too."},"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. Accepted as `language` too, and these value spellings are mapped for you: `python`, `py`, `python3.13` -> `python3`; `js`, `javascript`, `nodejs`, `node24` -> `node`."}}},"responseSchema":{"example":{"error":null,"stderr":"","stdout":"1\n","outcome":"completed","payment":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payer":"0x0000000000000000000000000000000000dEaD","amount":"1000","network":"base","transaction":"0x0000000000000000000000000000000000000000000000000000000000000000"},"receipt":{"tier":"default","price":"$0.0010","usage":{"outcome":"completed","exitCode":0,"truncated":{"stderr":false,"stdout":false},"durationMs":42},"limits":{"timeoutMs":5000,"workDirBytes":67108864,"maxMemoryBytes":2147483648,"maxOutputBytes":1048576},"status":{"code":null,"billable":true,"category":"success"},"payment":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payer":"0x0000000000000000000000000000000000dEaD","amount":"1000","network":"base","reference":"0x0000000000000000000000000000000000000000000000000000000000000000"},"priceUsd":0.001,"outputDigest":"0000000000000000000000000000000000000000000000000000000000000000","requestDigest":"0000000000000000000000000000000000000000000000000000000000000000"},"exitCode":0,"truncated":{"stderr":false,"stdout":false},"durationMs":42}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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_zJudu0RWGd1jCC_-0Ca7I","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 or Node.js source code in an isolated, network-less sandbox and returns stdout, stderr, and exit code — pay-per-use via x402, no account required.","exampleAgentPrompt":"Run this Python 3 script for me in a sandboxed environment and give me the stdout and exit code: `import math; print(math.factorial(20))`","exampleUseCases":[{"title":"Agent-driven data transformation script","prompt":"Execute this Python 3 snippet that reads a JSON blob from stdin, transforms it, and prints the result — pass this JSON as stdin: {\"values\": [1, 3, 5, 7]} and the script is: `import json, sys; d=json.load(sys.stdin); print(sum(d['values']))`"},{"title":"On-the-fly algorithm verification","prompt":"Run this Node.js snippet and tell me the output — I want to verify my binary search implementation: `function bs(arr,t){let l=0,r=arr.length-1;while(l<=r){let m=Math.floor((l+r)/2);if(arr[m]===t)return m;arr[m]<t?l=m+1:r=m-1;}return -1;} console.log(bs([1,3,5,7,9],7));`"},{"title":"Automated test case runner for agent pipeline","prompt":"Run this Python 3 unit test script in a sandboxed environment and tell me whether it passes — the source is: `import unittest; class T(unittest.TestCase):\n def test_add(self): self.assertEqual(1+1,2)\nunittest.main()`"}],"resultDescription":"Returns an outcome field ('completed', 'timeout', or 'error'), captured stdout, captured stderr, exit code, execution duration in milliseconds, truncation flags, a structured error object (null on success), payment details (payer wallet, amount, network, transaction hash), and a signed receipt with tier, price, resource limits, and an output digest for auditability.","failureModes":["SANDBOX_TIMEOUT — code ran too long; no refund","EXECUTION_MEMORY_LIMIT_EXCEEDED — script exceeded RAM budget","RUNTIME_UNSUPPORTED — runtime enum value not allowlisted; charged after payment attempt","REQUEST_MALFORMED — missing required fields source or runtime","PAYMENT_INVALID / PAYMENT_AMOUNT_INSUFFICIENT — x402 payment missing or underfunded","PAYER_RATE_LIMITED / PAYER_CONCURRENCY_LIMITED — too many requests from the same wallet","SERVICE_BUSY / SANDBOX_UNAVAILABLE — backend capacity issue; retry","EXECUTION_OUTPUT_LIMIT_EXCEEDED — stdout/stderr too large","PAYMENT_REPLAYED — same payment token submitted twice"],"whenToPreferThis":"Choose this endpoint when an AI agent needs to execute untrusted or dynamically generated code snippets without managing accounts, API keys, or infrastructure. It is ideal for pay-per-use one-off computations, agent pipelines that need on-demand scripting capability, or when the caller holds a USDC wallet (x402) and wants frictionless access. Prefer it over managed cloud functions when there is no persistent state needed and the network-isolated sandbox is a feature rather than a limitation. Not suitable for code that requires internet access, persistent disk storage, or runtimes beyond python3 and node.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-12-01T12:48:27.083Z","isFirstParty":false,"canonicalSlug":"agent-exec-sandboxed-code-execution-5117fbc8"}