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

import typing

import typing_extensions
from ..types.create_agent_request_audio_format import CreateAgentRequestAudioFormat
from ..types.create_agent_request_background_noise import CreateAgentRequestBackgroundNoise
from ..types.language_code import LanguageCode
from .create_agent_request_configuration_endpoint import CreateAgentRequestConfigurationEndpointParams
from .create_agent_request_template_variables_value import CreateAgentRequestTemplateVariablesValueParams
from .create_agent_request_tools_item import CreateAgentRequestToolsItemParams
from .task import TaskParams


class CreateAgentRequestParams(typing_extensions.TypedDict):
    name: str
    """
    The name of the agent. Can only contain lowercase letters, numbers and hyphens. Must be unique within the project.
    """

    phone_number: typing_extensions.NotRequired[typing.Optional[typing.Literal["assign-automatically"]]]
    timezone: typing_extensions.NotRequired[str]
    """
    The timezone of the agent. Used to format system variables like `{{system_time}}`.
    """

    voice_id: typing_extensions.NotRequired[str]
    """
    The voice ID to use.
    """

    audio_format: typing_extensions.NotRequired[CreateAgentRequestAudioFormat]
    """
    The audio format of the agent.
    """

    audio_speed: typing_extensions.NotRequired[float]
    """
    The audio speed of the agent.
    """

    background_noise_level: typing_extensions.NotRequired[float]
    """
    The background noise level of the agent.
    """

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

    welcome_message: typing_extensions.NotRequired[str]
    """
    Message to play when the conversation starts. Can contain template variables like `{{customer_name}}`.
    """

    system_prompt: typing_extensions.NotRequired[str]
    """
    Instructions for the conversation. Can contain template variables like `{{subject}}`.
    """

    template_variables: typing_extensions.NotRequired[typing.Dict[str, CreateAgentRequestTemplateVariablesValueParams]]
    """
    Variables that can be used in the welcome message and the system prompt.
    """

    tools: typing_extensions.NotRequired[typing.Sequence[CreateAgentRequestToolsItemParams]]
    """
    Array of built-in or custom tool names to use.
    """

    tasks: typing_extensions.NotRequired[typing.Sequence[TaskParams]]
    """
    Array of task objects with `name` and `description` fields.
    """

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

    no_input_poke_text: typing_extensions.NotRequired[str]
    """
    The message to send after the specified silence.
    """

    no_input_end_conversation_sec: typing_extensions.NotRequired[int]
    """
    Seconds of silence before ending the conversation.
    """

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

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

    configuration_endpoint: typing_extensions.NotRequired[
        typing.Optional[CreateAgentRequestConfigurationEndpointParams]
    ]
    """
    When not `null`, at the beginning of the conversation the agent will make a POST request to this endpoint when to get configuration options.
    """
