3CX AI Agents Agentic Tools
Introduction
Agentic tools enable agents to interact with the PBX and callers, performing functions such as call transfers and information retrieval. In this document, we list the tools available to each agent type, along with their function.
Usage and Formatting Basics
The 3CX AI Agent's prompts use the Mustache syntax. This section provides an overview of the syntax. Understanding these rules ensures the accurate integration of agentic tools into 3CX AI Agent prompts.
- Variables are invoked using the Mustache syntax by enclosing the identifier in curly braces.
- {{...}} or {{{...}}} -> (no #, ^ or /) returns (echos) the raw contents of a variable directly into that location (not HTML escaped).
- We can enclose a prompt section within a block; the content is only rendered in the final prompt text if a variable passes a test.
- We have the option to do a positive test
- {{#...}} -> block opens only if variable has content or is TRUE
- {{/…}} -> block close
- or a negative test:
- {{^...}} -> block opens only if variable is empty or FALSE
- {{/…}} -> block close
- Agentic tools can be "invoked" by name, but the AI Agent calls them when it determines that they are needed.
Below are two examples, both of which use the call-forwarding Route By Topic destinations you define in the 3CX AI Agent's Call Routing tab.
In our examples, we will use:
- variable addressbook_topics - this variable contains all the Route by Topic entries you configured; this is populated with the Topics whenever the Agent (re)starts; this functions as a system variable.
- tool get_addressbook - an Agentic tool that fetches the configured Topic entries on-demand.
- tool resolve_handoff_destination - an Agentic tool that resolves natural language requests to destinations (extensions).
Example 1
Agentic tools can be mentioned in the core prompt with guidance for the AI Agent on their use, letting it decide freely when to call them.
If the caller asks for a department or makes a question about a problem first use get_addressbook to check if there are topics related to the question, and use resolve_handoff_destination right away, do not answer informatively first.
In the example above, this addition to the prompt will let the AI model know what tools are available, and then let it decide if they should be called or not. The text above will always exist in the final, resolved prompt, regardless of whether any Topics were set.
Example 2
You can also use the Mustache syntax to add some basic logic to the prompt construction, skipping elements when they are not needed; this can result in a more compact or cleaner final prompt.
{{#addressbook_topics}}
If the caller asks for a department or makes a question about a problem check if there are topics related to the question in the following list:
{{addressbook_topics}}
and use resolve_handoff_destination right away, do not answer informatively first.
{{/addressbook_topics}}
{{^addressbook_topics}}
Use resolve_handoff_destination right away, do not answer informatively first.
{{/addressbook_topics}}
In this example:
- First we check if addressbook_topics are set/exist, and if they are,
- we echo a list of those Topics into the prompt for the AI Agent to
- use the resolve_handoff_destination tool to find the best destination for the call, given the list of Topics (and its knowledge of our Departments and user/system extensions).
- Then if addressbook_topics are not set,
- we do not "pollute" the prompt with extra text and an empty list, instead we ask it to
- use the resolve_handoff_destination tool to find the best destination for the call, given its knowledge of our Departments and user/system extensions.
In a PBX where a single topic was configured: "For any electrical issues: 106" the prompt definition above would render the below final prompt text, for the AI Agent to follow:
If the caller asks for a department or makes a question about a problem check if there are topics related to the question in the following list:
- For any elecrical issues
and use resolve_handoff_destination right away, do not answer informatively first.
It should be noted that AI agents already have knowledge of these tools and their capabilities. In a standard call using default prompts, the agent can utilize them without explicit instructions. However, if you want to affect the agent's behavior or lock in a strict execution sequence, you can instruct it to call the tools directly within the prompt as shown above.
Agentic Tools in Chat
The AI Agent prompt is common in each agent regardless of the communication channel, voice or text/chat. The tool descriptions below are focused on the voice channel, and in most cases will work identically in chat as well.
Certain tools that do voice call routing, such as diverting to voicemail, will of course not function in a text based communication, and others will perform their actions slightly differently, but within the specification given below.
Agentic Tools by Agent Type
Tool Name | Function | Tool availability by Role | ||
Receptionist | Personal Assistant | Customer Service (U10) | ||
classify_request_before_handoff | Allows Personal Assistant workflows to distinguish between interrupt, notify, and block scenarios. When the caller is not the PA's boss stores the call classification so the Agent can decide how to proceed. | No | Yes | No |
drop_call | Allows the assistant to end the conversation | Yes | Yes | Yes |
find_contact_by_extension | Retrieves information about a specific extension. | Yes | Yes | Yes |
get_addressbook | Loads the Route by Topic list, allowing the AI agent to use its elements in conversation as well as choosing destinations. | Yes | Yes | Yes |
get_current_datetime | Returns the current date and time in both UTC and local system time. | Yes | Yes | Yes |
perform_chat | Begins the process of ending the call by notifying the appropriate destination via a chat message. | Yes | Yes | Yes |
perform_email | Begins the process of ending the call by notifying the appropriate destination via an email. | Yes | Yes | Yes |
perform_transfer | Begins the process of ending the call by transferring the call to the appropriate destination. | Yes | Yes | Yes |
perform_voicemail | Begins the process of ending the call by transferring the call to the appropriate destination's voicemail. | Yes | Yes | Yes |
resolve_handoff_destination | Resolve the caller's transfer request using a free-text destination search of all allowed transfer endpoints. | Yes | No | Yes |
set_detected_language | Allows the assistant to remember the detected caller language and use it in subsequent interactions. | Yes | Yes | Yes |
spam_detected | Records that the current call has been identified as spam. | Yes | Yes | Yes |
take_handoff_decision | Records the intended handoff type and extension number. | Yes | Yes | Yes |
take_hostility_action | Records that the caller is behaving in a hostile or abusive manner. | Yes | Yes | Yes |
take_not_collaborative_action | Records that the caller is unwilling to cooperate with the assistant. | Yes | Yes | Yes |
vector_store_search | Allows the assistant to retrieve information from configured knowledge bases and indexed documents. | Yes | Yes | Yes |
Agentic Tools, Inputs and Outputs
Tool Name | Input | Output | Requirements |
classify_request_before_handoff | Available classifications:
| Confirmation that the classification has been saved. | |
drop_call | None | Result returned by the call termination subsystem. | |
find_contact_by_extension | Extension number, e.g. 100. | A directory table preceded by a resolution status. | |
Resolution: exact_contact ext|name|department|available|can_receive_email 100|John Smith|Sales|true|true | |||
get_addressbook | None | A list containing all configured Topics. | |
| |||
get_current_datetime | None | A string containing:
| |
perform_chat | None (Uses existing call context information via secondary, not exposed tools). | Confirmation that the chat decision has been recorded. | PA follows notify rules, others default to available. |
perform_email | None (Uses existing call context information via secondary, not exposed tools). | Confirmation that the chat decision has been recorded. | Destination must be eligible to receive email. |
perform_transfer | None (Uses existing call context information via secondary, not exposed tools). | Confirmation that the transfer decision has been recorded. | PA follows notify rules, others default to available. |
perform_voicemail | None (Uses existing call context information via secondary, not exposed tools). | Confirmation that the voicemail decision has been recorded. | PA follows notify rules, others default to available. |
resolve_handoff_destination | destination – free-text destination provided by the caller. | May return: exact_contact, multiple_contacts, no_contact. | Requires: allowed_search=True |
Resolution: exact_contact ext|name|department|available|can_receive_email 801|Sales Team|Sales|true|false | |||
set_detected_language | language – detected language name. | Confirmation that the language has been stored. | Requires: switch_language=True |
spam_detected | reason – explanation of why the call was classified as spam. | Confirmation that the spam signal has been recorded. | |
take_handoff_decision | kind – transfer, voicemail, chat, email. destination – extension number. | Confirmation that the handoff decision has been recorded. | |
take_hostility_action | reason – explanation of the detected hostile behavior. | Confirmation that the hostility signal has been recorded. | |
take_not_collaborative_action | reason – explanation of the detected behavior. | Confirmation that the collaboration signal has been recorded. | |
vector_store_search | vs_id – vector store identifier. query – search query. top_k – maximum number of results to return. | Relevant results retrieved from the specified vector store. | Requires one or more configured vector stores. |
See also
Last Updated
This document was last updated on 05 August 2026
https://www.3cx.com/docs/agentic-ai-tools/