Python SandboxClient
L4 outbound client for the Sandbox gateway.
from sandbox_core.clients.sandbox_client import SandboxClient
client = SandboxClient.from_env()
# SANDBOX_GATEWAY_URL + SANDBOX_API_KEY
# Catalog
client.catalog(kind="agent")
# Harbor datapoint (v2) — pass correlation_id for E2E tracing
await client.submit_execute_tasks(
body,
correlation_id="my-eval-run-42",
)
# Sync datapoint helper (also accepts correlation_id=)
client.run_datapoint(
task_slug="example",
task_archive_url="https://...",
agents=[{"name": "a", "harbor_agent": "oracle"}],
correlation_id="my-eval-run-42",
)
# Agent runtime
client.run_agent(agent_id="opencode", instruction="...", model="unused")
# Code execution
client.run_code_execution(language="python3.12", files={"main.py": "print(1)"})Rule: L4 products must not call harbor-worker or internal service URLs directly in production.
See Observability and correlation for x-correlation-id, Langfuse, and async job propagation.