# agent-exec Code Execution Sandbox

> agent-exec Code Execution Sandbox is a paid API for AI agents from agent-exec.448c.net, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Execute Python or Node.js source code in an isolated, network-less sandbox and return stdout, stderr, and exit code — billed per-use via x402 micropayment, no account required.

## Facts

- Endpoint: POST https://agent-exec.448c.net/execute?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-exec-code-execution-sandbox-e90fb652
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BA5t5brOA-1BaCelgA-z2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-exec-code-execution-sandbox-e90fb652 -d '<json body>'
```

Example prompt: Run this Python 3 script for me in a sandboxed environment and tell me what it prints: `import math; print(math.factorial(20))`

## When to prefer this

Choose this endpoint when an AI agent needs to execute arbitrary Python 3 or Node.js code dynamically without provisioning infrastructure, managing credentials, or creating an account. It is ideal for agent workflows that need to compute results programmatically, validate generated code, or run user-submitted scripts safely — all billed at $0.001 USDC per call via x402 micropayment, requiring only a funded wallet. Prefer it over cloud function platforms when you need zero-setup, per-call billing with no account lifecycle.

## Known failure modes

- SANDBOX_TIMEOUT — code ran too long; no partial output
- EXECUTION_MEMORY_LIMIT_EXCEEDED — program used more RAM than the budget allowed
- RUNTIME_UNSUPPORTED — runtime value not in allowed enum (billed before rejection)
- REQUEST_MALFORMED — missing required fields like source or runtime
- PAYMENT_INVALID / PAYMENT_AMOUNT_INSUFFICIENT — x402 payment not accepted
- PAYMENT_REPLAYED — same payment token submitted twice
- PAYER_RATE_LIMITED / PAYER_CONCURRENCY_LIMITED — too many requests from this wallet
- SERVICE_BUSY / SANDBOX_UNAVAILABLE — transient capacity issues
- EXECUTION_OUTPUT_LIMIT_EXCEEDED — stdout/stderr too large
- RUNTIME_RESERVED_FILE_PATH — a file path in the extra files map conflicts with a reserved path

## How this service works

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.

## Output

Returns a JSON object with: outcome ('completed', 'timeout', or 'error'), stdout and stderr strings, exit code, execution duration in milliseconds, truncation flags, an error object (null on success with code, message, billable flag), payment details (payer wallet, amount, asset, network, transaction hash), and a receipt with price, tier, resource limits, usage stats, and output digest.

## Request schema (JSON Schema)

```json
{
 "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."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-exec-code-execution-sandbox-e90fb652/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-exec.448c.net](https://www.zero.xyz/host/agent-exec.448c.net/llms.txt)
