Skip to main content

What are tools?

Tools allow your agent to perform actions during a conversation - like ending a call, transferring to a human, or calling an external API. When the agent determines it needs to take an action, it invokes the appropriate tool.

Built-in tools

Sonara provides several built-in tools that you can enable with one click:

End Call

Allows the agent to hang up the call when the conversation is complete.

Transfer Call

Transfers the caller to a specified phone number. Configure the destination number when enabling this tool.

Transfer Agent

Hands off the conversation to a different Sonara agent. Useful for routing callers to specialized agents (e.g., transfer from a general support agent to a billing specialist).

Custom functions

For advanced use cases, you can define custom functions that your agent can call during conversations.

Creating a custom function

1

Click Add Function

In the Tools tab, click Add Function.
2

Define the function

Provide:
  • Name - A descriptive function name (e.g., lookup_order)
  • Description - Explain what this function does and when the agent should use it. The LLM uses this description to decide when to call the function.
  • Parameters - Define the input parameters as a JSON schema.
3

Set the endpoint

Provide the server URL that Sonara should call when this function is invoked. Your endpoint will receive the parameters as a JSON payload and should return a response for the agent to use.

Example custom function

Function: lookup_order
{
  "name": "lookup_order",
  "description": "Look up an order by its order number. Use this when the customer asks about their order status.",
  "parameters": {
    "type": "object",
    "properties": {
      "order_number": {
        "type": "string",
        "description": "The customer's order number"
      }
    },
    "required": ["order_number"]
  }
}
Write clear, detailed descriptions for your custom functions. The LLM relies on the description to decide when and how to call each function.
Your custom function endpoint must respond within a reasonable time (under 10 seconds) to avoid noticeable pauses in the conversation.