Sign inSign up

affinefoundation/terminal

By affinefoundation

Updated about 2 months ago

Procedurally-generated terminal-agent benchmark. Use via affine-cortex 'af eval --env terminal'.

Image
0

6.4K

affinefoundation/terminal repository overview

affinefoundation/terminal

Terminel — a procedurally-generated, infinite, anti-hack benchmark for terminal agents. This image is the evaluation harness: it generates tasks, sets up per-task Docker containers (via DOOD — Docker-Out-Of-Docker, mounting the host's Docker socket), drives a configurable agent against them, and runs rule-based verification.

The image is consumed by affine-cortex's af CLI as the terminal environment.


What's inside

ComponentPathPurpose
Terminel harness/app/ (Python pkg terminel)task generation + verification
Docker CLI/usr/bin/dockercreates per-task containers on host daemon
OpenEnv server:8000 (uvicorn)HTTP API consumed by affinetes

Tag conventions:

  • affinefoundation/terminal:latest — production harness used by the validator network.
  • affinefoundation/terminal:sandbox — the base sandbox image that task containers are derived from. Tasks docker run this image when they spin up; the harness image just orchestrates.

How to evaluate

The image is not run directly — affine-cortex's af eval does the orchestration (loads the image, starts the OpenEnv server, talks to it over HTTP, drives the eval).

# Install affine-cortex (the `af` CLI lives in this repo)
pip install -e git+https://github.com/AffineFoundation/affine.git#egg=affine

# Set your OpenAI-compatible API key (Chutes / OpenAI / Anthropic-compat / vLLM / etc.)
export CHUTES_API_KEY=...

# Run a single task end-to-end
af eval --env terminal \
  --base-url https://llm.chutes.ai/v1 \
  --model Qwen/Qwen3-32B \
  --task-id 1000042 \
  --samples 1 \
  --output /tmp/result.json

# Sweep a contiguous task-id range, one sample per task
af eval --env terminal \
  --base-url https://llm.chutes.ai/v1 \
  --model Qwen/Qwen3-32B \
  --task-id-range 1000000 1000100 \
  --output /tmp/sweep.json

task_id = template_index * 1_000_000 + seed. With 130+ templates and ~10⁶ seeds per template, the task space is effectively infinite.

The af CLI is part of affine-cortex — see affine-cortex for install + auth setup. Under the hood, af eval:

  1. Pulls this image from Docker Hub.
  2. Boots a container with the host Docker socket mounted (DOOD).
  3. Calls Actor.evaluate(model, base_url, api_key, task_id, ...) via the OpenEnv HTTP server inside the container.
  4. The harness starts a per-task sandbox container, runs the agent against the OpenAI-compatible endpoint at --base-url, executes verify(), and returns the score + checks.

Runtime requirements

  • Host Docker socket mounted (DOOD): -v /var/run/docker.sock:/var/run/docker.sock (read-write). The harness creates and tears down task containers on the host Docker daemon, not a nested daemon. affinetes mounts this automatically.
  • Sandbox image reachable: the harness pulls affinefoundation/terminal:sandbox on first task; pre-pull on hardened/airgapped hosts.
  • Memory: 8g recommended (set via affinetes' EnvConfig).
  • OpenAI-compatible LLM endpoint: --base-url + --model arguments to af eval. Any provider speaking the chat-completions API works (OpenAI, Chutes, vLLM, SGLang, OpenRouter, Anthropic-via-OpenAI-compat, ...).

Tag summary

Content type

Image

Digest

sha256:d69eb4cd2

Size

333.1 MB

Last updated

about 2 months ago

docker pull affinefoundation/terminal