# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class AgentTarget(UncheckedBaseModel):
    """
    Agent evaluation target (future).

    Evaluates agent conversations over multiple turns.

    Example:
        target = AgentTarget(
            type="agent",
            agent_id="agent_customer_support",
            max_turns=10,
            stop_on_goal=True
        )
    """

    type: typing.Literal["agent"] = "agent"
    revision_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    Specific revision/version to evaluate
    """

    metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
    """
    Target-specific metadata
    """

    agent_id: str = pydantic.Field()
    """
    Agent ID to evaluate
    """

    max_turns: typing.Optional[int] = pydantic.Field(default=None)
    """
    Maximum conversation turns
    """

    stop_on_goal: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Stop when agent reaches goal
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
