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

# Set up Amazon Connect (chat)

[Back to messaging or digital channels](https://koreai.mintlify.site/agent-platform/channels.md#messaging-or-digital-channels)

Connect your agent to Amazon Connect so it handles customer chat contacts. Amazon Connect hands each chat to the Artemis agent over A2A, together with the transcript so far. The agent joins the contact as a collaborating agent, and Amazon Connect takes the chat back when the agent finishes or escalates.

The setup requires:

1. [Prepare the Amazon Connect instance](#prepare-the-amazon-connect-instance) for chat hand-off.
2. [Create the connection in Artemis](#create-the-connection-in-artemis) and copy its WebSocket endpoint URL.
3. [Connect Amazon Connect to Artemis](#connect-amazon-connect-to-artemis) with the endpoint URL and the connection's API key.
4. [Verify the connection](#verify-the-connection) with a complete chat contact.

After setup, Amazon Connect sends the chat to the agent, the agent works with the customer, and the agent returns one of three outcomes to Amazon Connect: complete, complete with an error, or escalated to a human queue.

**Important considerations**

* **Amazon Connect owns the contact**: The agent joins the chat as a collaborating agent. It doesn't own routing. Amazon Connect decides what happens after the agent returns its outcome, including the transfer to a human queue.
* **This page covers chat only**: For Amazon Connect voice contacts, set up the separate **Amazon Connect Voice** channel, which runs through the Kore.ai voice gateway.
* **Contacts that Artemis already handled skip the hand-off**: In your contact flow, send contacts whose source attribute is `artemis_bot` straight to the queue, without the A2A hand-off step.
* **The full endpoint URL exists only after you create the connection**: Before creation, Artemis shows the pattern `/ws/amazon-connect/{connectionId}`.
* **Traces can contain customer data**: Tracing and tool inputs and outputs are on by default. Review both settings before production.

## Prerequisites

Confirm these before you start.

* Artemis project access with permission to open **Deployments** > **Channels**, and a deployed agent in the environment you intend to bind.
* An Amazon Connect administrator who manages the instance, the contact flow, the Lex V2 bot, and AWS Secrets Manager.
* An Amazon Connect instance on the **Customer** tier.
* A publicly reachable WSS endpoint for your Artemis environment, with a valid TLS certificate.

***

## Prepare the Amazon Connect instance

Ask your Amazon Connect administrator to complete this checklist. Artemis shows the same checklist in the connection's setup panel.

1. Use an Amazon Connect **Customer** tier instance.
2. Configure a Lex V2 bot with the `AMAZON.QInConnectIntent` intent.
3. Enable chat message streaming.
4. Set `audioStreamingEnabled` to `false`.
5. In the contact flow, send contacts whose source attribute is `artemis_bot` straight to the queue.

***

## Create the connection in Artemis

Create the connection before you configure Amazon Connect. Artemis generates the full endpoint URL and the API key when you create it.

1. Open Artemis and select the project.

2. Go to **Deployments** > **Channels** > **Amazon Connect (chat)**.

3. Select **Set up Amazon Connect (chat)**. The **New Amazon Connect (chat) Connection** dialog opens, with the setup guide on the left and the fields on the right.

4. Review the tracing options in the setup guide:

   | Option | What it controls | Default |
   | - | - | - |
   | **Enable tracing** | Sends a trace of each turn to Amazon Connect when Amazon Connect requests it. | On |
   | **Include tool inputs and outputs** | Adds tool inputs and outputs to each trace. Traces can then contain customer data. | On |

5. Configure the fields:

   | Artemis field | What it controls |
   | - | - |
   | **Display name** | The label operators see in Studio. Amazon Connect doesn't use it. Name it for the Amazon Connect instance and environment. |
   | **Environment** | The environment whose active deployment answers the chat. Leave the working copy default only while you develop. |
   | **Initial Status** | **Active** accepts contacts immediately. **Inactive** keeps the connection saved but disabled until you activate it. |

6. Select **Create**.

7. Open the connection and copy the full **WebSocket endpoint URL** and the connection's API key.

***

## Connect Amazon Connect to Artemis

Give Amazon Connect the endpoint and the credential it needs to reach the agent.

1. In the AWS CloudShell setup for the integration, set `ENDPOINT_URL` to the full WebSocket endpoint URL you copied from Artemis.
2. Store the connection's API key in AWS Secrets Manager. Don't paste the key into the contact flow, scripts, or tickets.
3. Confirm the endpoint is reachable over WSS from Amazon Connect and presents a valid TLS certificate.
4. Route the chat contacts you want the agent to handle to the hand-off step in your contact flow.

***

## Verify the connection

Each check exercises a different part of the chat path.

1. Start a chat from the Amazon Connect customer chat interface. Confirm the agent joins the contact and answers with context from the transcript.
2. Finish the conversation. Confirm Amazon Connect receives the **complete** outcome and takes the chat back.
3. Start a new chat and ask for a human. Confirm the agent returns the **escalated** outcome and Amazon Connect routes the chat to the human queue.
4. Send a contact whose source attribute is `artemis_bot`. Confirm it goes straight to the queue without a hand-off.
5. With tracing on, confirm Amazon Connect receives a trace for each turn when it requests one.

### Chat behavior

Artemis applies these rules to every contact.

| Area | Behavior |
| - | - |
| Transport | Amazon Connect hands the chat to the agent over A2A, through the connection's WebSocket endpoint. |
| Context | Amazon Connect sends the conversation transcript with the hand-off. |
| Role | The agent joins the contact as a collaborating agent. Amazon Connect keeps ownership of the contact. |
| Outcomes | The agent returns **complete**, **complete with an error**, or **escalated** to a human queue. |
| Tracing | When enabled, Artemis sends a trace of each turn to Amazon Connect on request. Tool inputs and outputs are included only when that option is on. |

***

## Security and environment boundaries

The API key and the traces are the two places where data leaves Artemis, so protect both deliberately.

* **API key**: Store it only in AWS Secrets Manager, and rotate it immediately if someone exposes it.
* **Traces**: Turn off **Include tool inputs and outputs** when tool data contains personal or regulated information that Amazon Connect shouldn't receive.
* **Endpoint**: Expose only the WSS endpoint, with valid TLS, and manage network policy with your platform administrator.
* **Environments**: Use separate Amazon Connect instances or contact flows, API keys, and connections for development, staging, and production.

***

## Manage the channel connection

Open a connection from **Deployments** > **Channels** > **Amazon Connect (chat)** to manage it. Use the connection page to update the display name, the tracing options, and the environment binding, and to activate or deactivate the connection.

A connection on the working copy changes as you edit the agent. Bind it to a published environment before production.

***

## Troubleshoot connection issues

Most failures trace to the Amazon Connect instance setup, the endpoint, or the API key.

| Symptom | Likely cause | Recommended action |
| - | - | - |
| The agent never joins the chat | The hand-off can't reach Artemis | Confirm `ENDPOINT_URL` holds the full WebSocket URL from the connection, the endpoint is public over WSS with valid TLS, and the connection is **Active**. |
| Amazon Connect rejects the hand-off | The API key is wrong or missing | Confirm the key in AWS Secrets Manager matches the connection's key. Rotate it if you're unsure. |
| The hand-off doesn't start | The instance isn't ready for chat hand-off | Check the administrator checklist: Customer tier, Lex V2 bot with `AMAZON.QInConnectIntent`, chat message streaming on, and `audioStreamingEnabled` set to `false`. |
| A contact loops back to the agent | The contact flow doesn't skip handled contacts | Send contacts whose source attribute is `artemis_bot` straight to the queue. |
| The wrong agent version answers | The connection is bound to the working copy or another environment | Check the connection's environment binding. |
| Traces don't appear in Amazon Connect | Tracing is off, or Amazon Connect didn't request a trace | Turn on **Enable tracing** and confirm Amazon Connect requests traces. |

***

**Related articles:**

* [Channels](https://koreai.mintlify.site/agent-platform/channels.md)
* [Agent-to-Agent (A2A)](https://koreai.mintlify.site/agent-platform/channels/agent-to-agent)
* [Set up Email](https://koreai.mintlify.site/agent-platform/channels/email)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.