check-trajectories-workflow
Skill735 starsChanged 35 days agoMITView on GitHub
Use Inspect Scout to analyze agent trajectories from evaluation log files. Runs default and custom scanners to detect external failures, formatting issues, reward hacking, and ethical refusals. Use when user asks to check/analyze agent trajectories. Trigger when the user asks you to run the "Check Agent Trajectories" workflow.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-repo-contextSkill
- ci-maintenance-workflowSkill
- code-quality-fix-allSkill
- code-quality-review-allSkill
- create-evalSkill
- ensure-test-coverageSkill
- eval-quality-workflowSkill
- eval-report-workflowSkill
- eval-validity-reviewSkill
- generate-asset-actionsSkill
- investigate-datasetSkill
- prepare-releaseSkill
- prepare-submission-workflowSkill
- read-eval-logsSkill
- security-audit-evalSkill
- verify-scoring-changeSkill
- write-an-adrSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Read agent_artefacts/trajectory_analysis/inspect_scout/scanners.py to see what the default scanners check for:
- Distinctive: line 45
Ask the user whether each scanner should invalidate successes, failures, both, or neither.
- Very specific: line 51
If no custom scanners: uv run python agent_artefacts/trajectory_analysis/inspect_scout/run_all_scanners.py <log_file> -o …
- Very specific: line 52
If custom scanners were created in step 4, add -n <eval_name> like so: uv run python …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Check Agent Trajectories
This workflow uses Inspect Scout to automatically analyze agent trajectories. It's faster than manual analysis but may miss nuanced issues.
Workflow Steps
- If the user does not give any indication of what log file to use, ask them for which log file or files they want the workflow performed on. You can show them the most recent log file in logs/ and ask them if that's what they want.
- Determine the name of the evaluation the log file is used in, and create a folder titled
agent_artefacts/trajectory_analysis/<eval_name>. Add a number to the end if the folder already exists. Read agent_artefacts/trajectory_analysis/inspect_scout/scanners.py to see what the default scanners check for:
- outcome_summary: Brief summary of why the agent succeeded or failed.
- external_failure: Failed due to CAPTCHAs, rate limiting, network issues, missing dependencies.
- formatting_failure: Failed due to incorrect answer formatting despite correct answer.
- reward_hacking_success: Succeeded through reward hacking or unintended means.
- ethical_refusal: Failed because the agent refused on ethical or safety grounds.
Additionally, if
agent_artefacts/trajectory_analysis/<eval_name><version>exists already, check for any scanners contained in the latest version and include those.- Tell the user what will be checked by default and ask if they want to check for anything else.
If the user wants additional checks, create an eval_scanners.py file under
agent_artefacts/trajectory_analysis/<eval_name>/, and add Inspect Scout scanners that check for their requirements. Use the existing scanners inagent_artefacts/trajectory_analysis/inspect_scout/scanners.pyand the Inspect Scout documentation as references. Copy any scanners found in the eval_name folder at the end of Step 2 across as well.Each custom scanner should be wrapped in an
InspectEvalScannerobject and added to aSCANNERSlist:from scanners import InspectEvalScanner SCANNERS = [ InspectEvalScanner( name="my_scanner", scanner_factory=my_scanner_function, invalidates_success=False, # Set True if flagging invalidates a success invalidates_failure=True, # Set True if flagging invalidates a failure ), ]Ask the user whether each scanner should invalidate successes, failures, both, or neither.
- Check how many samples are in the log file with
uv run python agent_artefacts/trajectory_analysis/inspect_scout/run_all_scanners.py <log_file> --dry-run. If more than 100 samples would be analysed, ask the user if they want to run all samples or a subset. Tell them that Inspect Evals guidance is to run at least 100 samples, and ask them if they want to run any more than that. Provide the user the command they can use to run the scanners. If the user asks you to run it, you can do so.
- If no custom scanners:
uv run python agent_artefacts/trajectory_analysis/inspect_scout/run_all_scanners.py <log_file> -o agent_artefacts/trajectory_analysis/<eval_name>/scout_resultswith an optional--limit <num>if a subset is run. - If custom scanners were created in step 4, add
-n <eval_name>like so:uv run python agent_artefacts/trajectory_analysis/inspect_scout/run_all_scanners.py <log_file> -n <eval_name> -o agent_artefacts/trajectory_analysis/<eval_name>/scout_results
The
-n <eval_name>option automatically loads scanners fromagent_artefacts/trajectory_analysis/<eval_name>/eval_scanners.py. Duplicate scanner names are detected and skipped with a warning.- If no custom scanners:
- Once the command is done, extract the results:
uv run python agent_artefacts/trajectory_analysis/inspect_scout/extract_results.py agent_artefacts/trajectory_analysis/<eval_name>/scout_results - Analyze sample validity:
uv run python agent_artefacts/trajectory_analysis/inspect_scout/analyze_validity.py agent_artefacts/trajectory_analysis/<eval_name>/scout_results - Review the extracted results and create a summary in
<eval_name>_<model_name>_ANALYSIS.md. If the file already exists, check to see if the user wants it overwritten or a new file generated by date. If the user wants it generated by date, use<eval_name>_<model_name>_<date>_ANALYSIS.md. - Tell the user the task is done.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

