> ## Documentation Index
> Fetch the complete documentation index at: https://agent-compass.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Terminus-2

`terminus2` runs the [Terminus-2](https://www.harborframework.com/docs/agents/terminus-2) terminal agent for [Terminal-Bench 2](https://agent-compass.mintlify.site/en/user_guide/modules/benchmarks/terminal_bench_2.md), [Verified](https://agent-compass.mintlify.site/en/user_guide/modules/benchmarks/terminal_bench_2_verified.md), and [2.1](https://agent-compass.mintlify.site/en/user_guide/modules/benchmarks/terminal_bench_2_1.md) tasks. It accepts the model credentials supplied by `--model-*` and supports `openai-chat` and `openai-responses` model APIs.

## How it works

* **Prepare a terminal session.** The harness starts Terminus-2 in the task environment and operates a tmux terminal pane in the workspace prepared by the benchmark and environment recipe.
* **Run the agent loop.** Model output is decoded with the selected response parser. The agent sends shell keystrokes, observes the terminal, and continues until it calls task completion or reaches a configured limit.
* **Control context and return results.** Context summarization is enabled by default for long terminal sessions. The harness returns the normalized trajectory, final answer, status, and execution metadata as a `RunResult`.

## Parameters

Pass harness options with `--harness-params '{...}'`. The table intentionally exposes only behavior that normally needs tuning; terminal dimensions, service aliases, recording, and other integration options use their built-in defaults.

### Parameter reference

<table>
  <thead>
    <tr>
      <th>Parameter</th>
      <th>Type</th>
      <th>Default</th>
      <th>Choices / values</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`parser_name`</td><td>string</td><td>`json`</td><td>`json` / `xml` / `tool_call`</td><td>Response format.</td></tr>
    <tr><td>`max_turns`</td><td>int</td><td>`300`</td><td>integer ≥ 1</td><td>Maximum agent turns for one task.</td></tr>
    <tr><td>`enable_summarize`</td><td>bool</td><td>`true`</td><td>`true` / `false`</td><td>Enable context summarization for long trajectories.</td></tr>
    <tr><td>`modality`</td><td>string</td><td>`llm`</td><td>`llm` / `vlm`</td><td>Agent modality.</td></tr>
    <tr><td>`interleaved_thinking`</td><td>bool</td><td>`false`</td><td>`true` / `false`</td><td>Enable interleaved thinking for compatible models.</td></tr>
  </tbody>
</table>

### Model API and response format

Supply the model endpoint and credentials through `--model-base-url` and `--model-api-key`; `openai-chat` and `openai-responses` are supported through `--model-api-protocol`. Use `parser_name` only when the model's response format differs from the default JSON tool-call format.

## Run examples

Pass `terminus2` as the second positional argument in this command:

```bash theme={"system"}
agentcompass run <benchmark> terminus2 <model>
```

> [tab] Default configuration
>
> Run Terminus-2 with its built-in Terminal-Bench defaults.
>
> ```bash theme={"system"}
> agentcompass run \
>   terminal_bench_2 \
>   terminus2 \
>   "$MODEL_NAME" \
>   --env docker \
>   --model-base-url "$MODEL_BASE_URL" \
>   --model-api-key "$MODEL_API_KEY"
> ```

> [tab] Custom parameters
>
> Adjust the response parser, turn limit, and harness timeout for a model or workload.
>
> ```bash theme={"system"}
> agentcompass run \
>   terminal_bench_2 \
>   terminus2 \
>   "$MODEL_NAME" \
>   --env docker \
>   --harness-params '{"parser_name": "json", "max_turns": 120}' \
>   --execution-params '{"run_timeout_seconds": 7200}' \
>   --model-base-url "$MODEL_BASE_URL" \
>   --model-api-key "$MODEL_API_KEY"
> ```

## Output

For each task, the harness returns a `RunResult` containing the normalized trajectory, final answer, execution status, and diagnostic metadata. The benchmark writes these task details and aggregate metrics under the [run directory](https://agent-compass.mintlify.site/en/user_guide/other_features/results/overview.md#directory-layout); see [Results](https://agent-compass.mintlify.site/en/user_guide/other_features/results/overview.md).

Set the task execution deadline through `--execution-params` with `run_timeout_seconds` and `run_timeout_multiplier`. See [phase timeouts](https://agent-compass.mintlify.site/en/user_guide/using_agentcompass/timeouts.md).


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