Prerequisites
Use Bash,curl 7.76+, and jq. Obtain an API key with permission to create, inspect,
execute in, and stop a sandbox. Confirm the deployment’s supported isolation modes and resource
limits. This example requests a Linux container for five minutes; runtime and quota policies
can reject the request.
Set these in the same terminal, replacing the deployment URL with the one supplied to you:
Authorization: ApiKey. The controller also accepts Bearer for a JWT;
putting an API key after Bearer does not turn it into a JWT. The source-backed correction is
recorded in this repository’s Sandbox overlay.
Create, execute, and stop
Save this assandbox-smoke.sh. It captures the returned ID, polls with a finite budget,
verifies the command result, and attempts cleanup on exit once an ID is known.
running, verifies exit code 0
and output sandbox-ok, and receives a successful stop response. It saves the responses locally
for inspection. These are observed criteria, not guarantees of provisioning speed.
If creation times out before returning an ID, inspect your workspace’s sandbox list before
creating another runtime. The cleanup trap cannot stop a resource whose identity it never received.
Verify teardown
After the script exits, read the status with the saved ID:terminated state or 404 with the same workspace credentials establishes that
the runtime is no longer accessible at that identity. terminating is still in progress;
recheck within your operational deadline. A 401, 403, network error, or 5xx does not prove
teardown. Confirm with the workspace operator if the result remains uncertain.
Troubleshooting
Next steps
- Files and longer tasks — extend the verified runtime workflow.
- Sandbox API — schemas, lifetime, execution, and files.
- Sandbox MCP — connect an agent to its runtime tools.
- Support — share the failed step and redacted result.