# Replace AI Agent action

Tiledesk Design Studio offers a unique feature known as the “Replace AI Agent” action.&#x20;

This action allows you to recall different AI agents as needed, significantly enhancing your conversation flow design.&#x20;

Imagine having an AI agent specialized for sales and another for support. This approach allows you to deal with smaller, more understandable, customizable and maintainable agents instead of a single large and complicated agent. Enhancing them is easier, and their behavior is more predictable.

#### Implementing the Replace AI Agent action <a href="#implementing-the-replace-bot-feature" id="implementing-the-replace-bot-feature"></a>

To implement this feature, you first need to create different agents for different purposes. When you want to call another agent, you need to drag the “Replace AI Agent” action, which is located under Flow features on the left side.

<figure><img src="/files/h6sbsd2qBLQklOgC8SU0" alt=""><figcaption></figcaption></figure>

By clicking on the “Replace AI Agent” action, a menu will appear on the right side, allowing you to choose the correct AI agent to take over the conversation in the same chat widget.

<figure><img src="/files/jNHDW7WnY93QouiNnzRQ" alt=""><figcaption></figcaption></figure>

For this example, I chose the Sales AI agent. We can also define which block should be triggered when the new AI agent is recalled — in this case, I selected the Start block.

<figure><img src="/files/DjhZ9fS2BzuoStHebVU4" alt=""><figcaption></figcaption></figure>

Then you can use an [AI Condition](/ai-chatbots-and-automation/actions-explained/ai-condition.md) to check whether the customer’s inquiry is sales‑oriented or support‑oriented, and trigger the appropriate AI agent.&#x20;

Alternatively, you can simply use buttons, as shown in the image below:

<figure><img src="/files/N2Wl84WLRGmj1pqP6rNT" alt=""><figcaption></figcaption></figure>

That’s all. You’ve created an AI agent that can recall the appropriate agent when needed, whether the inquiry is support‑ or sales‑oriented, based on our example. You can create as many agents as you need for different purposes — there’s no limit.

#### Replace the AI Agent using the bot slug <a href="#replace-bot-using-the-chatbot-slug" id="replace-bot-using-the-chatbot-slug"></a>

Using the slug ensures that an AI agent refers to another agent in a project‑invariant way. This allows you to export the same group of agents from one project to another while keeping their orchestration working without issues. If you don’t use the slug, the chatbot ID is used to reference another chatbot — but remember that a chatbot ID is globally unique in Tiledesk. The slug, instead, is only required to be unique within a single project. So, if you carefully choose your AI agent slugs, you can coordinate your agents to work correctly in any project where you import them.

Set the slug in the Settings section:

<figure><img src="/files/A52DZqH4llfeA1XfmGIE" alt=""><figcaption></figcaption></figure>

Then mark the “Use slug” property from the action when you decide to refer to that agent for the replacement:

<figure><img src="/files/Q86BdJR6FSJEpCNCv3u6" alt=""><figcaption></figcaption></figure>

In our Community, you can find [an AI agent template using the slug feature](https://tiledesk.com/community/search/getchatbotinfo/chatbotId/6797c042eafa7e0013d42997-Chatbot-using-slug-property)

We hope you find this tutorial helpful.&#x20;

If you need to know more about chatbot design, please visit our website at [**www.tiledesk.com.** ](https://www.tiledesk.com/)

If you require further assistance, do not hesitate to contact us at <support@tiledesk.com>&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.tiledesk.com/ai-chatbots-and-automation/actions-explained/replace-ai-agent-action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
