> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognigy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started with Agent Copilot for Voice-to-Chat

In this guide, you will learn how to configure your first embedded Agent Copilot workspace for voice-to-chat applications. In these applications, the end user calls a voice AI Agent and the AI Agent hands over to a human agent. The human agent keeps supporting the end user through a chat in the contact center platform, and the text is converted to voice by a text-to-speech provider. This configuration provides an Agent Copilot workspace that includes two widgets:

* A [Copilot: Next Action Tile Node](/ai/agents/develop/node-reference/agent-copilot/next-action-tile) that suggests a next action to the human agent.
* A [Copilot: Transcript Tile Node](/ai/agents/develop/node-reference/agent-copilot/transcript-tile) that displays the conversation transcript to the human agent.

## Prerequisites

* Access to [Voice Gateway](/voice-gateway/index).
* Configure a speech provider in [Cognigy.AI](/ai/agents/test/voice-preview#set-up-a-speech-provider) and the [Voice Gateway Self-Service Portal](/voice-gateway/webapp/speech-services).
* Configure the [phone number](/voice-gateway/webapp/phone-numbers) you use in your contact center in the Voice Gateway Self-Service Portal.
* Configure a contact center platform that you can integrate with a [handover provider](/ai/escalate/handover-reference/overview). For example, for [Live Agent](/ai/escalate/handover-reference/live-agent), you need to have an [Inbox](/live-agent/settings/inboxes) with the [Project ID and the Webhook URL set up](/live-agent/settings/inboxes#edit-inboxes) and, if necessary, the **Enable AI Copilot Workspace** option activated.
* Add a [compatible LLM](/ai/agents/develop/gen-ai-and-llms/model-support-by-feature) for the LLM Prompt Node.

## Setup Process

1. Create a handover provider. The handover provider connects the AI Agent to your contact center platform.
2. Create a Handover Flow. The Handover Flow configures the interaction with the AI Agent and the handover to a human agent.
3. Create an Agent Copilot Flow. The Agent Copilot Flow configures the Agent Copilot workspace and the individual widgets.
4. Create a Voice Copilot Endpoint. The Voice Copilot Endpoint receives the transcript of the voice call and sends it to the Agent Copilot workspace.
5. Create a Voice Gateway Endpoint. The Voice Gateway Endpoint connects the AI Agent to Voice Gateway.
6. Create an [application](/voice-gateway/webapp/applications) in the Voice Gateway Self-Service Portal. The Voice Gateway application connects your contact center phone number to the Voice Gateway Endpoint.
7. Test the Agent Copilot workspace by calling the phone number you configured in the Voice Gateway application.

## Set Up Agent Copilot for Voice-to-Chat

<Steps>
  <Step title="Create a Handover Provider">
    In **Deploy > Handover Providers**, create a [handover provider](/ai/escalate/handovers) according to your contact center platform. Depending on the platform, you may need different settings for the Handover Flow.
  </Step>

  <Step title="Create a Handover Flow">
    1. In **Build > Flows**, create a [Flow](/ai/agents/develop/projects-and-flows/overview) and give it a clear name, for example, `Handover`.
    2. In the Flow editor, add a [Say Node](/ai/agents/develop/node-reference/basic/say) and set its **Text** parameter to `Hi, let's hand you over to the humans.`.
    3. Add a [Handover to Human Agent Node](/ai/agents/develop/node-reference/service/handover-to-agent) and configure the following:

    * **Handover Provider** — set to the previously [created Handover Provider](#create-a-handover-provider), and [configure it accordingly](/ai/escalate/handover-reference/overview). For example, if you use [Live Agent](/ai/escalate/handover-reference/live-agent), you need to set the **Live Agent Inbox ID**.
    * **Handover Accepted Message** — enter `Transferring to humans...`.
  </Step>

  <Step title="Create an Agent Copilot Flow">
    1. In your Cognigy.AI Project, go to **Build > Flows** and create a [Flow](/ai/agents/develop/projects-and-flows/overview) and give it a clear name, for example, `Agent Copilot`.
    2. Add a [Set Grid Node](/ai/agents/develop/node-reference/agent-copilot/set-grid) and set the **Copilot Grid Configuration** as follows:

       ```json theme={null}
       {
         "grid": {
           "columns": 2,
           "rows": 2,
           "gap": 5
         },
         "tiles": {
           "next-action": {
             "x": 1,
             "y": 1,
             "rows": 1,
             "columns": 1
           },
           "transcript": {
             "x": 1,
             "y": 2,
             "rows": 1,
             "columns": 1
           }
         }
       }
       ```
    3. After the Copilot: Set Grid Node, add an [LLM Prompt Node](/ai/agents/develop/node-reference/service/llm-prompt). Configure it to generate the next best response for the agent based on the user's latest input and to store the result in the Input object:

    * **System Prompt** — enter the following:

    ```txt theme={null}
    Based on the user's last message, suggest the most helpful next response for a human agent.
    ```

    * In the **Storage & Streaming** section, configure the following:
      * **How to handle the result** — set to **Store in Input**.
      * **Input Key to store Result** — set to `input.promptResult`.

    4. Add the following Agent Copilot Nodes after the LLM Prompt Node and configure them as follows:
       * **[Copilot: Next Action Tile Node](/ai/agents/develop/node-reference/agent-copilot/next-action-tile)**:
         * **Tile ID** — `next-action`
         * **Text**:
         ```txt theme={null}
         {{input.promptResult.detailedResult.choices[0].message.content}}
         ```
         This expression dynamically retrieves the LLM-generated suggestion for the tile.

    * **[Copilot: Transcript Tile Node](/ai/agents/develop/node-reference/agent-copilot/transcript-tile)**:
      * **Tile ID** — `transcript`
  </Step>

  <Step title="Create a Voice Copilot Endpoint">
    1. In **Deploy > Endpoints**, click **+ New Endpoint** and select **Voice Copilot**.
    2. In the **New Endpoint** section, configure the following:
       * **Name** — enter a unique name, for example, `Voice Agent Copilot Endpoint`.
       * **Flow** — select the Agent Copilot Flow you created from the list.
  </Step>

  <Step title="Create a Voice Gateway Endpoint">
    1. In **Deploy > Endpoints**, click **+ New Endpoint** and select **Voice Gateway**.
    2. In the **New Endpoint** section, configure the following:
       * **Name** — enter a unique name.
       * **Flow** — select the Handover Flow from the list, in this example, `Handover`.
    3. Copy the Endpoint URL for later use in the Voice Gateway application and save the changes.
  </Step>

  <Step title="Create a Voice Gateway Application">
    1. In the [Voice Gateway Self-Service Portal](/voice-gateway/webapp/overview), click **Application** in the left-side menu, then **Add application**.
    2. On the **Add an application** page, configure the following:
       * **Application name** — enter a unique name, for example, `Voice-to-Chat App`.
       * **Calling webhook** — enter the Endpoint URL you copied from the Voice Gateway Endpoint settings and make sure to select the **POST** in the **METHOD** field.
       * **Call status webhook** — enter the Endpoint URL you copied from the Voice Gateway Endpoint settings and make sure to select the **POST** in the **METHOD** field.
       * **Speech synthesis vendor** and **Speech recognizer vendor** — make sure you configure the same speech provider as configured in [Cognigy.AI](/ai/agents/test/voice-preview#set-up-a-speech-provider).
    3. Click **Save**, then **Phone Numbers** in the left-side menu.
    4. Select the phone number you use in your contact center.
    5. In the **Application** field, select **Voice-to-Chat App** and save the changes.

    Your voice AI Agent can now receive calls and hand them over to a human agent with access to the Agent Copilot workspace.
  </Step>

  <Step title="Test Agent Copilot">
    To test Agent Copilot, follow these steps:

    1. Open your contact center platform and call the number you configured in the Voice Gateway Application.
       The voice AI Agent answers the call and creates a chat session in the contact center platform.
    2. Say something to the voice AI Agent, for example, `Thanks, I'll wait for the human agent.`. Your voice message is sent as text to the chat in the contact center platform.
    3. Find and select the corresponding chat in the contact center platform.
           <Note>
             At the start of a conversation, the `Initial message for AI Copilot` reply may appear in the human agent's chat as if it were sent by the end user. This reply is added automatically to trigger Agent Copilot and is visible only to the human agent.
           </Note>
    4. The Agent Copilot workspace displays a widget with the conversation transcript and a widget with the next action.
    5. Click the icon to paste the next action text into the chat and send the message. The voice AI Agent responds with the text from the next action widget.
  </Step>
</Steps>

## More Information

* [Agent Copilot](/agent-copilot/overview)
* [Getting started with Agent Copilot](/agent-copilot/getting-started/chat)
* [Agent Copilot Configuration](/agent-copilot/configure/overview)
* [Agent Copilot Nodes](/ai/agents/develop/node-reference/agent-copilot/overview)
* [Agent Copilot Embedding](/agent-copilot/deploy/embedding)
* [Agent Copilot for Voice](/agent-copilot/getting-started/voice)
* [Integration with Contact Centers](/agent-copilot/configure/overview)
