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

import typing

import typing_extensions
from ..types.agent_audio_format import AgentAudioFormat
from ..types.agent_background_noise import AgentBackgroundNoise
from ..types.language_code import LanguageCode
from .agent_configuration_endpoint import AgentConfigurationEndpointParams
from .agent_project import AgentProjectParams
from .agent_template_variables_value import AgentTemplateVariablesValueParams
from .agent_tools_item import AgentToolsItemParams
from .task import TaskParams


class AgentParams(typing_extensions.TypedDict):
    id: str
    """
    The ID of the agent.
    """

    name: str
    """
    The name of the agent.
    """

    phone_number: typing.Optional[str]
    """
    The phone number that the agent uses to accept and initiate phone calls. `null` if the agent is not associated with a phone number, in which can the agent can be used via WebSockets.
    """

    project: AgentProjectParams
    """
    The project the agent belongs to.
    """

    timezone: str
    """
    The timezone of the agent. Used to format system variables like `{{system_time}}`.
    """

    voice_id: str
    """
    The voice ID of the agent.
    """

    audio_format: AgentAudioFormat
    """
    The audio format of the agent. If the agent has a phone number, the audio format will be `mulaw_8000`.
    """

    audio_speed: float
    """
    The audio speed of the agent. Must be a multiple of 0.1.
    """

    background_noise_level: float
    """
    The background noise level of the agent. Must be between 0 and 1.
    """

    background_noise: typing.Optional[AgentBackgroundNoise]
    """
    The background noise type. Can be "office", "call-center", "coffee-shop", or null.
    """

    welcome_message: typing.Optional[str]
    """
    Message to play when the conversation starts.
    """

    system_prompt: str
    """
    Instructions for the conversation.
    """

    template_variables: typing.Dict[str, AgentTemplateVariablesValueParams]
    """
    Template variables that the agent can use in the welcome message and the system prompt.
    """

    tools: typing.Sequence[AgentToolsItemParams]
    """
    List of tools available to the agent.
    """

    tasks: typing.Sequence[TaskParams]
    """
    Tasks for the agent to complete during the conversation.
    """

    no_input_poke_sec: typing.Optional[int]
    """
    Number of seconds of silence before sending a poke message. `null` disables the poke message.
    """

    no_input_poke_text: str
    """
    The message to send after the specified silence.
    """

    no_input_end_conversation_sec: int
    """
    Seconds of silence before ending the conversation.
    """

    languages: typing.Sequence[LanguageCode]
    """
    Array of ISO 639-1 language codes that the agent should be able to recognize
    """

    boosted_keywords: typing.Sequence[str]
    """
    These words, or short phrases, will be more accurately recognized by the agent.
    """

    configuration_endpoint: typing.Optional[AgentConfigurationEndpointParams]
    """
    When not `null`, the agent will call this endpoint to get configuration options.
    """
