Skip to main content

Stirrup Harness guide

Install the Stirrup extra, choose a container image or remote sandbox, connect a Chat Completions endpoint and run Stirrup with its sampling and context flags.

The Stirrup Harness runs Stirrup 0.2.2 in the Roller process while a Docker container or remote sandbox executes the agent's commands and holds the task workspace. The container receives no model API key and needs no network egress for model calls.

For Task fields, see Task format reference. For shared outputs, see Trajectory output file guide.

When to use it​

Stirrup speaks OpenAI Chat Completions. Use it when:

  • the agent loop should stay on the host, so the container or sandbox needs no model API key and no egress.
  • a task is a single prompt: Stirrup runs one prompt per task and does not serve as a User Simulator.
  • the built-in tools code_exec, view_image, and finish are enough for the task.

Prerequisites​

  • Python 3.12 or later.
  • A Docker daemon, or a remote sandbox provider (see the next step).
  • An OpenAI Chat Completions endpoint, with its API address, an API key, and a model ID.

Install the Stirrup extra​

Stirrup requires the stirrup extra of Roller:

Terminal
uv pip install 'roller-agent[stirrup]'
Separate environment from the pdf extra

The stirrup extra cannot be installed together with the pdf extra in the same Python environment because of Pillow version constraints.

Choose a container image or remote sandbox​

The default Docker image is python:3.13-slim. Any image that includes bash, GNU coreutils and the packages required by the task works; no Stirrup runtime needs to be installed inside the container.

To run commands in a remote sandbox instead of Docker, install a provider package registered under the roller.sandbox_providers entry point and pass --sandbox-provider NAME --sandbox-template NAME. The Stirrup agent loop stays in the Roller host process while the sandbox executes commands and stores task files.

Configure the model API​

Stirrup forwards requests through Roller's local request recording proxy.

SettingDefault sourceCLI override
API addressOPENAI_BASE_URL--stirrup-api-base, or --api-base for a single-Harness run
API keyOPENAI_API_KEY--stirrup-api-key-env, or --api-key-env for a single-Harness run
Model IDTask model or --modelSent to the endpoint unchanged
Terminal
export OPENAI_API_KEY='...'

Run a collection​

Terminal
roller collect \
--harness stirrup \
--tasks examples/tasks/tasks.jsonl \
--model my-model \
--api-base http://localhost:8000/v1 \
--api-key-env OPENAI_API_KEY \
--capture-calls \
--output runs \
--run-name stirrup-demo

Stirrup-specific flags​

FlagDefaultPurpose
--docker-image / --stirrup-imageROLLER_STIRRUP_IMAGE or python:3.13-slimContainer image that executes code_exec commands
--stirrup-max-steps30Maximum agent turns per prompt
--stirrup-context-length128000Model context window; Stirrup summarizes history at 70% of this limit
--stirrup-output-tokens8192max_tokens sent per model request
--stirrup-command-timeout180Per-command timeout in seconds inside the container or sandbox
--stirrup-temperatureNoneSampling temperature
--stirrup-top-pNoneNucleus sampling top_p
--stirrup-seedNoneBase seed; each sample derives its deterministic seed from this value, the task ID and the sample index
--stirrup-request-set KEY=JSONNoneRepeatable extra JSON fields merged into each Chat Completions request
--thinkingNoneSent as chat_template_kwargs.reasoning_effort

Sessions and trajectories​

  • No proxy forwarding into the container: Because model requests start in the Roller host process, Stirrup passes no proxy variables into the task container.
  • Compaction and token IDs: --wire-trace full, --capture-calls, and --token-ids work in both Docker and remote sandboxes. When Stirrup summarizes conversation history, captured Calls split SFT into separate context windows under sft_segments/, including the summary request as its own window.
  • No output directory mode: Tasks may set files.output_dir: null so Roller collects nothing from the workspace (used by VIALS).