Understand Hermes Trajectory JSONL
Read, validate, and handle Hermes ShareGPT-compatible trajectory files for debugging, evaluation, and training-data workflows. This guide focuses on the public implementation contract; the official Hermes documentation remains the source of truth as interfaces evolve.
How the interface works
Hermes can save completed conversations to trajectory_samples.jsonl and failed or interrupted work to failed_trajectories.jsonl. Batch runs use custom output files with additional metadata.
Each JSONL line is a self-contained object. Conversation roles are normalized to ShareGPT names, reasoning is represented in think blocks, and tool calls and responses use consistent XML-wrapped JSON.
Batch entries add prompt indexes, metadata, completion state, API-call counts, toolsets, normalized tool statistics, and error counts. Consistent zero-filled tool keys help dataset loaders avoid schema drift.
Trajectory files may contain prompts, tool arguments, outputs, and reasoning. Treat them as potentially sensitive operational data; redact or exclude private material before sharing or publishing.
Practical checklist
- Enable trajectory saving only for a defined debugging or data purpose.
- Keep completed and failed samples distinguishable.
- Validate every nonblank line as JSON before loading a dataset.
- Filter on completion and partial state according to the evaluation contract.
- Run a privacy review before moving files outside the local project boundary.
Common pitfalls
- Committing raw trajectories that contain secrets, private paths, or customer data.
- Parsing JSONL as one giant JSON document.
- Mixing completed and failed runs without checking status fields.
- Assuming normalized formatting means the underlying content is safe or high quality.
Verification steps
- Load every line independently and assert required top-level fields.
- Check conversation roles and tool-response pairing.
- Compare declared tool statistics with sampled conversation events.
- Open a small dataset slice in the target loader and confirm stable columns before a large import.
Official reference
https://hermes-agent.nousresearch.com/docs/developer-guide/trajectory-format
