---
title: "Dialogs"
description: "Learn how dialogs combine triggers and actions into fixed workflows, create one in the console, API, or MCP, and export or import it."
---

# Dialogs

> Learn how dialogs combine triggers and actions into fixed workflows, create one in the console, API, or MCP, and export or import it.

Dialogs are a feature of [AI agents](https://docs.moveo.ai/docs/ai-agents/overview.md). Their purpose is to define fixed
workflows that the AI agent can follow in a conversation. A dialog is composed of several different
blocks, which are connected to each other. Each of these block have different functionalities and
have different roles.

Each dialog consists of [**trigger**](#triggers) and [**action**](#actions) nodes.

## Create a dialog

The console calls this area **Workflows**. A workflow in the MCP server is an intent plus the
dialog that the intent triggers.

**Console**

1. Open the AI agent and go to **Workflows**.
2. Select **Create dialog**. If the menu opens, select **Create empty dialog**, or select
   **Generate from description** to let the [Workflow Generator](https://docs.moveo.ai/docs/ai-agents/workflow-generator.md) draft it.
3. Add a [trigger](#triggers) and the [actions](#actions).

**API**

1. If the dialog starts from an intent, create the intent first with
   `POST /v1/brains/{brain_id}/intents`.
2. Create the dialog with `POST /v1/brains/{brain_id}/dialogs`, with `name` and `nodes`. See
   [Add dialog](/api/rest/add-dialog). The node types and their fields are in
   [Get dialog node types](/api/rest/get-dialog-node-types).

Use a `manage` API key.

**MCP**

`moveo_create_agent_workflow` with `agent_id`, `name` (up to 45 characters), `nodes`, and
`intents`. The tool creates the intents and the dialog in one call. Read
`moveo://schemas/workflow-node-types` and `moveo://guides/workflow-authoring` first.

## Triggers

Every [dialog](https://docs.moveo.ai/docs/ai-agents/dialogs.md) starts with a single trigger. Moveo supports the following triggers:

| Type                              | Description                                                                           |
| :-------------------------------- | :------------------------------------------------------------------------------------ |
| [Intent](https://docs.moveo.ai/docs/ai-agents/triggers/trigger-text.md)      | Triggered on text messages, when the AI agent recognizes an intent                    |
| [Event](https://docs.moveo.ai/docs/ai-agents/triggers/event.md)      | Triggered internally from a different dialog node                                     |
| [Fallback](https://docs.moveo.ai/docs/ai-agents/triggers/unknown.md) | Triggered when Moveo cannot match any of the dialog nodes given the recognized intent |

### Add a trigger

To add a trigger to an empty dialog, follow these steps:

1. Drag **Intent** or **Event** from **Toolkit** to the empty box on the canvas.
2. In the side panel, enter the **Node name**.
3. For an intent trigger, select the intent in the side panel.

### Uses of triggers

Moveo has two different functionalities for triggers:

- They can be used as the parent trigger ($r\_0$, `nodes[0]`) in a dialog.
- They can be used as child triggers to provide a different response. See what happens for an
  [intent trigger](https://docs.moveo.ai/docs/ai-agents/triggers/trigger-text.md#how-to-use-an-intent-trigger) and a
  [fallback trigger](https://docs.moveo.ai/docs/ai-agents/triggers/unknown.md).

#### Enhance with AI

Toggle "Enhance with AI" in the trigger node’s sidebar to enrich responses with relevant contextual
information.

## Actions

Each time the user sends a message, the AI agent activates one or more [triggers](#triggers). It can
then respond in a variety of forms.

Actions include plain text, links, menus, and options. Add one or
more actions below a [trigger](#triggers) by dragging and dropping them.

### Types of actions

Moveo supports the following responses, operations, and extensions:

#### Responses

| Response                            | Description           |
| :---------------------------------- | :-------------------- |
| [Text](https://docs.moveo.ai/docs/ai-agents/responses/text.md)         | Reply with a text     |
| [Image](https://docs.moveo.ai/docs/ai-agents/responses/image.md)       | Send an image         |
| [Carousel](https://docs.moveo.ai/docs/ai-agents/responses/carousel.md) | Reply with a carousel |
| [Webview](https://docs.moveo.ai/docs/ai-agents/responses/webview.md)   | Display a webview     |
| [Video](https://docs.moveo.ai/docs/ai-agents/responses/video.md)       | Send a video          |
| [File](https://docs.moveo.ai/docs/ai-agents/responses/file.md)         | Send a file           |
| [Survey](https://docs.moveo.ai/docs/ai-agents/responses/survey.md)     | Display a survey      |
| [URL](https://docs.moveo.ai/docs/ai-agents/responses/url.md)           | Send a URL            |

#### Operations

| Operation                                        | Description                             |
| :----------------------------------------------- | :-------------------------------------- |
| [Question](https://docs.moveo.ai/docs/ai-agents/operations/questions.md)            | Ask a question to the user              |
| [Jump to](https://docs.moveo.ai/docs/ai-agents/operations/operations-event.md)                 | Trigger a specific node                 |
| [Condition](https://docs.moveo.ai/docs/ai-agents/operations/conditions.md)          | Create a logic tree                     |
| [Handover](https://docs.moveo.ai/docs/ai-agents/operations/handover.md)             | Transfer the conversation to an agent   |
| [Switch channel](https://docs.moveo.ai/docs/ai-agents/operations/switch-channel.md) | Offer to continue on another channel    |
| [Tag](https://docs.moveo.ai/docs/ai-agents/operations/tag.md)                       | Label the conversation with a tag       |
| [Pause](https://docs.moveo.ai/docs/ai-agents/operations/pause.md)                   | Pause the conversation                  |
| [Set variables](https://docs.moveo.ai/docs/ai-agents/operations/set-variables.md)   | Set a variable equal to a value         |
| [Reset variables](https://docs.moveo.ai/docs/ai-agents/operations/reset.md)         | Reset specific or all context variables |
| [Resolve](https://docs.moveo.ai/docs/ai-agents/operations/resolve.md)               | Close the conversation                  |

#### Extensions

| Extension                                  | Description                  |
| :----------------------------------------- | :--------------------------- |
| [Webhook](https://docs.moveo.ai/docs/ai-agents/responses/webhook.md)          | Call a predefined webhook    |
| [Google Sheet](https://docs.moveo.ai/docs/ai-agents/responses/googlesheet.md) | Store data in a Google Sheet |
| [Email](https://docs.moveo.ai/docs/ai-agents/responses/email.md)              | Send an email                |

### Add an action

To add an action below a [trigger](#triggers), follow these steps:

1. Drag an action, for example **Text**, from **Toolkit** to the box under the trigger.
2. In the side panel, set the action. For a text action, enter the **Reply**.

## Folders

A **folder** is a group of dialogs. Its purpose is to create a clean and organized AI agent,
so that you can coordinate better and be more efficient. It's like organizing clothes in a closet's
shelves, instead of putting them all in one cupboard. To (re)name a folder, you can double-click its
name and enter the new one.

### Moving around dialogs

Drag and drop a dialog from any folder to another. Drag a
dialog to the area at the bottom of the list to create a new folder, or select any dialog and then
select **Create dialog** to create a dialog in the same folder.

## Export and import a dialog

1. Select the dialog you want to export.
2. Select the contextual menu in the top right corner.
3. Select **Export** or **Import**.

:::note
The exported dialog is a JSON file.
:::

## Limits

Each new dialog turn in Moveo is designed to efficiently handle up to 80 trigger nodes and completes
within a maximum timeframe of 17 seconds. This setup ensures optimal performance and user experience
during interactions. In practice, these limits are rarely reached unless an unintended infinite loop
is introduced through the dialog's event structure.

### Loop detection

A loop usually comes from **Jump to** actions that create a cycle between dialogs. For example, a
dialog named "Affirmative" jumps to "Contact details", which jumps to "Goodbye", which jumps back to
"Affirmative".

Moveo stops a turn when it reaches one of the [limits](#limits). Most loops are accidental, so
test the AI agent after you add a jump. When a turn stops in a loop, the **Turns** tab of the
[test modal](https://docs.moveo.ai/docs/ai-agents/test.md) shows **Infinite loop detected** under **Errors & warnings**. The steps
show each jump, so you can find the action that closes the loop. If the loop is part of your
design, you can ignore this warning.

### Troubleshooting

When naming an intent trigger, keep in mind that you are not allowed to use more than 45 characters.

Whenever you use a condition, you must add at least one rule and attach a response (action). Otherwise, you
cannot save your changes.

The field inside an intent trigger cannot be empty. If it is empty, you cannot save the
changes. Consider converting the intent trigger to an event trigger if you encounter this issue.

To attach a new file in a dialog, ensure that the file is accessed through a URL. If you want to use
a photo or video, make sure the file is accessed through a URL. For carousels, the title's maximum
length is 32 characters and the subtitle's is 160 characters. Some channels show a shorter subtitle.
For the limit of each channel, see [Carousel response](https://docs.moveo.ai/docs/ai-agents/responses/carousel.md#subtitle-length).
Each card supports a maximum of 3 buttons, with up to 6 cards total. The Carousel's title, Button's
Label, and Postback are mandatory fields.

Always remember that when you save your changes, they are not visible to the end user. To make them
visible, you must **Publish** them.
