Adds an execution step to the trace
The execution step to add
Marks the trace as complete
Gets all execution steps
Gets all LLM calls
Gets all tool calls
Gets the total number of tokens used across all LLM calls
Gets the total cost across all LLM calls
Converts the trace to a plain JSON object
Traces the execution of an AI agent, recording steps, LLM calls, and tool usage.
Example