Skip to main content
Run the traceroot Agent’s sandbox as a container on the Docker host that runs traceroot. The agent clones your repository into the sandbox, reads the code behind a failing span and runs commands there. docker is the default value of SANDBOX_PROVIDER, so a self-hosted traceroot uses it with no extra account or API key.
This page is for a self-hosted traceroot run from its repository. See Self-Hosting 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.
  • A running Docker daemon. Under make dev, the agent calls the docker CLI on your computer. In the Docker Compose stack, the agent container has the CLI installed and reaches the host’s daemon through /var/run/docker.sock.
  • Outbound network access from containers, so the sandbox can install its tools and clone your repository.

Set up

Docker is used when SANDBOX_PROVIDER is unset. To state it in .env at the root of the repository:
Two optional settings control cleanup:
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 cat /etc/os-release in its sandbox. The answer names Ubuntu 24.04.
  2. On the Docker host: list the sandbox containers. Each one is named traceroot-sandbox- followed by a timestamp.
  3. In the agent’s log: once the container is set up, the log prints [DockerExecutor] Container ready: followed by the first 12 characters of the container ID.

What the agent sets up

The agent creates the container the first time a session needs its sandbox. Repository credentials reach git through environment variables and never appear in a command line. A sandbox that is serving a request is never removed for being idle. The agent also removes its containers when it shuts down, and the Docker Compose stack gives it 60 seconds to finish.

Limitations

  • The sandbox shares the host’s kernel. For a sandbox with its own kernel, see smol machines.
  • In the Docker Compose stack, the agent controls the host’s Docker daemon through the mounted socket.
  • SANDBOX_RECLAIM_ON_START removes every traceroot-sandbox- container the starting agent did not create. Set it to false when several agents share one Docker host.
  • A command the agent runs with no timeout of its own ends after 30 seconds.
  • Output from a single command is cut off at 10 MB.

Next steps

Root cause analysis

What the agent does in its sandbox when a trace has errors.

GitHub integration

Connect a repository so the agent can clone it into the sandbox.

Self-Hosting

Run traceroot from its repository.

Install Docker

Docker’s guide to installing Docker Desktop or Docker Engine.