# File generated from our OpenAPI spec by Castiron. See CONTRIBUTING.md for details.

from typing import Dict, List, Optional
from typing_extensions import Literal

from ..._models import BaseModel
from .agent_text import AgentText
from .agent_reasoning import AgentReasoning
from .multi_agent_config import MultiAgentConfig
from .persisted_agent_tool import PersistedAgentTool

__all__ = ["Agent"]


class Agent(BaseModel):
    """A reusable agent scoped to the caller's project."""

    id: str
    """The ID of the reusable agent."""

    created_at: int
    """The Unix timestamp, in seconds, when the agent was created."""

    instructions: Optional[str] = None
    """Custom instructions appended to the agent's default base instructions."""

    metadata: Dict[str, str]
    """Custom string key-value pairs attached to the agent."""

    model: str
    """The requested model name used for inference."""

    multi_agent: MultiAgentConfig
    """The resolved configuration for creating and coordinating subagents."""

    name: Optional[str] = None
    """A human-readable name for the agent, or null if it is unnamed."""

    object: Literal["agent"]
    """The object type. Always `agent`."""

    reasoning: AgentReasoning
    """
    The resolved reasoning configuration, including the model default for an omitted
    effort.
    """

    service_tier: Literal["auto", "default", "flex", "priority", "fast"]
    """The resolved service-tier policy used for model requests."""

    text: AgentText
    """The resolved configuration for text generated by the agent."""

    tools: List[PersistedAgentTool]
    """Tools available to the agent."""

    updated_at: int
    """The Unix timestamp, in seconds, when the agent was last updated."""
