Configuration
You can omit the entiresandbox block to use Dari-managed E2B defaults. Add a sandbox block when you want runtimes, packages, setup scripts, internet access, resources, or a custom Dockerfile. provider defaults to e2b when omitted.
| Field | Required | Notes |
|---|---|---|
provider | no | Must be e2b when set. |
provider_api_key_secret | no | Name of a stored org credential holding your E2B API key. Omit to use Dari-managed E2B. If present, the credential must exist when you publish. Never put the raw key here. |
internet_access | no | Boolean. Defaults to false; set to true to allow public internet access from execution sandboxes. |
provider_api_key_secret is present, that credential is resolved at publish and session start. When the field is omitted, or when the whole sandbox block is omitted, Dari uses its managed E2B key.
Execution sandboxes do not get public internet access by default. Set
internet_access: true only when the agent needs outbound internet access while
handling sessions.
Managed Runtime
If you omitsandbox.dockerfile in dari.yml, Dari uses its managed E2B runtime. Dari infers runtimes required by your harness and tools, materializes source for managed resources under the session workspace, and lets you request more with sandbox.runtimes, sandbox.packages, and sandbox.setup:
setup.script value is repo-relative in your bundle; at build time, that file is available under /bundle and runs from /bundle as root after Dari installs the requested apt packages and managed runtimes. For example, this manifest asks Dari for Node and Go, installs the standard download tools needed by the setup hook, then runs scripts/setup-sandbox.sh:
dari.yml
scripts/setup-sandbox.sh
Dockerfile only when you need full image control. Add it at the repo root, copy your project into /workspace, and reference it from the sandbox block:
sandbox.dockerfile cannot be combined with sandbox.runtimes, sandbox.packages, or sandbox.setup. See the manifest reference for the full contract.
Resource Limits
sandbox.resources lets you override the E2B template’s CPU and memory
allocation for every session spawned from your agent:
Getting An API Key
- Sign up at e2b.dev.
- Create an API key from your E2B dashboard.
- Store it as an org credential named
E2B_API_KEY(or any^[A-Z_][A-Z0-9_]*$name you prefer) and reference it withsandbox.provider_api_key_secret.