Expand description
agent-sandbox — pluggable execution sandbox for tool calls.
Provides a provider abstraction so the same agent runtime can run under
Docker, Kata, or Cube sandboxes. The Docker provider talks to
the Docker Engine API through bollard — no docker CLI is required
inside the container; they connect to the daemon over the mounted host socket
(or whatever DOCKER_HOST points at). Kata is the same Engine API path but
runs containers under the kata runtime (HostConfig.runtime). The Cube
provider remains a thin CLI runner that shells out to the cube binary. The
Sandbox trait is the stable
seam the rest of the platform depends on
(see docs/adr/0003-sandbox-providers.md).
The deep codex integration (ADR-0005 §Decision) — running tool commands
through codex’s real SandboxManager — lives in the aria-agent-cloud
runtime crate (publish = false) as codex_sandbox::CodexSandbox. Keeping
it out of this published crate avoids dragging codex’s unpublished git
dependencies into the crates.io manifest (crates.io requires every
dependency to resolve from the registry). SandboxProvider::Codex remains a
valid selector so config stays forward-compatible; from_provider returns
SandboxError::NotConfigured for it and the cloud runtime injects the real
backend via agent_core::Agent::with_sandbox.
Structs§
- Cube
Sandbox - Cube sandbox — shells out to the
cubeCLI. The exact flags depend on the deployed Cube runtime; adjustrun_argsper environment. - Docker
Sandbox - Docker sandbox — the default provider.
- Exec
Output - Result of an execution.
- Exec
Spec - Specification of a command to execute inside a sandbox.
- Kata
Sandbox - Kata sandbox — Docker Engine API with the
kataruntime. - Sandbox
Handle - Opaque handle to a spawned sandbox session.
- Sandbox
Resource Limits - Resource limits applied to every sandbox container/VM.
Enums§
- Sandbox
Error - Sandbox
Provider - Which sandbox backend to use.
Traits§
- Sandbox
- Stable sandbox contract used by
agent-coreandagent-cloud.
Functions§
- build_
host_ config - Build a bollard
HostConfigcarrying the resource limits.runtimeis only set for Kata ("kata");Nonemeans the default Docker runtime. - default_
sandbox - The platform default sandbox: Docker.
- from_
provider - Build a sandbox from a provider selector (config-driven).