Trajectory Format
Trajectory Format
Start with meaning, then move to detail.
This lesson explains Trajectory Format as part of Hermes internals and extension points. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect File Naming Convention, JSONL Entry Format, CLI/Interactive Format (from savetrajectory), then verify failure modes and version compatibility.
Know Python, Git, and basic project structure before changing code.
A clear outcome before you read.
- Understand Trajectory Format without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Tool
- A structured action the agent can call to read or change something.
What does the source say, and in what order?
- 01File Naming Convention
Start here to understand the core idea or structure.
- 02JSONL Entry Format
Read this after the foundation, then connect it to the previous step.
- 03CLI/Interactive Format (from savetrajectory)
Read this after the foundation, then connect it to the previous step.
- 04Batch Runner Format (from batchrunner.py)
Read this after the foundation, then connect it to the previous step.
- 05Conversations Array (ShareGPT Format)
Read this after the foundation, then connect it to the previous step.
- 06Complete Example
Read this after the foundation, then connect it to the previous step.
- 07Normalization Rules
Read this after the foundation, then connect it to the previous step.
- 08Reasoning Content Markup
Read this after the foundation, then connect it to the previous step.
- 09Tool Call Normalization
Read this after the foundation, then connect it to the previous step.
- 10Tool Response Normalization
Finish here to verify the result and special cases.
Copy only after you understand the effect.
{
"conversations": [ ... ],
"timestamp": "2026-03-30T14:22:31.456789",
"model": "anthropic/claude-sonnet-4.6",
"completed": true
}{
"prompt_index": 42,
"conversations": [ ... ],
"metadata": { "prompt_source": "gsm8k", "difficulty": "hard" },
"completed": true,
"partial": false,
"api_calls": 7,
"toolsets_used": ["code_tools", "file_tools"],
"tool_stats": {
"terminal": {"count": 3, "success": 3, "failure": 0},
"read_file": {"count": 2, "success": 2, "failure": 0},
"write_file": {"count": 0, "success": 0, "failure": 0}
},
"tool_error_counts": {
"terminal": 0,
"read_file": 0,
"write_file": 0
}
}{
"conversations": [
{
"from": "system",
"value": "You are a function calling AI model. You are provided with function signatures within <tools> </tools> XML tags. You may call one or more functions to assist with the user query. If available tools are not relevant in assisting with user query, just respond in natural conversational language. Don't make assumptions about what values to plug into functions. After calling & executing the functions, you will be provided with function results within <tool_response> </tool_response> XML tags. Here are the available tools:\n<tools>Read the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.