Cloud sandbox configuration

The server can provision remote runner hosts through several sandbox providers. See Cloud Sandbox Host for installation, provider authentication, and launch steps. To add a provider from a separate Python package, see Community Sandbox Providers.

Common settings

Add the top-level sandbox block to the server configuration:

sandbox:
  provider: modal
  server_url: https://your-server.example.com
FieldRequiredDescription
providerYesProvider id: databricks, modal, daytona, islo, blaxel, gensee, openshell, boxlite, microsandbox, or lambda_microvm.
server_urlYesOmnigent server URL reachable from the sandbox.
host_configNoOmnigent configuration installed inside each sandbox. See Host configuration.
git_cloneNoClone policy for fresh repository checkouts. See Git clone options.
default_profile_idNoProfile used when a new session names none. See Default sandbox profile.
token_ttl_sNoHost token validity window in seconds. See Host token expiry.

Provider-specific blocks are optional. Omit one to use that provider's defaults.

A managed launch waits 120 seconds by default for the sandboxed host to register. If a cold first image pull takes longer, set OMNIGENT_MANAGED_HOST_ONLINE_TIMEOUT_S in the server environment. It takes an integer number of seconds and applies to every managed provider.

Host token expiry

Each sandbox authenticates back to the server with a server-minted, per-launch host token. Set token_ttl_s to control how long that token stays valid, in seconds:

sandbox:
  server_url: https://your-server.example.com
  token_ttl_s: 86400 # shared default: 1 day
  providers:
    - provider: daytona
    - provider: kubernetes
      token_ttl_s: 604800 # override: 7 days

Allow enough time for sandbox startup and repository setup before the host's first connection. Restart the server after editing the setting. It applies to newly issued tokens and future renewals. Lowering it does not shorten an expiry that an existing token already has.

Connected hosts renew the same token halfway through the window, on their next heartbeat. Expiry is measured from the last renewal, so a disconnected host stops receiving renewals, and an expired token cannot open a new connection. A relaunch mints a fresh token. This setting does not change sandbox lifetime or the credentials users sign in with inside a sandbox.

Git clone options

The optional git_clone mapping reduces the Git history a managed sandbox downloads when it creates a repository checkout. A useful starting point for short coding sessions:

sandbox:
  provider: kubernetes
  server_url: https://your-server.example.com
  git_clone:
    depth: 50
    single_branch: true

This checks out every file on the selected branch with up to 50 commits of history. It applies to each requested repository, including repositories cloned after claiming a warm-pool Pod, and needs no prepared workspace image. Restart the server after changing the block, then create a new sandbox to try it.

SettingDefaultBehavior
depthnullFull history. A positive integer requests a shallow clone with that many commits.
single_branchnullKeep the existing rule: a pinned repo branch selects only that branch; otherwise all branches are fetched. true selects only the requested (or default) branch; false fetches all branches.
filternullblob:none enables a partial clone: commit history is kept and file contents are fetched on demand. The initial checkout still includes every file. Requires remote filter support; Git can warn and fall back to an unfiltered clone.
tagstrueNormal tag following. false passes --no-tags, which persists for later fetches. true does not promise every remote tag is fetched.

Only these four keys are accepted; any other key, or any non-null, non-mapping value, fails server startup. Omitting git_clone preserves the existing clone commands. Setting only depth keeps the existing branch selection — Omnigent explicitly counters Git's implicit single-branch default for shallow clones. Fetching every branch of a repository with many branch tips can erase most of the speed benefit; set single_branch: true when that tradeoff fits the workload.

The policy applies only when a checkout has to be created. Retained checkouts are not reset, truncated, or reconfigured when a session wakes; an agent-sandbox wake that lost its ephemeral workspace recreates it with the current policy. Each entry in a sandbox.providers list can override the entire shared git_clone mapping; use git_clone: {} on an entry to restore the defaults.

Kubernetes (including agent-sandbox warm pools) and providers that use the standard exec clone implementation support these options. Gensee, Islo, and custom workspace materializers must implement support explicitly; with nondefault settings the launch, replacement, or resume is rejected before any sandbox is provisioned, naming the provider. Third-party providers advertise support with SandboxCapabilities.git_clone_options=True and honor RepoWorkspace.git_clone; exec providers that override materialize_workspace must accept its optional git_clone argument when opting in. With default settings, legacy overrides receive no new keyword.

Clone settings carry no credentials. Initial clones keep using the owner-bound GitHub broker, and later Git operations use the host's existing credential helper. Deepening a private repo or lazily fetching blobs requires continued access to the remote.

Getting more history later

Inside a shallow checkout:

git fetch --deepen=100 origin
# Or restore full history for the configured branch selection:
git fetch --unshallow origin

Neither command widens a single-branch fetch refspec or re-enables tags. To fetch another branch, for example for a PR comparison, name its remote-tracking destination:

git fetch origin '+refs/heads/main:refs/remotes/origin/main'
# If both branches need more history, include both refspecs:
git fetch --deepen=100 origin \
  '+refs/heads/main:refs/remotes/origin/main' \
  '+refs/heads/feature:refs/remotes/origin/feature'
git fetch --tags origin  # explicitly fetch tags if needed

When a local PR diff cannot find a merge base because history is shallow, or the base branch was never fetched, Omnigent reports an actionable error with these commands rather than showing a misleading branch-tip comparison. A failed lazy file fetch is also an error; unavailable content is never treated as an added or deleted file.

Keep the full-history defaults for history-heavy development, offline work, or tools that expect broad history. blob:none is opt-in because it moves work to later reads: a first historical git show or git blame can fetch more data and take longer. Sparse checkout, submodule recursion, and LFS behavior are unchanged.

Default sandbox profile

Some providers manage their own sandbox profiles: the provider decides which configurations and revisions exist and who may use them. When such a provider is enabled, every new managed session must pick a profile. Callers that don't pick one are rejected, such as older API clients and scheduled tasks that launch fresh sandboxes. To give these callers a profile automatically, set default_profile_id:

sandbox:
  provider: customer
  server_url: https://your-server.example.com
  default_profile_id: standard-build

With a sandbox.providers list, set default_profile_id inside the entry for the provider that owns the profile. A top-level sandbox.default_profile_id next to a providers list fails server startup. Embedding deployments set default_profile_id on ManagedSandboxConfig.

GET /v1/sandbox-profiles returns the configured defaults in default_profile_ids, a map from provider to profile id. When nothing else is chosen, the web composer and fork dialog preselect this profile, including when it isn't on the first page of results. An explicit choice always wins. A fork to the same provider still starts on its source session's profile.

If a provider stops managing profiles, its sessions keep working as sessions without a profile. The saved profile is kept, so if the provider starts managing profiles again, a session still on the same host gets it back. A session that moved to a new host in the meantime has no profile on that host, and it can't wake until it is detached from that host.

Databricks

Databricks Sandbox is a managed-host provider only. The server drives sandboxes through the Databricks SDK. To use Databricks Sandboxes, the Sandbox preview setting must be enabled for the workspace.

sandbox:
  provider: databricks
  server_url: https://your-server.example.com # public URL the sandbox host connects back to
  databricks:
    workspace_host: https://<workspace>.cloud.databricks.com # required: the workspace Sandboxes run in
    inactivity_timeout_s: 3600 # optional idle stop
    sandbox_id_prefix: omnigent # optional
    bootstrap_command: uv tool install omnigent # optional, run before each host start
SettingDefaultPurpose
workspace_hostrequiredThe workspace Sandboxes run in. A user whose connected Databricks account targets any other workspace is refused, so their Sandboxes are never orphaned.
proxy_bearerfalseWrite a short-lived bearer (the owner's own token) into the sandbox so its host can reach the server through an authenticating reverse proxy, such as the Databricks Apps OAuth proxy.
inactivity_timeout_snoneIdle stop; the sandbox is resumed in place on the session's next turn. Optional; if set, must be at least 1200 seconds (twice the 600-second liveness keepalive).
sandbox_id_prefixomnigentPrefix for generated sandbox ids.
bootstrap_commandnoneShell command run before each host start and resume, for example a uv tool install that pins omnigent over the image's baked version.

Identity. Every Sandbox is created and driven as the user who started the session, using the Databricks account they connected under Settings → Connections → Databricks. The credential inside the Sandbox — and with proxy_bearer: true its bearer file — is that user's own. This needs a per-user Databricks account connection configured on the server: an account-level custom OAuth app integration with the all-apis offline_access scopes.

Modal

sandbox:
  provider: modal
  server_url: https://your-server.example.com
  modal:
    image: ghcr.io/omnigent-ai/omnigent-host:latest
    secrets: [omnigent-llm]

Daytona

sandbox:
  provider: daytona
  server_url: https://your-server.example.com
  daytona:
    image: docker.io/you/omnigent-host:latest
    env: [OPENAI_API_KEY, ANTHROPIC_API_KEY]
    cpu: 4
    memory: 8
    disk: 20
    auto_delete_interval: 60
SettingDefaultPurpose
imageofficial host imageRegistry image with Omnigent pre-installed.
envnoneServer environment variable names copied into each sandbox. A listed variable that is not set fails the launch.
cpu2vCPUs per sandbox. Positive integer.
memory4Memory per sandbox, in GiB. Positive integer.
diskDaytona's defaultDisk per sandbox, in GiB. Positive integer. Your Daytona account's per-sandbox limit still applies.
auto_delete_intervalneverMinutes a stopped sandbox is kept before Daytona deletes it. 0 deletes on stop. Non-negative integer.

Any other key under sandbox.daytona, or a value of the wrong type or range, stops server startup. A misspelled key fails instead of quietly keeping the default size.

auto_delete_interval counts only from when a sandbox stops. It does not stop a running sandbox, and it does not clean up after a failed delete request. With sandbox.stop_on_archive: true, archived sandboxes can also expire. Resuming a session whose sandbox was auto-deleted creates a fresh workspace, so uncommitted changes are lost.

Sizing and auto_delete_interval apply only to newly created sandboxes. A resumed sandbox keeps the settings it was created with.

Daytona has no platform lifetime cap. Omnigent disables Daytona's 15-minute idle auto-stop when it provisions a sandbox, so a host survives gaps between turns, and deletes the sandbox when its session is deleted. If a managed sandbox is stopped or archived out-of-band, the next message resumes the same sandbox in place, preserving its filesystem and workspace; an archived sandbox may first need a restore, so the wake waits up to 15 minutes (the same budget as a cold create). A sandbox that is mid-transition (starting, stopping, or archiving) is waited on rather than replaced. Only when the sandbox has been deleted does Omnigent create a replacement with a fresh workspace; a sandbox that is still being deleted, or a provider error during the wake, fails the turn with a retryable error and leaves the existing sandbox binding intact.

Daytona Tier 1 and 2 organizations restrict outbound traffic to a fixed allowlist. The server_url and model endpoints must be reachable from Daytona. Tier 3 and higher lift that restriction. On the free tier, use a Cloudflare Worker relay on the allowlisted *.workers.dev domain; the repository includes an example under deploy/daytona/. Modal has full egress on its entry tier.

To route a sandbox's outbound HTTP(S) traffic through a proxy, set DAYTONA_OUTBOUND_PROXY_URL in the environment of the process that launches the sandbox (the server for managed sandboxes, or the machine running omni sandbox create). It is an environment variable rather than a config key because the URL usually embeds credentials:

export DAYTONA_OUTBOUND_PROXY_URL=https://user:pass@proxy.example.com:28431

Daytona sets HTTP_PROXY and HTTPS_PROXY inside the sandbox from this value, so only processes that honor those variables use the proxy. An empty value is treated as unset. The proxy is fixed when the sandbox is created: a resumed sandbox keeps the proxy it was created with, so changing the proxy takes effect only for newly created (or replacement) sandboxes.

Islo

sandbox:
  provider: islo
  server_url: https://your-server.example.com
  islo:
    image: ghcr.io/omnigent-ai/omnigent-host:latest
    env: [OPENAI_API_KEY, ANTHROPIC_API_KEY]
    idle_pause_after_s: 900

When a new message arrives for a paused Islo host, Omnigent resumes the same sandbox and restarts the runner. Changing idle_pause_after_s affects new sandboxes, not existing ones. Deleting the session still deletes the sandbox.

The provider uses ISLO_API_KEY. ISLO_BASE_URL and ISLO_COMPUTE_URL can override its service endpoints.

Blaxel

sandbox:
  provider: blaxel
  server_url: https://your-server.example.com
  blaxel:
    image: blaxel/omnigent-host:latest
    env: [OPENAI_API_KEY, ANTHROPIC_API_KEY]
    region: us-was-1
    memory_mb: 4096
    ttl: 24h

ttl is the sandbox's maximum age from creation, not an idle timeout. Blaxel deletes the sandbox at that age even while its session is active. The default host token window is ttl + 1h; token_ttl_s overrides it independently. Provider command output is capped at 4 MiB.

The default image combines the Omnigent host runtime with Blaxel's required sandbox-api. Pin a published tag with image when deployments must remain stable across releases.

Managed sandboxes use the server process's Blaxel workspace and credentials. Omnigent users are not mapped to individual Blaxel workspaces. Set OMNIGENT_BLAXEL_HOST_IMAGE to override the default image without changing the configuration. The Blaxel SDK's telemetry is disabled; keep DO_NOT_TRACK=1 set on the server to preserve that behavior.

OpenShell

sandbox:
  provider: openshell
  server_url: https://your-server.example.com
  openshell:
    image: ghcr.io/omnigent-ai/omnigent-host:latest
    env: [OPENAI_API_KEY, ANTHROPIC_API_KEY]
    cluster: my-gateway
    workspace: team-alpha
    providers: [github]
    node_selector:
      kata-install: "true"
    runtime_class: kata-containers

node_selector and runtime_class are passed to OpenShell's Kubernetes driver as pod settings. Leave them out to use the gateway's default placement. Any key under sandbox.openshell not listed above stops server startup.

When a server-managed OpenShell sandbox goes dormant, its persistent volume is retained and the session reports a wakeable "asleep" state. The next message resumes the same sandbox in place, preserving its name and volume, and waits for it to become ready before continuing.

In-place resume requires SandboxClient.start, added in openshell 0.0.105. With an older SDK, the host remains offline instead of advertising an unsupported wake action; upgrade with uv pip install --upgrade 'omnigent[openshell]'. Resume is currently a cold restart rather than a warm snapshot restore.

Microsandbox

The microsandbox provider runs each managed session in a micro-VM on the same machine as the server. Because the guest runs untrusted agent code next to the server, its default host network mode exposes only an explicit TCP port allowlist rather than the entire host.

sandbox:
  provider: microsandbox
  server_url: http://host.microsandbox.internal:6767
  microsandbox:
    host_ports: [8317]

Use your server's port in server_url; localhost inside the VM refers to the VM itself. The example also allows a host-local service on port 8317.

Optional sandbox.microsandbox settings:

host.microsandbox.internal is the stable guest hostname for the machine running microsandbox. In host network mode:

Boxlite

sandbox:
  provider: boxlite
  server_url: https://your-server.example.com
  boxlite:
    image: docker.io/me/omnigent-host:latest
    env: [OPENAI_API_KEY, GIT_TOKEN]
    disk_size_gb: 100
    cloud:
      endpoint: https://boxlite.example.com:8100

Provide one mode: cloud.endpoint selects cloud mode and uses BOXLITE_API_KEY; local.home_dir and local.registry configure local mode. Local mode is used when neither block is set.

Gensee

Gensee is a managed-host provider only. The server talks to the Gensee control plane over HTTPS; no cloud-provider credentials or Gensee implementation packages are installed in Omnigent. Creating a managed session allocates one sandbox, has its control plane start omnigent host, and waits for that host to connect back. Gensee does not implement omnigent sandbox create, remote exec/file-copy primitives, stopped-sandbox resume, or workspace fork/merge.

The production endpoint and standard token variable are defaults, so the minimal configuration is just provider + server_url:

sandbox:
  provider: gensee
  server_url: https://your-server.example.com

Use an explicit block for a dedicated or development endpoint:

sandbox:
  provider: gensee
  server_url: https://your-server.example.com
  gensee:
    endpoint: https://sandbox.gensee.ai
    api_token_env: GENSEE_CONTROLLER_API_TOKEN
    workspace_root: /mnt/gensee-tclone/workspaces
    operation_timeout_s: 900
    poll_interval_s: 2
    request_timeout_s: 40
    retry_timeout_s: 60
    env: []
SettingDefaultPurpose
endpointhttps://sandbox.gensee.aiGensee HTTPS control-plane base URL.
api_token_envGENSEE_CONTROLLER_API_TOKENServer environment variable holding the API token.
workspace_root/mnt/gensee-tclone/workspacesAbsolute workspace root inside each sandbox.
operation_timeout_s900Shared deadline for host-start submission, retries, and polling; late responses are rejected.
poll_interval_s2Interval between operation-status requests.
request_timeout_s40HTTP I/O timeout, capped by the remaining operation budget during host startup.
retry_timeout_s60Retry budget for transport errors and HTTP 500/502/503/504; 0 disables retries.
env[]Server environment variable names copied into the sandbox secret.

The endpoint must use HTTPS and cannot contain credentials, a query, or a fragment. Unknown settings and malformed values stop server startup rather than failing on the first user session.

GENSEE_CONTROLLER_URL overrides the default endpoint when constructing the launcher directly. An explicit sandbox.gensee.endpoint takes precedence in the server-managed configuration.

The Gensee API token stays in the server and authorizes lifecycle requests. Each sandbox receives a separate server-minted Omnigent host token (a seven-day validity window by default, renewed while connected; see Host token expiry) through Gensee's short-lived secret store; it is not included in the durable operation request. By default no model or Git credentials are injected — list only variables every sandbox on the server may receive in env, or leave it empty and let each user sign in from their own sandbox terminal.

AWS Lambda MicroVMs

AWS Lambda MicroVMs runs each managed host in a Firecracker-isolated, snapshot-resumable microVM in your own AWS account. It is a managed-host provider only. The server starts a microVM when a managed session is created and terminates it when the session is deleted. There is no omnigent sandbox CLI flow for this provider.

Install the extra on the server. It pulls in boto3 and botocore 1.43.35 or newer, the minimum version with the lambda-microvms service model:

pip install 'omnigent[lambda-microvm]'

The server reads AWS credentials from the standard boto3 chain (profile, environment, or instance role). Those credentials must be allowed to call the lambda-microvms API and to pass the execution role. Pick a region where Lambda MicroVMs is available; the AWS announcement is the starting point for the current list.

sandbox:
  provider: lambda_microvm
  server_url: https://your-server.example.com # public URL the host connects back to
  lambda_microvm:
    region: us-east-1
    image_identifier: arn:aws:lambda:us-east-1:<acct>:microvm-image:omnigent-host
    image_version: "1.0" # optional; default: latest
    execution_role_arn: arn:aws:iam::<acct>:role/omnigent-microvm-exec
    env: [ANTHROPIC_API_KEY, GIT_TOKEN] # server env var names copied into the microVM

image_identifier and execution_role_arn can be set in the config or in their environment variables. The config value wins when both are set.

SettingEnvironment variableDefaultPurpose
regionOMNIGENT_LAMBDA_MICROVM_REGIONambient boto3 regionAWS region the microVMs run in.
image_identifierOMNIGENT_LAMBDA_MICROVM_IMAGE_IDENTIFIERrequiredARN of the prebuilt MicroVM image.
image_versionOMNIGENT_LAMBDA_MICROVM_IMAGE_VERSIONlatestMicroVM image version, for example "1.0".
execution_role_arnOMNIGENT_LAMBDA_MICROVM_EXECUTION_ROLE_ARNrequiredIAM role the running microVM assumes.
envOMNIGENT_LAMBDA_MICROVM_SANDBOX_ENVnoneNames of server environment variables whose values are copied into each microVM. The environment variable takes a comma-separated list.
egress_network_connectorsOMNIGENT_LAMBDA_MICROVM_EGRESS_CONNECTORSpublic egressEgress network-connector ARNs to attach. They route the host's outbound traffic, including its connection back to the server, through your VPC, so the server can use a private address. The environment variable takes a comma-separated list.

Lambda MicroVMs boot from a prebuilt MicroVM image, not a registry reference, so build it with aws lambda-microvms create-microvm-image before the first launch; the deploy README has the build steps and the IAM role requirements for both roles; trust policies are in the AWS docs.

Credentials

As with Daytona and Boxlite, env lists variable names; the server copies their values at launch, and an unset name fails the launch. Names Omnigent sets itself (OMNIGENT_HOST_ID, OMNIGENT_HOST_NAME, OMNIGENT_HOST_TOKEN, OMNIGENT_SERVER, IS_SANDBOX) are rejected.

Lambda caps the launch payload, which carries the passed-through credentials and host_config, at 4,096 characters, so deliver large secrets through the execution role or a secrets store.

Lifecycle

Native harness bridge servers

Native harnesses (for example claude-native) run small HTTP servers on the sandbox host that the harness's hook and helper subprocesses call back into:

A sandbox whose SSRF hardening denies loopback destinations unconditionally (the openshell provider is one such backend) cannot reach a loopback-advertised relay, so every prompt fails closed. Opt into an all-interfaces bind by setting OMNIGENT_BRIDGE_BIND_HOST=0.0.0.0 in the sandbox host environment: both servers then listen on all interfaces (loopback consumers keep working) and advertise the host's routable address so the in-sandbox hooks can reach them.

Environment variableDefaultDescription
OMNIGENT_BRIDGE_BIND_HOSTloopback-only relay, Unix socket for MCP ingressSelects the bind posture. Unset is loopback-only (127.0.0.1) for the tool relay and a Unix domain socket for the MCP control ingress. 0.0.0.0 binds both servers on all interfaces and advertises the detected routable address (falling back to loopback when the host has none). Any other value pins that exact host for both bind and advertisement. Setting it to a nonblank value moves the MCP ingress onto a TCP port from the pool.
OMNIGENT_BRIDGE_PORT_POOL28700–28715Overrides the server port pool. Accepts comma-separated ports and inclusive ranges, e.g. 28700-28703,29000.

TCP-bound bridge servers draw their ports from a small stable pool (28700–28715 by default) so a sandbox network policy can allowlist them by exact host and port. Several servers can coexist per host — one tool relay per session, plus the MCP ingress whenever OMNIGENT_BRIDGE_BIND_HOST is set — so allowlist the whole pool, not a single port. When the pool is exhausted the servers fall back to an OS-assigned ephemeral port, which an exact-port policy cannot cover.

Every endpoint on these servers (other than GET /health) requires a per-relay bearer token, so allowlisting their host and ports does not expose unauthenticated functionality.

Host configuration

The provider-independent host_config block contains the ~/.omnigent/config.yaml content installed inside each sandbox before omnigent host starts:

sandbox:
  provider: modal
  server_url: https://your-server.example.com
  host_config:
    providers:
      litellm:
        kind: gateway
        default: [pi]
        openai:
          base_url: http://litellm.litellm.svc.cluster.local/v1
          api_key_ref: env:LITELLM_API_KEY
          wire_api: chat

On launch or resume, the server replaces or removes entries that it previously injected. Configuration created inside the sandbox under other names remains untouched.

Do not put secrets in host_config. Use api_key_ref: env:VAR; the variable is resolved inside the sandbox from its provider-specific credential source. Inline api_key values are rejected. The server validates the block at startup.

To have the provider's hosts continue interrupted turns automatically after a host restart, set host_config.host.recover_interrupted_sessions: true. host_config.host.recovery_prompt overrides the server's recovery prompt for those hosts. See Automatic session recovery.