Record and Analyze Agent Trajectories
mainTrae Agent automatically records detailed execution trajectories (LLM interactions, tool usage, and metadata) for debugging and analysis.
- Automatic Storage: Trajectories are saved to
trajectories/trajectory_YYYYMMDD_HHMMSS.json. - Custom Storage: Use the
--trajectory-file <filename>flag to specify a custom path.
Trajectory files are useful for studying agent behavior and conducting ablation studies.
trae-cli run "Optimize database queries" --trajectory-file optimization_debug.json