# AI Agent

{% hint style="info" %}
In the coming period, the DialoX team will bring these capabilities to partners and customers by introducing the **AI Agent** skill that enables agentic capabilities for flow-based bots. This skill is currently available only to selected beta partners and will be made generally available later this year.

Currently a beta feature, available on request only.
{% endhint %}

## Introduction

The AI Agent works on **any channel**. It comes with ready-made agent prompts for a **Receptionist** and a **Co-worker router**. These defaults are mainly tuned for **phone** conversations; you can use them as-is or adapt the wording and tool guidance for web chat, messaging, or other channels.

## Getting Started

### Channel Requirements

* **Phone**\
  The bundled prompts assume telephony-style interaction: short, clear turns and simple tool use.\
  phone.md<br>
* **Any other channel**\
  The same playbook and **Iterate: Agent** flow apply. Review prompts for tone, length, and when to call tools so they match the channel (e.g., richer answers on chat vs. voice).

### Installation Process

The playbook comes with an **Iterate: Agent** node and a **Close** node so the conversation can end cleanly and **conversation evaluations** can run afterward. Optional steps beyond that belong under App Settings.

{% stepper %}
{% step %}

#### Configure the Iterate: Agent node

This node decides **which agent prompt** is active and drives the **LLM** on each turn of the loop. Point it at the prompt set you want for this part of the flow.
{% endstep %}

{% step %}

#### Add or rewrite your prompts

Open **AI → Agent prompts**. Describe behavior, tone, and **when to use tools** (and any channel-specific rules—e.g., shorter replies on voice, more detail on chat). Ensure the **Iterate: Agent** node uses the prompt you intend.
{% endstep %}

{% step %}

#### Plan how the conversation ends

After the agent loop, a **Close** node (or equivalent) should end the exchange so the flow advances and evaluations can run. The agent should be steered to finish via the **Complete the conversation** tool when the dialogue is done.
{% endstep %}
{% endstepper %}

### Limitations

* The default **Receptionist** and **Co-worker router** prompts are optimized for **phone**; other channels need a quick review so length and tool usage fit the medium.
* **Conversation evaluations** run only in the **post-close** phase—if the conversation never reaches your close path (e.g., in certain handoffs), those rules may not apply as you expect.

## Using the AI Agent

### App Settings

* **AI → Agent prompts** — Create and edit prompts; connect them to the **Iterate: Agent** node in the playbook.
* **AI → Conversation evaluations** — Define criteria for tagging or judging conversations **after** they close.
* **Settings → Tags** — Under the **Judged** tag group, create tags that evaluations can assign.

### App Workflow

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2F5b2amxpPgEBhQT5kKxK1%2FCleanShot%202026-04-03%20at%2014.06.34%402x.png?alt=media&#x26;token=6f78e676-0e64-4733-a3bc-61d1de442e9b" alt="" width="373"><figcaption></figcaption></figure>

1. The **Iterate: Agent** node runs the model with the selected **agent prompt** for each turn.
2. The model can call **tools** you reference in the prompt (see Tool calls).
3. When the goal is reached, the agent should use **Completed** so the playbook moves on—typically to a **Close** node.
4. After closing, **conversation evaluations** run and may apply **Judged** tags according to your rules.

#### **Tool Calls**

Embed tools in the prompt so the model knows what exists and **when** to use them:

| Tool                           | Purpose                                                      |
| ------------------------------ | ------------------------------------------------------------ |
| **Create note**                | Adds a note (e.g., for inbox or record-keeping).             |
| **Send mail**                  | Sends email when appropriate.                                |
| **Completed**                  | Ends the exchange and advances to the next node in the flow. |
| **Search contact directory**   | Searches for extensions configured in Enreach Contact        |
| **Check contact availability** | Checks if an extension is available for calls                |
| **Forward call**               | Forwards the call to another extension number                |
| **List documentation pages**   | Lists the files in the knowledge base                        |
| **Get page content**           | Retrieves the contents of a knowledge base article           |

**Inserting tools in the prompt:** In the prompt editor, type **`/`** to open the **tool picker**, then choose a tool to insert a placeholder or reference.

#### **Variables**

Insert variables in the prompt that contain information from skills or about the user.

| Variable                 | Description                                               |
| ------------------------ | --------------------------------------------------------- |
| **First name**           | The user's first name                                     |
| **Last name**            | The user's last name                                      |
| **Phone**                | The user's phone number                                   |
| **Email**                | The user's email address                                  |
| **Language**             | The user's preferred language                             |
| **Knowledge base hints** | The aggregated indexing hints for knowledge base articles |

## FAQ

<details>

<summary>Can I use the AI Agent only on chat, not on phone?</summary>

Yes. Use any channel; adjust **Agent prompts** for longer or richer messages, and for how proactively you want tools used compared to voice.

</details>

<details>

<summary>How can I tell whether a conversation went wrong?</summary>

You can write evaluations in the **AI → Conversation evaluations** section. Evaluations will tag a conversation when the defined criteria are met. Closing the conversation triggers the post-close phase, during which evaluations are run.

</details>

<details>

<summary>How do I add tools to a prompt?</summary>

In the prompt editor, type **`/`** to open the tool picker and insert the tool reference so the model is steered toward concrete actions.

</details>

#### Languages

The agent's language follows your **prompts** configuration; align prompt language with the locales you support on each channel.

#### Opening Hours

Whether **Settings → Opening hours** affects this app depends on how your **playbook** and **channels** are set up (e.g., if business hours gate the flow before the AI Agent). There is no separate “opening hours” switch inside the AI Agent itself.

## Resources

Quick reference:

| Topic                    | Where to configure                                          |
| ------------------------ | ----------------------------------------------------------- |
| Agent behavior & prompts | **AI → Agent prompts** + **Iterate: Agent** in the playbook |
| Tools in prompts         | Type **`/`** in the prompt editor (tool picker)             |
| Closing the conversation | **Close** node (or equivalent) after **Iterate: Agent**     |
| Post-close evaluation    | **AI → Conversation evaluations**                           |
| Tags from evaluations    | **Settings → Tags** → **Judged** group                      |
