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

from ...core.unchecked_base_model import UncheckedBaseModel
import typing
from .templates_create_agents_response_agents_item_created_by_id import (
    TemplatesCreateAgentsResponseAgentsItemCreatedById,
)
from .templates_create_agents_response_agents_item_last_updated_by_id import (
    TemplatesCreateAgentsResponseAgentsItemLastUpdatedById,
)
from .templates_create_agents_response_agents_item_created_at import TemplatesCreateAgentsResponseAgentsItemCreatedAt
from .templates_create_agents_response_agents_item_updated_at import TemplatesCreateAgentsResponseAgentsItemUpdatedAt
from .templates_create_agents_response_agents_item_tool_rules import TemplatesCreateAgentsResponseAgentsItemToolRules
from .templates_create_agents_response_agents_item_message_ids import TemplatesCreateAgentsResponseAgentsItemMessageIds
from .templates_create_agents_response_agents_item_agent_type import TemplatesCreateAgentsResponseAgentsItemAgentType
from .templates_create_agents_response_agents_item_llm_config import TemplatesCreateAgentsResponseAgentsItemLlmConfig
from .templates_create_agents_response_agents_item_embedding_config import (
    TemplatesCreateAgentsResponseAgentsItemEmbeddingConfig,
)
from .templates_create_agents_response_agents_item_organization_id import (
    TemplatesCreateAgentsResponseAgentsItemOrganizationId,
)
from .templates_create_agents_response_agents_item_description import TemplatesCreateAgentsResponseAgentsItemDescription
from .templates_create_agents_response_agents_item_metadata import TemplatesCreateAgentsResponseAgentsItemMetadata
from .templates_create_agents_response_agents_item_memory import TemplatesCreateAgentsResponseAgentsItemMemory
from .templates_create_agents_response_agents_item_tools_item import TemplatesCreateAgentsResponseAgentsItemToolsItem
from .templates_create_agents_response_agents_item_sources_item import (
    TemplatesCreateAgentsResponseAgentsItemSourcesItem,
)
from .templates_create_agents_response_agents_item_tool_exec_environment_variables import (
    TemplatesCreateAgentsResponseAgentsItemToolExecEnvironmentVariables,
)
from .templates_create_agents_response_agents_item_project_id import TemplatesCreateAgentsResponseAgentsItemProjectId
from .templates_create_agents_response_agents_item_template_id import TemplatesCreateAgentsResponseAgentsItemTemplateId
from .templates_create_agents_response_agents_item_base_template_id import (
    TemplatesCreateAgentsResponseAgentsItemBaseTemplateId,
)
from .templates_create_agents_response_agents_item_identity_ids import (
    TemplatesCreateAgentsResponseAgentsItemIdentityIds,
)
from .templates_create_agents_response_agents_item_message_buffer_autoclear import (
    TemplatesCreateAgentsResponseAgentsItemMessageBufferAutoclear,
)
from .templates_create_agents_response_agents_item_multi_agent_group import (
    TemplatesCreateAgentsResponseAgentsItemMultiAgentGroup,
)
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class TemplatesCreateAgentsResponseAgentsItem(UncheckedBaseModel):
    created_by_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemCreatedById] = None
    last_updated_by_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemLastUpdatedById] = None
    created_at: typing.Optional[TemplatesCreateAgentsResponseAgentsItemCreatedAt] = None
    updated_at: typing.Optional[TemplatesCreateAgentsResponseAgentsItemUpdatedAt] = None
    id: str
    name: str
    tool_rules: typing.Optional[TemplatesCreateAgentsResponseAgentsItemToolRules] = None
    message_ids: typing.Optional[TemplatesCreateAgentsResponseAgentsItemMessageIds] = None
    system: str
    agent_type: TemplatesCreateAgentsResponseAgentsItemAgentType
    llm_config: TemplatesCreateAgentsResponseAgentsItemLlmConfig
    embedding_config: TemplatesCreateAgentsResponseAgentsItemEmbeddingConfig
    organization_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemOrganizationId] = None
    description: typing.Optional[TemplatesCreateAgentsResponseAgentsItemDescription] = None
    metadata: typing.Optional[TemplatesCreateAgentsResponseAgentsItemMetadata] = None
    memory: TemplatesCreateAgentsResponseAgentsItemMemory
    tools: typing.List[TemplatesCreateAgentsResponseAgentsItemToolsItem]
    sources: typing.List[TemplatesCreateAgentsResponseAgentsItemSourcesItem]
    tags: typing.List[str]
    tool_exec_environment_variables: typing.Optional[
        TemplatesCreateAgentsResponseAgentsItemToolExecEnvironmentVariables
    ] = None
    project_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemProjectId] = None
    template_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemTemplateId] = None
    base_template_id: typing.Optional[TemplatesCreateAgentsResponseAgentsItemBaseTemplateId] = None
    identity_ids: typing.Optional[TemplatesCreateAgentsResponseAgentsItemIdentityIds] = None
    message_buffer_autoclear: typing.Optional[TemplatesCreateAgentsResponseAgentsItemMessageBufferAutoclear] = None
    multi_agent_group: typing.Optional[TemplatesCreateAgentsResponseAgentsItemMultiAgentGroup] = None

    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
