> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dmly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AI agent tools

> Switch on the CRM, booking, document search and web tools an AI Reply node can use to act, not just answer.

An **AI Reply** node can do more than write a sentence back. Give it tools and it can look the contact up, tag them, move them along your pipeline, search your own documents, hand the chat to a person, or book an appointment — all inside the same conversation. Tools are switched on per node, in the node's **Built-in Tools** tab.

This page covers the tool surface. For the node itself — the prompt, the model, the fallback message — see [AI replies](/automation/ai-replies).

## Before the tools do anything

<Note>
  Tools only run if an AI provider is connected. The **Provider** list on the node shows connected providers only, and with none connected the node says: *No AI provider is connected. Connect OpenAI, Claude, Gemini or DeepSeek under Integrations to configure this node.* Exactly four providers are selectable — OpenAI, Claude (Anthropic), Google Gemini and DeepSeek. See [OpenAI](/integrations/openai).
</Note>

Two things work differently from where you'd expect:

* **Document search isn't available on every provider.** Claude and DeepSeek have no document search, and the tab says so: *Document search is not available for this provider.* Use OpenAI or Gemini if the agent needs to read your files.
* **Document search is on by default and does nothing.** A new AI Reply node ships with **Document search (File Search)** switched on but no store selected, and the AI simply never searches. It starts working only once you tick at least one vector store.

The AI Agent is also plan-gated. On a plan without it, the node stays in the palette but can't be added, publishing a flow that contains one is blocked, and an already-published node writes a note into the [Inbox](/inbox/overview) — *AI step skipped — your plan does not include the AI Agent.* — and the flow carries on. See [Plans](/billing/plans).

## CRM contact tools

Under **CRM contact tools** — *Abilities the AI can act on for the current contact.* Everything here acts on the contact in the conversation, so it needs no ids and can't touch anyone else.

| Tool                         | What it does                                            | Turn it on when                                                                                                                                                                           |
| ---------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Get contact info**         | Reads the contact's name, stage, tags and custom fields | Almost always. Without it the agent greets a returning client like a stranger and re-asks what you already know.                                                                          |
| **Update phone number**      | Saves a number onto the contact                         | A WhatsApp contact reached you by username with no number on file, and you want the agent to save it when they type it out. See [Request phone number](/automation/request-phone).        |
| **Move CRM stage**           | Moves the contact along your pipeline                   | The agent finishes qualifying and should move a warm enquiry from *New* to *Qualified* without anyone re-typing it. See [Pipeline stages](/contacts/pipeline-stages).                     |
| **Add tags**                 | Tags the contact                                        | You want `pricing-enquiry` on everyone who asks what a treatment costs, so you can [broadcast](/broadcasts/overview) to them later. See [Tags and segments](/contacts/tags-and-segments). |
| **Remove tags**              | Removes a tag                                           | A contact tagged `no-show` books again and the tag should come off, so your next campaign doesn't exclude them.                                                                           |
| **Add a note**               | Writes a note on the contact                            | The agent should leave *"Asked about weekend availability, wants a Saturday"* so whoever picks the chat up reads it in two seconds.                                                       |
| **Set custom fields**        | Writes to your [custom fields](/contacts/custom-fields) | You capture budget and timeline in conversation and want them in the fields your reports use, not buried in the transcript.                                                               |
| **Move to unassigned queue** | Puts the chat in the unassigned queue                   | Small team, no routing rules — you want anyone free to grab it.                                                                                                                           |
| **Auto-assign to an agent**  | Assigns the chat round-robin                            | You have several people on the Inbox and want the next one in rotation to own it.                                                                                                         |
| **Hand over to a human**     | Pauses the bot and passes the chat on                   | Always, on any customer-facing agent. It's the escape hatch for anything the AI shouldn't be answering.                                                                                   |

<Tip>
  Handover is the one tool worth switching on even if you switch on nothing else. When it fires, the bot pauses and the AI stops the turn there rather than waiting for the next message — so the assistant can't keep talking over the person who just took the chat.
</Tip>

### Worked example

A clinic's AI Customer Service agent answers a question about laser pricing. With **Get contact info** it opens by name and knows this contact is already a client. With **Add tags** it drops `pricing-enquiry` on them. With **Add a note** it records what they asked. When they ask something clinical, **Hand over to a human** pauses the bot and **Auto-assign to an agent** puts it in front of the next practitioner. Nobody re-reads the thread; the tags and the note are already there.

## Booking tools

Under **Booking tools** — *Let the assistant check availability and book, reschedule or cancel appointments and classes.* These act on your real [Appointments](/appointments/overview) data, so your Services, staff and classes have to exist first.

| Tool                           | What it does                 | Turn it on when                                                                               |
| ------------------------------ | ---------------------------- | --------------------------------------------------------------------------------------------- |
| **List bookable services**     | Reads your Services          | The agent should answer "what do you offer?" from your actual catalogue, not from the prompt. |
| **List staff for a service**   | Reads who performs a Service | Contacts ask for a specific person and you want the agent to say who's available.             |
| **Check available times**      | Reads real open slots        | Always, on any booking agent — otherwise it offers times you can't honour.                    |
| **Book an appointment**        | Creates the booking          | You want the conversation to end in a booking instead of "someone will call you back".        |
| **View upcoming appointments** | Reads the contact's bookings | Contacts message asking "when am I in again?"                                                 |
| **Reschedule an appointment**  | Moves a booking              | Move-my-appointment messages are eating your team's day.                                      |
| **Cancel an appointment**      | Cancels a booking            | You'd rather a clean cancellation at 9pm than a no-show at 9am.                               |
| **List upcoming classes**      | Reads your class schedule    | You run classes and get asked the timetable constantly.                                       |
| **Book a class**               | Books a place                | Same reason as appointments — finish the job in the chat.                                     |
| **View booked classes**        | Reads the contact's classes  | Members ask what they're signed up for.                                                       |
| **Cancel a class booking**     | Frees the place              | A place cancelled in chat can be resold; a silent no-show can't.                              |

<Note>
  CRM and booking tools share one checkbox list, so a booking agent can tag and note as it goes.
</Note>

### Worked example

A salon's booking agent has **List bookable services**, **Check available times**, **Book an appointment** and **Hand over to a human** switched on. A contact asks for a cut and colour on Saturday. The agent reads the Services, reads the genuinely open Saturday slots, offers two, books the one they pick, and hands over when they ask about a refund. Without **Check available times** the same agent invents plausible times and you get a double booking.

## Document search

**Document search (File Search)** lets the agent answer from your own material — a price list, a policy, a treatment FAQ — instead of guessing.

It reads **vector stores**, which you create on the AI provider's Integration page under the **Vector stores** tab: *Group documents the AI can search at reply time. Add a store, then upload PDFs / text files or ingest a web URL.* That tab only appears for providers with native file search. Then tick the stores you want on the node and set **Max results**.

* Uploads are **PDF, TXT and MD only**, up to 20 MB. There's no CSV, DOCX or XLSX.
* You can ingest a web page by URL instead of uploading.
* There's no training step. Files go straight to the provider and are searchable on the next reply.
* If the provider has no stores yet, the node says *No vector stores yet — create one on the provider’s Integration page (Vector stores tab).* If stores exist but you tick none, there's no warning at all — the agent just silently never searches.

Turn it on when your answers live in a document and change often — upload the price list once, and every AI node pointed at that store quotes the current prices. See [Knowledge base](/integrations/knowledge-base).

## Web search

**Web search** — *Let the model search the web to ground its answer.* Available on OpenAI, Claude and Gemini; not on DeepSeek. It's off by default, and for most SMB agents it should stay off: your prices, hours and policies are not on the open web, and a searching agent is slower. Switch it on for a genuinely outward-facing question — a travel agent checking a destination's public entry rules, say.

## Custom functions

The **Functions** tab is for when a tool you need doesn't exist. You define an HTTP call the AI can make — a name, a description (*What does this function do? (helps the AI decide when to call it)*), a method, a URL, headers and a **Parameters (JSON Schema)** body. The AI sends JSON arguments to your URL and uses the response in its reply.

This is the one developer-shaped part of the AI node. A worked case: your stock lives in a warehouse system DMLY doesn't know about, so you expose a `check_stock` endpoint and the agent can tell a contact whether the item is in.

<Warning>
  Functions call your systems for real, driven by what a contact types. Only point one at an endpoint you're happy for an AI to call, and never at one that charges money or deletes data. Calls to localhost and private network addresses are blocked.
</Warning>

## Test before you publish

The **Playground** tab runs your configuration against a test message — *Test this configuration without sending a real message. Tool calls run against demo data on localhost.* You get the **Reply** plus a **Tool calls** trace showing which tools the agent reached for. Nothing is sent to a contact and nothing is written to a contact record.

Use it to check the agent picks the right tool. If you ask *Can you check what's on my file?* and the trace shows no `getContactInfo` call, your prompt isn't telling it to look anything up.

The trace only ever lists CRM tools, booking tools and custom functions. Document search and web search run inside the provider, so they never appear in it — an agent answering correctly from a vector store still shows an empty **Tool calls** trace.

## What's switched on by default

A new AI Reply node arrives with five tools already ticked: **Get contact info**, **Add a note**, **Add tags**, **Hand over to a human** and **Move to unassigned queue** — a sensible support agent. It also arrives with a full Customer Service prompt written for you, addressed from `{{business_name}}` (your workspace name) to `{{first_name}}`.

The four AI templates in the [template library](/automation/templates) each preload a different set:

<Columns cols={2}>
  <Card title="AI Customer Service bot" icon="headset">
    Get contact info, Add a note, Add tags, Hand over to a human, Move to unassigned queue — plus Document search on.
  </Card>

  <Card title="AI Lead Qualification bot" icon="filter">
    Adds Update phone number, Set custom fields, Remove tags and Move CRM stage; drops Move to unassigned queue, and Document search is off. See [Lead qualification](/automation/lead-qualification).
  </Card>

  <Card title="AI Appointment Booking bot" icon="calendar-check">
    Get contact info plus the full appointment set: list, staff, availability, book, view, reschedule, cancel — and Hand over to a human.
  </Card>

  <Card title="AI Class Booking bot" icon="users">
    Get contact info plus list, book, view and cancel for classes, and Hand over to a human.
  </Card>
</Columns>

A template card can show **Setup required** — it's still installable, you just haven't connected what it needs yet — or **Unavailable**, which means the channel can't support it. Chips like **Requires AI** and **Requires calendar** tell you which.

## Limits worth knowing

<Accordion title="The agent stops using tools part-way through a reply">
  Each AI reply makes at most three tool-calling rounds — past that the model is asked once more with no tools attached, so it always produces a reply. Separately, a mid-flow AI step (one whose exit leads to a real downstream node) that is reached more than three times in one run is skipped with a note in the Inbox: *AI step skipped — per-conversation AI limit reached.* A conversational AI stops replying after 40 turns and the flow moves on.
</Accordion>

<Accordion title="The AI isn't using a tool you switched on">
  Tell it to, in the prompt. Ticking a box makes a tool available; the prompt is what makes the agent reach for it. Check the **Tool calls** trace in the **Playground** to see what it actually did.
</Accordion>

<Accordion title="Nothing happens and the flow just continues">
  The AI node never stalls a flow. If no provider is connected, if the plan doesn't include the AI Agent, or if the model errors, the node either sends your **Fallback message (on error / empty reply)** or leaves a note in the Inbox and continues out its one exit. Check the Inbox conversation for a note starting with a sparkle, and see [Logs](/troubleshooting/logs).
</Accordion>

<Columns cols={2}>
  <Card title="AI replies" icon="sparkles" href="/automation/ai-replies">
    Set up the AI Reply node itself — prompt, provider and model.
  </Card>

  <Card title="Knowledge base" icon="book" href="/integrations/knowledge-base">
    Build the vector stores document search reads.
  </Card>

  <Card title="Flow builder" icon="diagram-project" href="/automation/flow-builder">
    Where the AI Reply node lives.
  </Card>

  <Card title="Common mistakes" icon="triangle-exclamation" href="/automation/common-mistakes">
    The traps that stop an automation publishing.
  </Card>
</Columns>
