Customize the agent runtime
Agents sometimes need tools that are not in the default runtime: a browser like Chromium, the
gh CLI, a custom certificate, or an extra system package. They sometimes need a folder from your
infrastructure, such as a repository checkout, or more CPU, memory, and disk than the default.
Both runtimes already ship Node, git, curl, python3 (also available as python), unzip,
zip, rg (ripgrep), fd, jq, ps, file, and tree, so you do not need to add those.
This page shows how to add each of those. The mechanism depends on where your agents run:
- Daytona runs execute in a cloud sandbox. You customize the snapshot the sandbox starts from.
- Local runs execute inside the runner container. You customize the runner service image.
Both paths below are self-contained. If you do not know which provider your deployment runs, check
AGENTA_RUNNER_ENABLED_SANDBOX_PROVIDERS in the
runner reference, and see
How agents run for the model behind the two.
Daytona
Add tools and dependencies
Add your build steps to the snapshot recipe, build the snapshot under your own name, and point the runner at it.
-
Copy the shipped recipe:
cp services/runner/images/sandbox/daytona/build_snapshot.py ./my_snapshot.py -
Give the snapshot its own name, so it does not collide with the Agenta default, and add your dependencies to the
dockerfile_commandslist. For example, theghCLI and Chromium:SNAPSHOT_NAME = "my-agent-sandbox-v1"image = Image.base(SANDBOX_AGENT_IMAGE).dockerfile_commands(["USER root",# ... the shipped commands stay as they are ..."RUN apt-get update && apt-get install -y --no-install-recommends ""gh chromium && rm -rf /var/lib/apt/lists/*","USER sandbox",]) -
Build it in your Daytona account:
DAYTONA_API_KEY=<daytona-api-key> DAYTONA_TARGET=eu uv run my_snapshot.py --force -
Point the runner at your snapshot and recreate it:
AGENTA_RUNNER_DAYTONA_SNAPSHOT=my-agent-sandbox-v1
Add folders
A Daytona sandbox runs in the cloud and cannot mount a directory from your host. To make files
available to Daytona runs, fetch them into the snapshot from a RUN step in the same
dockerfile_commands list, then rebuild. For example, a repository checkout at
/agenta/workspaces/my-service:
"RUN git clone --depth 1 https://github.com/my-org/my-service "
"/agenta/workspaces/my-service",
The files are baked into the snapshot, so every sandbox starts with the same copy, and a rebuild is what refreshes them.
Sandbox resources
Each Daytona sandbox gets the CPU, memory, and disk baked into the snapshot. The recipe reads them from build-time environment variables:
| Variable | Default | Controls |
|---|---|---|
AGENTA_RUNNER_DAYTONA_SANDBOX_CPU | 2 | vCPUs per sandbox |
AGENTA_RUNNER_DAYTONA_SANDBOX_MEMORY_GB | 4 | Memory (GB) per sandbox |
AGENTA_RUNNER_DAYTONA_SANDBOX_DISK_GB | 5 | Disk (GB) per sandbox |
To change them, set the values, rebuild the snapshot, then point the runner at the rebuilt snapshot and recreate it so the two match:
cd services/runner/images/sandbox/daytona
AGENTA_RUNNER_DAYTONA_SANDBOX_DISK_GB=10 \
DAYTONA_API_KEY=<daytona-api-key> DAYTONA_TARGET=eu uv run build_snapshot.py --force
Sandboxes that are already running keep the old values. Only sandboxes created after the rebuild get the new ones.