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`.
Usage
# 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 <path_to_traj.json>
# Search for trajectory files in a specific directory
mini-e i <path_to_directory>
Key bindings
q: Quit the inspectorh/LEFT: Previous stepl/RIGHT: Next stepj/DOWN: Scroll downk/UP: Scroll upH: Previous trajectoryL: Next trajectory
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.
??? note "Implementation"
- [Read on GitHub](https://github.com/swe-agent/mini-swe-agent/blob/main/src/minisweagent//run/inspector.py)
```python linenums="1"
--8<-- "src/minisweagent/run/inspector.py"
```
{% include-markdown "../_footer.md" %}