saved
Trajectory: A Standard Format for Agent Experience Data
Hraness wrote this summary from a saved copy of the source. Quotations are taken word for word from the source.
gist
Letta’s open-source Trajectory package converts sessions from Claude Code, Codex, Letta Code, and other agent harnesses into one shared, compact format. Each session becomes a sequence of messages, reasoning, tool calls, and results meant for agents learning from past work. The format drops harness bookkeeping and by default truncates long tool output, which cut token counts about fivefold against native session logs on the sessions Letta sampled. Letta Code uses the format to bootstrap its memory from Claude Code and Codex sessions.
ideas
- The consumer should determine the format. Full-fidelity replay needs metrics and structured payloads, while an agent forming memory needs the smallest record that still explains what happened.
- Normalization removes incidental variation. A shared record schema lets agents process experience from different harnesses without first interpreting each vendor’s envelopes, event streams, and duplicated fields.
- Compression is a practical constraint. Letta reports roughly fivefold token reductions on sampled coding sessions, with default truncation cutting both Claude Code and Codex logs further than the untruncated format.
- Portable experience enables portable learning. Listing and normalizing sessions across harnesses supports shared indexing, memory bootstrapping, search, and background consolidation.
quotes
“Learning across harnesses requires first creating a standard data format for the experience each harness produces.”
“The format keeps only the information needed to understand the agent's experience.”
“On sessions we sampled, this results in a ~5x reduction in token counts compared to native session formats.”
“Agents can also search through trajectory files to find information from past sessions, even if they were from another harness.”