agentle.agents.performance_metrics

Module for representing and managing agent execution results.

This module provides the AgentRunOutput class which encapsulates all data produced during an agent’s execution cycle. It represents both the final response and metadata about the execution process, including conversation steps and structured outputs.

Example: ```python from agentle.agents.agent import Agent from agentle.generations.providers.google.google_generation_provider import GoogleGenerationProvider

# Create and run an agent agent = Agent(

generation_provider=GoogleGenerationProvider(), model=”gemini-2.5-flash”, instructions=”You are a helpful assistant.”

)

# The result is an AgentRunOutput object result = agent.run(“What is the capital of France?”)

# Access different aspects of the result text_response = result.generation.text conversation_steps = result.steps structured_data = result.parsed # If using a response_schema performance_metrics = result.performance_metrics # New performance metrics ```

Functions

Field()

!!! abstract "Usage Documentation"

Classes

BaseModel()

Alias for pydantic.BaseModel.

PerformanceMetrics(*, ...[, step_metrics])

Comprehensive performance metrics for agent execution.

Sequence()

All the operations on a read-only sequence.

StepMetric(*, step_id, step_type, ...[, ...])

Performance metrics for an individual execution step.