Python SDK¶
Install the SDK with pip install sic-agent-sandbox. It depends only on
httpx. The reference below comes from the docstrings in
agent_sandbox.client.
agent_sandbox.client.SandboxClient
¶
Synchronous client.
base_url and api_key default to the AGENT_SANDBOX_URL and
AGENT_SANDBOX_API_KEY environment variables.
create(image=None, *, cpus=None, memory_mb=None, pids_limit=None, network=False, read_only_rootfs=True, timeout_seconds=None, env=None)
¶
Create a sandbox. Unset limits use the server defaults.
fork(snapshot, *, timeout_seconds=None, network=None, cpus=None, memory_mb=None)
¶
Start a new sandbox from a snapshot.
agent_sandbox.client.Sandbox
¶
agent_sandbox.client.ExecResult
dataclass
¶
agent_sandbox.client.ExecEvent
dataclass
¶
One line of a streamed command: stdout, stderr, or exit.
agent_sandbox.client.SnapshotInfo
dataclass
¶
agent_sandbox.client.FileInfo
dataclass
¶
agent_sandbox.client.SandboxAPIError
¶
Bases: Exception
An error response from the server.