# Inspector: Browse agent trajectories
!!! abstract "Overview"
* The `inspector` is a tool that allows you to browse `.traj.json` files that show the history of a mini-SWE-agent run.
* Quickly start it with `mini-e i` or `mini-extra inspector`.
* See [output files](output_files.md) for the trajectory file format.
* Alternative: [jless](https://jless.io/) is a great command-line JSON viewer for browsing trajectories.
## Usage
```bash
# Find all .traj.json files recursively from current directory
mini-extra inspector
# or shorter
mini-e i
# Open the inspector for a specific file
mini-e i
# Search for trajectory files in a specific directory
mini-e i
```
## Key bindings
- `q`: Quit the inspector
- `h`/`LEFT`: Previous step
- `l`/`RIGHT`: Next step
- `j`/`DOWN`: Scroll down
- `k`/`UP`: Scroll up
- `H`: Previous trajectory
- `L`: Next trajectory
- `e`: Open current step in [jless](https://jless.io/)
### FAQ
> How can I select/copy text on the screen?
Hold down the `Alt`/`Option` key and use the mouse to select the text.
## Implementation
The inspector is implemented with [textual](https://textual.textualize.io/).
??? note "Implementation"
- [Read on GitHub](https://github.com/swe-agent/mini-swe-agent/blob/main/src/minisweagent/run/utilities/inspector.py)
```python linenums="1"
--8<-- "src/minisweagent/run/utilities/inspector.py"
```
{% include-markdown "../_footer.md" %}