> ## Documentation Index
> Fetch the complete documentation index at: https://agent-compass.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Modal

Configure Modal through its SDK or the host environment variables `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`. Supply both variables together when using explicit tokens.

## Configure

```bash theme={"system"}
export MODAL_TOKEN_ID="<your-token-id>"
export MODAL_TOKEN_SECRET="<your-token-secret>"
```

```bash theme={"system"}
agentcompass run <benchmark> <harness> "$MODEL_NAME" \
  --env modal \
  --env-params '{"setup":{"image":"python:3.13-slim"}}'
```

## Provider Params

Every provider accepts the [common Environment schema](https://agent-compass.mintlify.site/en/user_guide/modules/environments/configuration/overview.md) plus its own declared provider options. Use the command below to list all accepted keys. Pass provider options alongside shared fields in `--env-params` or the flat YAML provider section. Image, resources, outbound policy, and environment variables retain their unified entry points; native aliases and unknown keys are rejected.

```bash theme={"system"}
agentcompass config docs env modal
```

Use `resources`, `run_resources`, and `evaluation_resources`. Provider capabilities still differ: unsupported requirements fail explicitly, while storage limits follow the documented provider support policy. See [Resource Limits](https://agent-compass.mintlify.site/en/user_guide/modules/environments/configuration/resource_limits.md).

## Provider Behavior

The adapter loads `setup.image` from a registry. Public, no-network, and allowlist policies are supported. A public baseline initializes native allowlists when a later phase requires a policy transition. Optional `command` supplies the sandbox startup command.

Use `setup.workdir` for the default command directory and `setup.build_timeout_seconds` for environment creation. The Benchmark selects the task workspace independently through its prepared input; neither setting replaces that workspace or an individual command timeout.

When `timeout` is omitted, the adapter starts with a 43200-second lifetime and extends it for resolved agent, verifier, startup, and artifact collection budgets, up to the [24-hour platform limit](https://modal.com/docs/guide/sandboxes#timeouts). An explicit `timeout` takes precedence.

## Native KVM

Set `runtime` to `vm` or `gvisor` to choose the runtime explicitly. With `kvm=true`, the adapter selects `vm` and passes `enable_nested_virt=True` to Modal. Nested virtualization requires Enterprise access; see the [official requirements](https://modal.com/docs/guide/sandboxes#runtimes). A VM sandbox cannot request GPU resources.

The `androidworld` Recipe supplies KVM, image, startup, and resource defaults automatically:

```bash theme={"system"}
agentcompass run androidworld none "$MODEL_NAME" --env modal
```

No nested Docker daemon is needed. Other benchmarks leave runtime selection to Modal unless configured explicitly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.