langchain/evaluation/agents/trajectory_eval_chain.py/TrajectoryEvalChain/get_agent_trajectory
class TrajectoryEvalChain:    def get_agent_trajectory(steps: Union[str, List[Tuple[AgentAction, str]]]) -> str:
        if isinstance(steps, str):
            return steps

        return "\n\n".join(
            [
                f"""Step {i}:
Tool used: {action.tool}
Tool input: {action.tool_input}
Tool output: {output}"""
                for i, (action, output) in enumerate(steps, 1)
            ]
        )