> ## 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.

# OpenAI Chat

The `openai_chat` harness calls the configured model directly with the task messages, without any environment interaction — for no-environment or simple chat-style benchmarks (e.g. [HLE](/en/user_guide/modules/benchmarks/hle), [BrowseComp](/en/user_guide/modules/benchmarks/browsecomp)) ([source](https://github.com/open-compass/AgentCompass)).

This harness sends the task messages or prompt directly to the model endpoint and uses the reply as the final answer.
Model credentials come from the CLI `--model-*` fields and must use the `openai-chat` protocol. Only `host_process` is
supported because the harness does not use a task sandbox.

## How it works

* **No environment.** No container is started and no tools are installed; the task's messages (or prompt) are sent as a single chat completion request to the model endpoint.
* **Retries.** A failing model call is retried per `max_retries` (exponential backoff).
* **Collect results.** Takes the reply as the final answer and normalizes it — with usage and stop reason — into a single-step trajectory, returning a `RunResult`.

## Parameters

Pass a JSON object via `--harness-params '{...}'`, or a `harness.params` block in the file given to `--config`; the CLI wins on shared keys (deep-merge). See the [Harnesses overview](/en/user_guide/modules/harnesses/overview) for merge precedence.

### Parameter reference

<div style={{overflowX:'auto'}}>
  <table style={{minWidth:'720px', width:'100%'}}>
    <colgroup>
      <col width="18%" />

      <col width="10%" />

      <col width="12%" />

      <col width="16%" />

      <col width="44%" />
    </colgroup>

    <thead>
      <tr><th style={{whiteSpace:'nowrap'}}>Parameter</th><th style={{whiteSpace:'nowrap'}}>Type</th><th style={{whiteSpace:'nowrap'}}>Default</th><th>Choices / values</th><th>Description</th></tr>
    </thead>

    <tbody>
      <tr><td style={{whiteSpace:'nowrap'}}><code>max\_retries</code></td><td>int</td><td><code>3</code></td><td>≥ 0</td><td>Maximum retry count for one model call.</td></tr>
    </tbody>
  </table>
</div>

## Run example

```bash theme={"system"}
agentcompass run \
  hle \
  openai_chat \
  "$MODEL_NAME" \
  --env host_process \
  --harness-params '{"max_retries": 5}' \
  --model-base-url "$MODEL_BASE_URL" \
  --model-api-key "$MODEL_API_KEY" \
  --model-api-protocol openai-chat
```

## Output

The harness returns a `RunResult` per task: a single-step trajectory, final answer, and usage. Per-task details and aggregate metrics are written by the benchmark under `results/<benchmark>/<model>/<run>/` (see [Results](/en/user_guide/results)).
