> ## 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.

# Agent AI integration

[Back to list of integrations](https://koreai.mintlify.site/agent-platform/integrations/kore-cx-modules.md)

This guide explains how to configure Artemis in Agent AI to generate better next best action (NBA) suggestions in the Agent AI widget.

## Prerequisites

Before configuring Artemis in Agent AI, verify you meet the following prerequisites in Artemis:

* An active project. For more details, see [Create and manage projects](https://koreai.mintlify.site/agent-platform/projects.md).
* A configured model. For more details, see [Create models](https://koreai.mintlify.site/agent-platform/administration/general-settings.md#models).
* An active agent. For more details, see [Create agents](https://koreai.mintlify.site/agent-platform/create-agents.md).
* An active deployment. For more details, see [Create a deployment](https://koreai.mintlify.site/agent-platform/deployment.md#create-a-deployment).
* An active connection. For more details, see [Channels](https://koreai.mintlify.site/agent-platform/channels.md).

## Step 1: Set up a connection in Artemis

1. Sign in to **Artemis**.

2. Create a **Project**, if you don't have one.

3. Go to **Agents** and create an agent.

4. Go to **Deployments** > **Environments** and create a deployment in one of the following environments: **Development**, **Staging**, or **Production**.

5. Go to the **Channels** tab and locate the **Kore Agent Assist** channel.

6. Select **Kore Agent Assist**, then select **+ New**.

7. In the **New Kore Agent Assist Connection** window, enter the following details:

   | Field | Description |
   | - | - |
   | Display Name | Enter a name for the connection. |
   | Environment | Select an environment from the list. |
   | Initial Status | Select Active or Inactive. |

8. Select **Create**.

9. Select the connection you created.

10. In the **Overview** tab, note the **Domain URL**, **Environment**, **App ID**, and **API Key**. The App ID is the project ID, and the system generates the API Key when you create the connection.

    > [!NOTE]
    >
    > Copy and store the **API Key** for future use, as it is visible only once. If you lose it, select the channel you created, go to the **Overview** tab, and select **Rotate** to regenerate the API key.

## Step 2: Configure an Artemis app in Agent AI

Configuring an Artemis app in Agent AI is a four-part process: entering app details, choosing the first request trigger, selecting conversation metadata, and adding custom metadata.

### Provide app details

| Field | Description |
| - | - |
| App Name | A name for the app (up to 50 characters). For example, Travel Agent. |
| Domain URL | The Artemis app's host URL. For example, `https://agents.kore.ai/`. |
| Environment | The environment name as configured in the Artemis app. |
| App ID | The Artemis app ID generated in the Artemis app. |
| API Key | The API key from the Artemis app's API Key section. |

### Choose first request trigger

Select one of the following options to define how Artemis receives its first request. These options are mutually exclusive.

| Option | Description |
| - | - |
| Use 'Trigger Welcome message' as the first request to Agentic | Triggers the agent's welcome as soon as the widget loads, before any customer message. Artemis runs the agent's `ON_START` handler, including its `SET` and `CALL` statements, and returns the welcome rendered with live session values. For details, see [How to use ON\_START to greet users](https://koreai.mintlify.site/agent-platform/abl/how-to/use-on-start-welcome). |
| Pass landing summary as first request to Agentic App | Sends the app-customer conversation's landing summary as the first request to Artemis on agent transfer. |

> [!NOTE]
>
> If you don't select either option, Artemis generates NBAs only when a customer sends a message.

### Select conversation metadata

Select the metadata to pass to the Artemis app. This preserves context during transfers from automation to human agents.

| Metadata | Description |
| - | - |
| Landing Summary | Summary of the customer-app conversation before transfer to a human agent. |
| Agent-Customer Chat History | Conversation history between the customer and human agent up to the latest message. |
| Custom Data | Collected custom data. |
| Intermittent Summary | Agent-generated mid-conversation summary. |

### Add custom metadata

Add a custom metadata script in the code editor to pass to the Artemis app. The system validates and highlights errors as you enter the script.

To configure an Artemis app:

1. Sign in to **AI for Service**.
2. Go to **Agent AI** > **Configurations** > **Linked Services** > **Agentic Configuration**.
3. Select **+ Add Agentic Copilot App**.
4. Enter the app name.
5. Enter the **Domain URL**, **Environment**, **App ID**, and **API Key** from your Artemis app.
6. Select **Use 'Trigger Welcome message' as the first request to Agentic** or **Pass landing summary as first request to Agentic App**.
7. Expand the **Pass Metadata** section and select the metadata to pass.
8. Expand the **Add Custom Metadata** section and enter your script in the code editor. Use the **Enlarge** or **Copy** buttons as needed.
9. Select **Test Connection & Save**.

## Metadata processing

When Agent AI calls an Artemis agent, it sends metadata with each request. Artemis stores this metadata in the session and updates it on every turn, so the agent always works with the latest values.

The LLM uses metadata only when you reference it in the agent definition. Artemis doesn't add metadata to the prompt automatically. Reference each key by name with the `_metadata` prefix.

In GOAL, PERSONA, or RESPOND:

`GOAL: Tailor the next best action to the customer's plan, {{_metadata.customerTier}}`.

In HTTP or MCP tool templates (headers, URLs, request bodies):

`{{session._metadata.customerTier}}`

Any custom key that Agent AI sends works the same way. For example, a key named `accountType` is available as `{{_metadata.accountType}}`.


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