Skip to main content
The agent works in a service called main. Other containers provide the services it needs. All belong to one trial.

Add a small HTTP service

This environment gives the agent a JSON file through an HTTP service. Add it to a task with an instruction and verifier.
my-task
instruction.md
task.toml
environment
Dockerfile
docker-compose.yaml
api
Dockerfile
status.json
tests
test.sh
Name the Compose file exactly environment/docker-compose.yaml:
environment/docker-compose.yaml
Evolve builds main from environment/Dockerfile and api from its own Dockerfile. depends_on waits for the API healthcheck. From main, the agent can read http://api:8000/status.json using the service name as the hostname. The main stanza above only adds a dependency. You can omit it when you have no overrides. To use a prebuilt main image, set [environment].docker_image in task.toml.

Images, files, and configuration

Images are resolved during dataset import. Runtime tasks use the recorded images. Task files and image-build inputs are not a secret store; use job secrets for agent credentials.
  • include and service extends, which can introduce unseen service images.
  • Interpolated image names, untagged images, and an unpinned :latest tag.
  • Build options such as ssh, secrets, additional contexts, and inline Dockerfiles.
  • A build context outside the task, or a Dockerfile outside its build context.
  • main.build together with [environment].docker_image, or conflicting main image declarations.

Provider and task limits

Compose tasks run on E2B or Daytona. They do not support Modal, no-network, GPUs, or multi-step execution. Sandbox capabilities describes provider selection and other network restrictions.

Score service state

A verifier may need more than files from main: a request log, a database export, or an in-memory counter. Use collection hooks and service artifacts to save that evidence before verification.