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

import datetime as dt
import typing

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


class AgentOutputEvent(UniversalBaseModel):
    """
    An event representing a complete agent response.
    """

    id: str = pydantic.Field()
    """
    The unique identifier for the event.
    """

    session_key: AgentSessionKey = pydantic.Field()
    """
    The key of the session this event belongs to.
    """

    type: typing.Literal["agent_output"] = "agent_output"
    content: str = pydantic.Field()
    """
    The complete agent response content.
    """

    created_at: dt.datetime = pydantic.Field()
    """
    Timestamp when the event was created.
    """

    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
