# 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_status import AgentStatus


class AgentListItem(UniversalBaseModel):
    """
    Minimal agent shape for discovery/listing.

    The /agents list endpoint is authorized via `discover` and must not leak
    read-level fields (e.g. description, registration metadata).
    """

    id: str = pydantic.Field()
    """
    The unique identifier of the agent.
    """

    name: str = pydantic.Field()
    """
    The agent name (unique within namespace).
    """

    namespace_id: str = pydantic.Field()
    """
    The namespace ID this agent belongs to.
    """

    status: typing.Optional[AgentStatus] = pydantic.Field(default=None)
    """
    Agent status (ACTIVE/DELETED).
    """

    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
