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

from __future__ import annotations

from typing import Iterable, Optional
from typing_extensions import Literal, Required, TypedDict

from .beta_tool_param import BetaToolParam

__all__ = ["BetaResponseToolSearchOutputItemParamParam", "Agent"]


class Agent(TypedDict, total=False):
    """The agent that produced this item."""

    agent_name: Required[str]
    """The canonical name of the agent that produced this item."""


class BetaResponseToolSearchOutputItemParamParam(TypedDict, total=False):
    tools: Required[Iterable[BetaToolParam]]
    """The loaded tool definitions returned by the tool search output."""

    type: Required[Literal["tool_search_output"]]
    """The item type. Always `tool_search_output`."""

    id: Optional[str]
    """The unique ID of this tool search output."""

    agent: Optional[Agent]
    """The agent that produced this item."""

    call_id: Optional[str]
    """The unique ID of the tool search call generated by the model."""

    execution: Literal["server", "client"]
    """Whether tool search was executed by the server or by the client."""

    status: Optional[Literal["in_progress", "completed", "incomplete"]]
    """The status of the tool search output."""
