Skip to content

Functions

What functions are

Functions (tools) are actions the agent can take on its own during a conversation: call an operator, send the customer a product photo, close a ticket, find a product in a catalog. The agent decides when to call a function based on its description and the context of the conversation.

Cavuer has three kinds of functions:

Kind Who creates it Description
Built-in functions Ready in the service, you only need to connect them Covered in this article
Custom functions You, to call your own services (CRM, inventory, booking) Available in the dashboard under Automations
Scenario tools You, as a chain of steps made of several functions Available in the dashboard under Automations

All three kinds are connected to an agent in the same window.


How to Connect a Function to an Agent

  1. Open the agent page (the icon next to the agent on the home page).
  2. In the "Tools" card, click "Manage Functions".
  3. Find the function using search, the "Connected" toggle, or the group buttons: "All", "Your functions", "Conversation", "Agent", "Operators", "Integrations", "Files", "Scenarios".
  4. Click "Connect". The function is marked "Active".
  5. If the function is marked "Configurable", open the channel page and fill in its settings (see below).

Each function card shows:

  • the name, the technical name used by the system (for example, SendOperatorNotification);
  • a short description;
  • the messengers the function works in, or "All messengers". A messenger is highlighted in green if the agent has a channel of that type;
  • the warning "No compatible channels connected to your agent" if none of the agent's channels support the function.

To remove a function from the agent, click "Disconnect". Settings saved on channels are not deleted.

No more than 25 tools

You can connect up to 25 tools to one agent; functions and scenarios count together. Connect only what you need: the fewer the options, the more accurately the agent chooses.

Usage Hint for the Agent

A connected function has an "Edit hint" button. In the "Hint for the agent" field, describe in which situations your agent should use the function, up to 512 characters. The text is added to the function's standard description, so you don't need to repeat it in the agent's instructions.

Example hint for the operator notification function

"Call it if the customer asks for a live person twice, complains about quality, or asks about a refund. Don't call it for questions about prices and delivery."


Settings on the Channel Page

Some functions need data that differs from channel to channel: a chat ID for notifications, an integration key, a field ID in the helpdesk. You enter it on the channel page in the "Channel functions" section.

This section lists all of the agent's functions that work in this channel's messenger:

  • the toggle turns the function on or off for this channel only, which is handy when the agent has several channels and the function isn't needed everywhere;
  • the "Configure" button opens the settings form. Required fields are marked with *, secret fields (keys) are entered like passwords;
  • the "Setup required" label means there are no settings yet; "Configured" means everything is ready.

A function doesn't work until it's configured

While a function is marked "Setup required", the agent doesn't see it in this channel and can't call it. The customer won't see an error; the agent simply replies without the function.

Functions that the channel's messenger doesn't support are not shown in this section. Instead, you'll see a line such as "1 agent function is incompatible with Telegram".


Cost

Built-in functions have no price of their own. However, after calling a function, the agent calls the language model a second time to compose a reply based on the result, and that extra call is charged at the agent's base language model price. In the message cost breakdown (the "Statistics" section), it appears as a separate line.

The exception is sending files: it is itself the response, so there is no extra language model call.

Learn more in Credits and Billing.


All Built-in Functions

Function What it does Channels Channel setup
SendOperatorNotification Sends an operator a short summary of the conversation Telegram, WhatsApp Yes
ChangeTicketOwner Hands the ticket over to an operator HelpDeskEddy, Usedesk Yes
CloseTicket Closes the ticket HelpDeskEddy, Usedesk No
SendFiles Sends the customer photos and documents from the Knowledge Base WhatsApp, Telegram, Widget, Custom, Bitrix24, HelpDeskEddy, Instagram No
DisableThread Stops the agent in the current conversation All No
EnableThread Resumes the agent in a conversation All No
ClearThreadContext "Forgets" the conversation history All No
TagThread Adds a tag to the conversation All No
SetThreadMetadata / GetThreadMetadata Writes and reads notes for the conversation All No
RespondAsAgent Sends the customer a message on behalf of the agent All No
SearchBillzProducts Searches products, stock, and prices in Billz All Yes
SetAgentInstructions Replaces the agent's instructions Scenarios and triggers only No
SetAgentModel Changes the agent's language model Scenarios and triggers only No
SwitchAgent Hands the channel over to another agent Scenarios and triggers only No

Operators

SendOperatorNotification: Notify an Operator

What it does: sends an operator a message with the customer's name and a short summary of the conversation so a person can join the conversation.

Channels: Telegram, WhatsApp. The notification is sent through the same channel: in Telegram from your bot, in WhatsApp from your connected number.

What the agent fills in itself: the customer's first and last name and a short summary of the conversation (up to 2,000 characters).

Setup on the channel page (required):

Field What to enter
Chat Id The ID of the chat or group to send notifications to, for example -1001234567890. The channel's bot must be added to this group

How to find a group ID: add the bot to the group, send a message there, and open https://api.telegram.org/bot<BOT_TOKEN>/getUpdates in your browser. Look for "chat":{"id":…}.

Field What to enter
Phone Number The operator's number (digits with country code) or a group ID
Chat Type user for a private chat with the operator, group for a group

What the notification looks like:

Name: John Smith
Summary: The customer is asking about returning order #5521 and wants a manager to contact them.

When the agent sends a notification

Describe when to call an operator in the usage hint or in the agent's instructions: "if the customer asks for a live person", "if the question is about a refund", and so on.

ChangeTicketOwner: Hand a Ticket to an Operator

What it does: hands the current ticket over to a live operator in the helpdesk system and turns the agent off in this conversation.

Channels: HelpDeskEddy, Usedesk.

Setup on the channel page (required):

Field What to enter
Button The ID of the custom ticket field that the function sets to 1. A HelpDeskEddy automation rule uses this field to reassign the ticket to an operator. See HelpDeskEddy for details
Field What to enter
Tag The tag added to the ticket (optional; operator by default). A Usedesk rule uses the tag to hand the ticket to an operator. Even if you leave the field empty, click "Save settings". See Usedesk for details

CloseTicket: Close a Ticket

What it does: closes the current ticket once the customer's question is resolved. The ticket is closed after about 20 seconds so the agent's last reply has time to reach the customer.

Channels: HelpDeskEddy, Usedesk.

Setup: not needed; the channel's connection data is used.


Files

SendFiles: Send Files from the Knowledge Base

What it does: sends the customer images and documents (product photos, price lists, directions) together with the reply.

Channels: WhatsApp, Telegram, Widget, Custom (API), Bitrix24, HelpDeskEddy, Instagram. Doesn't work in Usedesk or the phone line.

How to connect: this function is connected automatically when you attach at least one file from Knowledge Base → "Files" to the agent. Learn more in Knowledge Base.

How it works:

  • the agent sees only the files attached to it and picks them by name and description, so describe what's in each file and when to send it;
  • up to 5 files per reply;
  • if the reply text is no longer than 1,000 characters, it is sent as the caption of the last file;
  • in Telegram, JPG/PNG images up to 5 MB arrive as photos and everything else as documents; in Instagram, only JPG/PNG images up to 8 MB and PDFs can be sent.

Conversation

DisableThread: Stop the Agent in a Conversation

What it does: the agent stops replying in the current conversation, for example when it's time to hand the customer over to a person. The customer's messages are still saved, and an operator can reply in "Inbox". You can turn the agent back on with the "Enable" button in the conversation or with the EnableThread function.

Channels: all.

Setup: not needed.

EnableThread: Resume the Agent in a Conversation

What it does: turns the agent back on in a stopped conversation. While a conversation is stopped, the agent doesn't reply on its own, so this function is mainly useful in workflows, for example to bring the agent back after some time.

Channels: all.

Setup: not needed.

ClearThreadContext: Clear the Context

What it does: the agent "forgets" the previous messages in the conversation, and the next reply starts from scratch. The messages themselves aren't deleted: in "Inbox" they stay visible but dimmed. Useful when the customer starts a completely new topic or the agent has "got confused".

Channels: all.

Setup: not needed.

TagThread: Tag a Conversation

What it does: adds a tag (up to 100 characters) to the conversation, for example refund or hot-lead. A conversation can have several tags, and the same tag isn't added twice.

Channels: all.

Setup: not needed; the function has no channel settings.

Who chooses the tag text:

  • If the agent calls the function, it comes up with a tag based on the conversation. To keep tags consistent, list them in the function hint or in the agent's instructions, for example: "Use the tag refund if the customer wants to return a product, and hot-lead if the customer is ready to buy. Don't make up other tags."
  • In a scenario or workflow, you set the tag in the "Call function" step, either as exact text or from scenario data.

Where tags are shown

Tags are currently saved in the conversation data but aren't shown in the dashboard interface.

SetThreadMetadata / GetThreadMetadata: Conversation Notes

What they do: work as the agent's "notepad" for a specific conversation. SetThreadMetadata saves a value under a key (for example, city = Almaty), and GetThreadMetadata reads it later, even after the context has been cleared. Up to 50 keys per conversation, up to 2,000 characters per value.

Channels: all.

Setup: not needed.

When it's useful

The agent learned the customer's delivery city and saved it. A week later the customer comes back, and the agent reads the saved city instead of asking again.

RespondAsAgent: Message on Behalf of the Agent

What it does: sends the customer a message (up to 8,000 characters) in the current conversation on behalf of the agent; the message is saved in the history as an agent reply.

Channels: all. For Custom and Widget channels, the message is saved in the conversation, and the client side receives it the same way as regular agent replies.

Main use: workflows. A workflow doesn't write to the customer by itself, and this function is how you send a reminder or reply from a workflow. You don't need to connect it to the agent for regular conversations, since the agent replies anyway.


Integrations

SearchBillzProducts: Search Products in Billz

What it does: searches the Billz catalog by name, SKU, or brand and returns current stock and prices in each store, including sale prices. The agent can answer "is it in stock", "how much does it cost", "which store has it".

Channels: all (except the "Test agent" window, where functions with settings aren't available).

Setup on the channel page (required):

Field What to enter
Integration Key The Billz integration key: Settings → Company settings → Integration keys. This is a secret field

If the key is wrong or Billz is unavailable, the agent tells the customer it can't check products right now.


Functions for Scenarios and Triggers

These functions can't be connected to an agent; they don't appear in "Manage Functions". You can only select them in the "Call" step of a scenario or as the target of a trigger. In those lists, the functions are shown under their technical names.

Function Technical name What it does Arguments
SetAgentInstructions setAgentInstructions Replaces the agent's instructions. Takes effect from the next reply instructions: the new instructions text (up to 20,000 characters)
SetAgentModel setAgentModel Switches the agent to another language model (it must be available on your plan) modelName: for example gpt-6.1-terra
SwitchAgent switchAgent Hands the channel over to another of your agents agentPublicId: the agent's ID (shown on the agent page under "Basic information"); freshStart: true to clear the channel's conversation history

They change settings for all conversations

These functions change the agent or the channel itself, so the changes apply to all customers, not just the current conversation.


Phone Line Functions

In the voice channel, the agent has its own built-in actions: searching the Knowledge Base during a call, transferring the call to an employee (if transfer destinations are set up), and ending the call. You don't need to connect them; they are enabled automatically by the "Phone line" channel settings.


FAQ

I connected a function, but the agent doesn't use it. Check in order: the function supports the channel's messenger; it's turned on on the channel page and isn't marked "Setup required"; the agent's instructions or the usage hint clearly say when to call it.

The function isn't available in the "Test agent" window. Functions with channel settings (operator notification, Billz, tickets) and agent switching aren't available in the test window because they need a real channel. Test them in a connected messenger.

Why do function names look like code? These are the functions' technical names. Each function also has a plain-language description.

The function I need isn't in the list. You can build it yourself as a custom function, or combine several functions into a scenario, in the Automations section of the dashboard.


Next Steps