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

# agentcompass view

`agentcompass view` starts a local result viewer so you can inspect a run's metrics, summaries, task results, and step-by-step trajectories in a browser, and switch between runs. It only reads result files and never modifies the run directory.

```bash theme={"system"}
agentcompass view [OPTIONS] [RUN-DIR]
```

## Quick start

Pass an AgentCompass [run directory](/en/user_guide/other_features/results#directory-layout):

```bash theme={"system"}
agentcompass view \
  results/my-model_swebench_verified_mini_swe_agent/20260703_120000
```

The viewer prints its address in the terminal (`http://127.0.0.1:8765` by default) and opens the run in your default browser. Press `Ctrl+C` in the terminal to stop the viewer.

<Frame caption="Result viewer">
  <img src="https://github.com/user-attachments/assets/8b62ae43-7a8c-4a91-9686-2c582b516319" alt="Result viewer layout: the results directory tree on the left, the run overview and task list on the right" />
</Frame>

The upper part of the page is the run overview, with the headline metric, outcome bar, metric details, and summaries. Below it is the list of task cards, where each card's color shows the task outcome. Click a segment of the outcome bar to filter the tasks, or use the list toolbar to search by task ID or filter by category.

If you omit `RUN-DIR`, the viewer opens its home page, where you can enter a path in the top bar or pick a recently opened directory. Paths are resolved on the machine that runs the viewer. Use the switch on the right of the top bar to change the interface language between Chinese and English.

## Inspect task details and trajectories

Click a task card to open its detail page:

* **Left**: a summary with the primary metric, status, attempts, retries, and duration, plus analyzer findings and retry diagnostics.
* **Right**: if the task has several attempts, switch between them at the top. Issues and the traceback come first when present, followed by the final answer and the trajectory.
* **Trajectory**: each step is collapsed to a one-line preview with its tool-call count and duration. Expand a step to see the reasoning, response, tool-call arguments, and observations.

<Frame caption="Task detail">
  <img src="https://github.com/user-attachments/assets/4c76b338-1dc0-42de-a740-a02b7fb74d56" alt="Task detail: the task summary on the left, the final answer and an expanded trajectory step on the right" />
</Frame>

To examine the raw files in a terminal, click the copy button in the detail header to copy the full path of the task file.

## Switch between runs

After you load a run directory, the left sidebar shows the results root that contains it as a directory tree. Click a directory to expand or collapse it, and click a run directory to switch to that run. Click the refresh button in the sidebar to show newly created runs. Use the button at the left of the top bar to hide or show the sidebar.

You can also open a results root directly and pick a run in the sidebar:

```bash theme={"system"}
agentcompass view results
```

## Watch an evaluation in progress

You can open the viewer while an evaluation is still running. Unfinished tasks appear as running cards with their current phase and are not counted in the task total. The viewer turns on periodic auto-refresh for a run in progress; you can switch it off in the task list toolbar or refresh manually at any time. If the evaluation exited abnormally, the unfinished tasks it left behind are shown as interrupted.

## View results on a remote machine

When the results live on a remote machine, start the viewer there with `--no-open`, then forward the port from your local machine:

```bash theme={"system"}
agentcompass view results/my-run/20260703_120000 --no-open
```

```bash theme={"system"}
ssh -L 8765:127.0.0.1:8765 user@remote-host
```

Then open the address printed in the terminal in your local browser.

<Warning>
  The viewer listens on `127.0.0.1` by default. If you bind a non-loopback address such as `--host 0.0.0.0`, anyone who can reach the port can read every result file the current user can read on that machine.
</Warning>

## Build the frontend for source installs

Released packages include the viewer frontend. If you installed AgentCompass from a repository clone in editable mode (`pip install -e .`), the first `agentcompass view` run automatically runs `npm ci` and `npm run build` in `tools/result-browser` and writes the build to `src/agentcompass/viewer/static/`. The first build needs network access to download npm packages.

The automatic build requires Node.js 20.19+ or 22.12+. If Node.js is missing or too old, the command exits with an error that asks you to install it.

An existing build is not rebuilt. After you update the code, rebuild the frontend with `--rebuild`:

```bash theme={"system"}
agentcompass view --rebuild
```

## Options

| Option | Required | Default | Purpose |
| - | - | - | - |
| `RUN-DIR` / `--run-dir` | Optional | None | Run directory or results root to open on startup. |
| `--host <address>` | Optional | `127.0.0.1` | Address to listen on. |
| `--port <port>` | Optional | `8765` | Preferred port; the following ports are tried if it is busy. |
| `--open` / `--no-open` | Optional | `--open` | Whether to open the viewer in the default browser. |
| `--rebuild` | Optional | Off | Rebuild the frontend from source before starting; source installs only. |

## Related pages

* [Results and outputs](/en/user_guide/other_features/results)
* [`agentcompass summary`](/en/user_guide/using_agentcompass/cli/summary)
* [`agentcompass analysis`](/en/user_guide/using_agentcompass/cli/analysis)
* [CLI overview](/en/user_guide/using_agentcompass/cli/overview)


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