Sandbox Provider Configuration#
The sandbox picker in the agent playground is driven by the AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS environment variable, which controls which execution environments (e.g., local, daytona) are shown to users in the UI. This replaces the older binary AGENTA_SANDBOX_LOCAL_ALLOWED flag, which could not express a full provider list .
Environment Variable Pipeline#
At container start, web/entrypoint.sh reads AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS, normalizes it (lowercase, whitespace stripped), and re-exports it as AGENTA_ENABLED_SANDBOX_PROVIDERS . This value is then injected into the frontend runtime as window.__env.NEXT_PUBLIC_AGENTA_ENABLED_SANDBOX_PROVIDERS.
Default: If the variable is unset or empty, entrypoint.sh defaults to local β guaranteeing the picker always has at least one option .
getEnabledSandboxProviders() Helper#
Two mirrored implementations exist:
web/oss/src/lib/helpers/dynamicEnv.tsβ used by the OSS frontendweb/packages/agenta-shared/src/api/env.tsβ exported via@agenta/shared/apifor shared packages
Both functions read NEXT_PUBLIC_AGENTA_ENABLED_SANDBOX_PROVIDERS, split on commas, trim and lowercase each entry, and fall back to ["local"] if the result is empty .
UI Filtering in useModelHarness.tsx#
The sandbox picker options are computed in web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/useModelHarness.tsx . The old logic filtered based on isSandboxLocalEnabled() (a boolean); the new logic intersects the schema-declared options with the enabled set from getEnabledSandboxProviders(), so only providers the deployment actually supports appear in the dropdown .
Permission Controls: Hidden for local#
The same file also hides sandbox permission knobs (network egress, filesystem, enforcement, allowlist) when sandbox.kind === "local" . Since local runs as an unconfined host process, these permission settings have no effect and were previously misleading.
Key Files#
| File | Role |
|---|---|
web/entrypoint.sh | Derives & injects AGENTA_ENABLED_SANDBOX_PROVIDERS into window.__env |
web/oss/src/lib/helpers/dynamicEnv.ts | getEnabledSandboxProviders() for OSS package |
web/packages/agenta-shared/src/api/env.ts | getEnabledSandboxProviders() for shared package |
web/packages/agenta-shared/src/api/index.ts | Exports getEnabledSandboxProviders from @agenta/shared/api |
web/packages/agenta-entity-ui/.../useModelHarness.tsx | Consumes enabled set to filter picker options; hides local permission knobs |
Operator Configuration#
Set the environment variable on the runner/web container:
AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS=local,daytona
- Comma-separated, case-insensitive β normalized at startup.
- Unset or empty β defaults to
localonly. - Providers not in this list are hidden from the picker, regardless of what the schema declares.
See also: PR #5150 β permissive-by-default sandbox/egress with hardening gate for the runner-side sandbox enforcement model that this UI configuration exposes.