Sandbox API

Get started

Run the local stack and make your first Sandbox API calls.

1. Start the stack

make setup
# GCS bucket + infra/local/secrets/gcp-sa.json (Storage Object Admin on the bucket)
make up
make smoke
make e2e-local   # codeedit + agent + harbor job lifecycle

Gateway (local): http://localhost:8780 · Docs: /docs on the same host.

In production, use your deployed gateway host (e.g. https://sandbox.turing.com). Curl examples below use SANDBOX_GATEWAY_URL so the same commands work in any environment:

export SANDBOX_GATEWAY_URL="${SANDBOX_GATEWAY_URL:-http://localhost:8780}"

2. List catalog agents (Tier 1)

curl -sS -H "X-Api-Key: dev-local-key" \
  "$SANDBOX_GATEWAY_URL/sandbox/v1/catalog?kind=agent"
from sandbox_core.clients.sandbox_client import SandboxClient

client = SandboxClient.from_env()
print(client.catalog(kind="agent"))

3. Enqueue an Agent Runtime run

Agent Runtime is catalog-strict — use oracle, opencode, etc.

curl -sS -H "X-Api-Key: dev-local-key" -H "Content-Type: application/json" \
  -d '{"agent_id":"oracle","instruction":"smoke test"}' \
  "$SANDBOX_GATEWAY_URL/sandbox/agent/v1/runs"
job = client.run_agent(agent_id="oracle", instruction="smoke test")
print(job)

4. Harbor datapoint (optional)

Requires a valid task_archive_url and worker (SANDBOX_SMOKE_DATAPOINT=1 make smoke).

See Harbor datapoint.

Next steps