> For the complete documentation index, see [llms.txt](https://learn.doubletick.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-custom-tools-for-your-ai-agent/create-a-bot-tool-for-your-ai-agent.md).

# Create a Bot tool for your AI agent

Learn how to create a Bot tool that lets your AI agent collect details from customers and start a Bot Builder journey, such as assigning a chat to your team.

Answering questions is only half the job. Sometimes your agent needs to *do* something: book a demo, take a callback request, or hand a chat to the right person on your team. A Bot tool makes this possible. The agent chats with the customer, collects the details you need, and then starts a journey you’ve built in the Bot Builder. The journey handles the rest, such as sending a message, adding a tag, saving details to Google Sheets or assigning the chat.

**What’s covered**

* [When should you use a Bot tool](#when-should-you-use-a-bot-tool)
* [How does a Bot tool work](#how-does-a-bot-tool-work)
* [How to create a Bot tool](#how-to-create-a-bot-tool)
* [How to choose the right parameter type](#how-to-choose-the-right-parameter-type)
* [How to build the journey for your Bot tool](#how-to-build-the-journey-for-your-bot-tool)
* [How to test your Bot tool](#how-to-test-your-bot-tool)

#### When should you use a Bot tool?

Use a Bot tool whenever you want your agent to take an action, not just answer a question. For example:

* **Hand over to your team:** The customer asks for a person, and the chat is assigned to your support or sales team.
* **Book a demo or appointment:** The agent collects a name, date and time, and the journey confirms the booking.
* **Take a callback request:** The agent asks when the customer is free, and the journey assigns the request to your team.
* **Capture a lead:** The agent collects details like company name and team size, and the journey saves them to Google Sheets or your CRM.
* **Tag customers by interest:** The agent learns which product the customer wants, and the journey adds a tag for follow-up.

If the agent only needs to fetch or send data, such as checking an order status, an [API tool](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-custom-tools-for-your-ai-agent/create-an-api-tool-for-your-ai-agent.md) is usually a better fit.

#### How does a Bot tool work?

1. The customer sends a message.
2. The agent checks the descriptions of your tools. If one matches what the customer wants, it picks that tool.
3. If the tool has parameters, the agent asks the customer for each detail.
4. Once the agent has everything, the journey linked to the tool starts.
5. The journey runs your actions, such as sending a message or assigning the chat.
6. The journey passes a response back to the agent, which tells the customer what happens next.

The customer just chats naturally. They never see the tool or the journey.

#### How to create a Bot tool

Step 1: Open your agent and click **Tools** in the left menu.

Step 2: Click **Add tool**. The **Create Tool** panel opens on the right.

Step 3: In **Name**, type a short name in lowercase words joined by underscores, for example talk\_to\_human or book\_demo.

Step 4: In **Description**, tell the agent when to use this tool. This is the most important field, because the agent reads it to decide whether to use the tool. For example: “Use this when the customer wants to speak to a person from our team.”

* Under **Type**, select **Bot**.
* Under **Channel**, select the channel the journey runs on: **WhatsApp** or **Instagram**.
* Under **Available for**, choose where the agent can use this tool:
  * **All:** Chats and calls.
  * **Voice only:** Calls only.
  * **Text only:** Chats only.

Step 5: Click **Add parameter** for each detail the agent should collect before the journey starts. Skip this if no details are needed, as with talk\_to\_human.

Step 6: Click **Create**.

Your new tool appears under **Your tools**. Make sure its toggle is on, because the agent won’t use a tool that’s switched off.

{% hint style="info" %}
**Note:** Leave **Pre-call tool** unticked. It’s only for tools that fetch customer details before a call starts. To learn more, see [Create an AI agent for WhatsApp and PSTN calls](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-an-ai-agent-for-whatsapp-and-pstn-calls.md).
{% endhint %}

#### How to choose the right parameter type

Each parameter has four fields:

* **Name:** A short name for the detail, for example city or quantity.
* **Type:** What kind of answer to expect. See the table below.
* **Description:** What the detail is and how it should look, for example “The city where the customer lives”. Up to 255 characters.
* **Required parameter:** Tick this if the agent must collect this detail before the journey starts.

<table><thead><tr><th width="167">Type</th><th width="292">Use it for</th><th>Example</th></tr></thead><tbody><tr><td>Text</td><td>A short written answer</td><td>Customer’s name, city</td></tr><tr><td>Number</td><td>A number</td><td>Quantity, team size</td></tr><tr><td>Options</td><td>One answer from a fixed list</td><td>Plan: Basic, Pro, Enterprise</td></tr><tr><td>Yes / No</td><td>A simple yes or no</td><td>Wants a callback?</td></tr><tr><td>List of text</td><td>Several answers to one question</td><td>Products the customer is interested in</td></tr><tr><td>JSON object</td><td>A group of related details, for advanced setups</td><td>An address with street, city and pincode</td></tr></tbody></table>

When you choose **Options**, an Options field appears. Type your choices separated by commas, for example Small, Medium, Large, XL.

> **Tip:** Ask only for what your journey really needs. Every extra detail makes the conversation longer for the customer.

#### How to build the journey for your Bot tool

<figure><img src="https://2303112206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F53n17VnOICC1LtDqlENV%2Fuploads%2FwkcBbT669aDTk6Q4X9H4%2F06%20-%20Add%20your%20own%20tool.gif?alt=media&amp;token=1643e95d-0385-4315-a8aa-445f1650a1de" alt=""><figcaption></figcaption></figure>

A Bot tool isn’t complete until it has a journey. The journey is what happens after the agent has collected the details.

Step 1: On the tool’s row under **Your tools**, click the three-dot menu.

Step 2: Click **Create customer journey**. Once a journey exists, this option changes to **Open customer journey**.

Step 3: The Bot Builder opens with a starting point called **On customer intent**. The tool’s name is already set as its keyword. This links the journey to your tool, so don’t change it.

Step 4: From the **Actions** list on the left, drag in the actions you need and connect them. For example:

* **Send Message** to acknowledge the customer.
* **Assign Agent** to pass the chat to your team.
* **Add / Remove Tags** to label the customer.
* **Google Sheets** to save the details.
* **Call Api** to send the details to another system.&#x20;

Step 5: End the journey with **Pass Tool Call Response**, and write what the agent should tell the customer. For example: “The chat has been assigned to a team member. Tell the customer someone will reply shortly.”

Step 6: Turn on the toggle at the top so it shows **Enabled**.

Step 7: Click **Save**, then click **Save** again in the confirmation box.

{% hint style="info" %}
**Note:** Always end the journey with Pass Tool Call Response. Without it, the journey runs but the customer gets no reply.
{% endhint %}

#### How to test your Bot tool

* Open the **Chat** tab in the test panel on the right.
* Send a message that should trigger the tool, for example “I want to talk to someone from your team.”
* Answer the agent’s questions, if the tool has parameters.
* Expand the details under the agent’s reply to check that it used your tool and what it sent.

If the agent doesn’t use the tool, make the **Description** more specific, or mention the tool in your prompt. For example: “If the customer asks for a person, use talk\_to\_human.”

#### Key takeaways

* A Bot tool lets your agent collect details and start a Bot Builder journey.
* The Description decides when the agent uses the tool, so write it clearly.
* Add only the parameters your journey needs, and mark the important ones as Required.
* Create the journey from the tool’s three-dot menu.
* End the journey with Pass Tool Call Response, and turn it on before you save.
* Keep the tool’s toggle on, or the agent won’t use it.

#### FAQs

<details>

<summary>What’s the difference between a Bot tool and an API tool?</summary>

A Bot tool starts a Bot Builder journey, such as assigning a chat or sending a message. An API tool connects straight to your own system to fetch or send data, such as an order status.

</details>

<details>

<summary>Why didn’t my agent reply after running a Bot tool?</summary>

The journey must end with Pass Tool Call Response. Without it, the agent has nothing to tell the customer.

</details>

<details>

<summary>Why isn’t my agent using the tool?</summary>

Check that the tool’s toggle is on and the journey shows Enabled. Then make the Description more specific, or mention the tool by name in your prompt.

</details>

<details>

<summary>Do I always need to add parameters?</summary>

No. Add them only when the journey needs details from the customer.

</details>

<details>

<summary>Can I use a Bot tool on calls?</summary>

Yes. Under Available for, choose All or Voice only.

</details>

<details>

<summary>Can I change the journey later?</summary>

Yes. Click the three-dot menu on the tool, then Open customer journey.

</details>

<details>

<summary>Can I rename the starting point’s keyword?</summary>

No. The keyword is the tool’s name and links the journey to the tool. Changing it breaks the link.

</details>

#### Related articles

{% content-ref url="/spaces/53n17VnOICC1LtDqlENV/pages/5H8A30ciGkpr8b87dBTm" %}
[Create an API tool for your AI agent](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-custom-tools-for-your-ai-agent/create-an-api-tool-for-your-ai-agent.md)
{% endcontent-ref %}

{% content-ref url="/spaces/53n17VnOICC1LtDqlENV/pages/V2sD3IwTrLcIuHfMrnL6" %}
[Create an AI agent for WhatsApp & Instagram chats](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-an-ai-agent-for-whatsapp-and-instagram-chats.md)
{% endcontent-ref %}

{% content-ref url="/spaces/53n17VnOICC1LtDqlENV/pages/h5uPh6F6mnMCELsvysQD" %}
[Create an AI agent for WhatsApp and PSTN calls](https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-an-ai-agent-for-whatsapp-and-pstn-calls.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.doubletick.io/doubletick-ai/ai-agents-and-assistance/create-custom-tools-for-your-ai-agent/create-a-bot-tool-for-your-ai-agent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
