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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .agent_event import AgentEvent
from .agent_session_key import AgentSessionKey


class AgentResponse(UniversalBaseModel):
    """
    Response containing the complete list of events generated by an agent.
    """

    events: typing.List[AgentEvent] = pydantic.Field()
    """
    List of all events generated during agent processing.
    """

    session_key: AgentSessionKey = pydantic.Field()
    """
    The key of the session where these events occurred.
    """

    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
