> ## Documentation Index
> Fetch the complete documentation index at: https://traceroot.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To set up traceroot in a repository, follow the setup prompt in https://traceroot.ai/docs/getting-started/coding-agents.md.

# smol machines

> Run the traceroot Agent's sandbox in a smol machine, a microVM with its own kernel

Run the traceroot Agent's sandbox in a [smol machine](https://smolmachines.com), a microVM with its own Linux kernel. The agent clones your repository into the sandbox, reads the code behind a failing span and runs commands there. With `SANDBOX_PROVIDER=smol`, each session's sandbox is one machine, on smol cloud or on your own computer.

> [!NOTE]
>
> This page is for a self-hosted traceroot run from its repository. `docker` stays the default sandbox provider, and nothing changes until you set `SANDBOX_PROVIDER`. See [Self-Hosting](https://traceroot.ai/docs/developer/self-hosting.md) to get traceroot running first.

## Requirements

* traceroot run from its repository with `make dev` or the Docker Compose stack (`make prod`), and a model provider key for the agent.
* For smol cloud: a smol cloud API key. The [Cloud Quick Start](https://smolmachines.com/docs/cloud) in the smol machines docs covers creating one.
* For a local machine: `make dev` on macOS on Apple Silicon, or on Linux with KVM. The local engine is installed with traceroot's dependencies, as part of the `smolmachines` package.

## Set up

traceroot reads its settings from `.env` at the root of the repository. Choose where the machines run:

> [tab] smol cloud
>
> ```bash theme={null}
> SANDBOX_PROVIDER=smol
> SMOL_CLOUD_TOKEN=your-api-key
> ```
>
> smol cloud is the default target. It works under `make dev` and in the Docker Compose stack.

> [tab] Local machine
>
> ```bash theme={null}
> SANDBOX_PROVIDER=smol
> SMOL_TARGET=local
> ```
>
> The machine boots on your computer, with no smol cloud account. Use this under `make dev`.

The agent reads these settings when it starts. Start traceroot, or restart it if it is already running.

## Verify

1. **In the traceroot UI**: open the agent and ask it to run `uname -a` in its sandbox. The answer comes from the machine's own kernel.
2. **In the agent's log**: once the machine is set up, the log prints `[SmolExecutor] Machine ready:` followed by the machine's name. With Docker Compose, read it with:

   ```bash theme={null}
   docker compose -f docker-compose.prod.yml logs -f agent
   ```

## What the agent sets up

The agent creates the machine the first time a session needs its sandbox.

| Setting | Value |
| - | - |
| Base image | `ubuntu:24.04` |
| Tools installed | Git, jq, curl and CA certificates |
| Workspace | `/workspace`, with `repos`, `traces` and `notes` folders |
| Network | Outbound access on, so the agent can clone your repository |
| Idle stop (smol cloud) | After 15 minutes without a command |
| Deletion (smol cloud) | 24 hours after the machine is created |

Repository credentials reach `git` through environment variables and never appear in a command line. The agent deletes the machine when the session's sandbox is torn down or the agent shuts down.

## Limitations

* The Docker Compose stack runs machines on smol cloud. `SMOL_TARGET=local` is for `make dev`.
* A cloud machine is deleted 24 hours after it is created, including while a session is still using it. Start a new session to get a new machine.
* `SANDBOX_IDLE_TTL_MINUTES` and `SANDBOX_RECLAIM_ON_START` apply to the `docker` provider. A smol machine follows the idle stop and deletion times in the table above.
* On smol cloud, a command the agent runs with no timeout of its own ends after 600 seconds.
* If a setup step fails, the agent deletes the machine and reports the command and its output. The session's next sandbox call creates a new machine.

## Next steps

> [card] [Root cause analysis](https://traceroot.ai/docs/ai-agent/root-cause-analysis.md)
>
> What the agent does in its sandbox when a trace has errors.

> [card] [GitHub integration](https://traceroot.ai/docs/ai-agent/github-integration.md)
>
> Connect a repository so the agent can clone it into the sandbox.

> [card] [Self-Hosting](https://traceroot.ai/docs/developer/self-hosting.md)
>
> Run traceroot from its repository.

> [card] [smol machines integrations](https://smolmachines.com/docs/integrations)
>
> smol machines' docs: machine size, billing and cleanup on smol cloud.


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