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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .agent_source import AgentSource
from .collaborator import Collaborator
from .owned_by import OwnedBy
from .sample_agent_input import SampleAgentInput


class AgentManifest(UniversalBaseModel):
    type: typing.Literal["agent"] = pydantic.Field(default="agent")
    """
    Type of the manifest
    """

    name: str = pydantic.Field()
    """
    The name of the Agent
    """

    description: str = pydantic.Field()
    """
    The description of the Agent
    """

    source: AgentSource
    collaborators: typing.List[Collaborator] = pydantic.Field()
    """
    List of users who have access to this Agent
    """

    sample_inputs: typing.Optional[typing.List[SampleAgentInput]] = pydantic.Field(default=None)
    """
    Sample inputs for your agent. These inputs are shown as an example in the "Agent Chat" page. (Click on Try Now in the agent listing page)
    """

    owned_by: typing_extensions.Annotated[typing.Optional[OwnedBy], FieldMetadata(alias="ownedBy")] = pydantic.Field(
        alias="ownedBy", default=None
    )

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

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