ExecutionMetrics aggregates metrics for an agent task, including LLM usage and overall duration.

Properties

PropertyTypeDescription
execution_idstringID of the execution
ai_modelstringModel used during the task
durationnumberTotal execution time in seconds
llm_tokensLLMTokensToken counts for the task
resultstringFinal result summary
statusstringExecution status

Example

Python
from xpander_sdk import ExecutionMetrics

metrics = ExecutionMetrics(execution_id="exec-1234")
print(metrics.status)

The xpander-sdk reference contains additional examples.