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

# Functions Overview

Functions are what let a chat agent do things rather than only say things — look up an order, send a brochure, book a callback. The model decides when to call one, based on its description, and you decide what it does.

## Available function types

| Function                                                             | WhatsApp | Instagram | What it does                                                          |
| -------------------------------------------------------------------- | :------: | :-------: | --------------------------------------------------------------------- |
| [Custom Function](/chat-agents/functions/custom-functions)           |    Yes   |    Yes    | Runs your own Python — call an API, query a system, compute something |
| [Send Template](/chat-agents/functions/send-template)                |    Yes   |     —     | Sends an approved WhatsApp template mid-conversation                  |
| [Send / Schedule Call](/chat-agents/functions/send-or-schedule-call) |    Yes   |     —     | Hands the conversation to a voice agent, now or later                 |
| [Send Image](/chat-agents/functions/send-media)                      |    Yes   |     —     | Sends an image                                                        |
| [Send Document](/chat-agents/functions/send-media)                   |    Yes   |     —     | Sends a PDF or other file                                             |
| [Send Video](/chat-agents/functions/send-media)                      |    Yes   |     —     | Sends a video                                                         |
| [Send Audio](/chat-agents/functions/send-media)                      |    Yes   |     —     | Sends an audio message                                                |

<Note>
  **Instagram agents support custom functions only.** The template, call and media types are WhatsApp-specific.
</Note>

## How the agent chooses

The model reads each function's **description** — for custom functions, the docstring — and matches it against the conversation. Nothing else selects a function for it.

That makes the description the most important field on the form. Two rules:

<Tip>
  **Describe the trigger, not the mechanism.** "Send when the customer asks how much the service costs" works. "Sends the pricing template" does not tell the model when.
</Tip>

<Tip>
  **Reinforce it in the system prompt.** The description tells the model what the function is for; the prompt tells it that using functions is expected. Agents that never call their functions almost always have both written vaguely.
</Tip>

## Rounds

The agent may call functions across several rounds before replying, capped by **Max Function Rounds** ([LLM Model](/chat-agents/configuration/llm-model), default 3). One round can chain into the next — look up the order, then look up the courier, then reply.

The final reply is always one additional round on top.

## Two function lists

| List                    | When it applies                                                                  |
| ----------------------- | -------------------------------------------------------------------------------- |
| **Functions**           | Normal conversation, when the customer is present                                |
| **Follow-Up Functions** | Only during an unattended [follow-up](/chat-agents/configuration/follow-ups) run |

They are configured identically, and deliberately separate: a follow-up should usually be able to do far less than a live conversation.

## Testing before going live

Every function type has a test path in its own form:

* **Custom functions** — a **Test Run** tab that builds input fields from your function signature and executes it
* **Send Template** and the media types — a **Test Send** section that sends the real thing to a phone number you enter

<Warning>
  Use them. A broken media URL or a template with a variable mismatch fails silently in front of a customer, and the first you hear about it is the conversation going wrong.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="Custom functions" icon="code" href="/chat-agents/functions/custom-functions">
    Python, secrets, contact context, Direct Send
  </Card>

  <Card title="System prompt" icon="brain" href="/chat-agents/system-prompt">
    Where you tell the agent to use them
  </Card>
</CardGroup>
