Skip to main content
The Tools page (also referred to as the Functions Library) is where you define the specific actions your AI agents can perform during a live call. By attaching functions to an agent, you upgrade them from a conversational bot to a functional assistant capable of executing real-world tasks.
Agni Functions Library

Adding a Function

To create a new tool, click the + Add Function button in the top right corner of the Functions Library. Currently, Agni supports two primary telephony functions: End call and Call transfer.
Add Function Dropdown

1. End Call

The End Call function allows the AI agent to politely and intentionally hang up the phone when a conversation has naturally concluded or a specific objective has been met.
End Call Configuration
Configuration Fields:
  • Name: The internal identifier for the function (e.g., end_call).
  • Description: A crucial instruction field. Write a clear, natural-language description telling the AI exactly when it should trigger this function (e.g., “Call this function only after you have confirmed the user’s appointment and said goodbye”).
Prompting Tip: The text you write in the Description field is passed directly to the LLM’s context window. The clearer and more specific your instructions, the more accurately the AI will know when to trigger the tool.

2. Call Transfer

The Call Transfer function allows the AI to route an active caller to a human agent, a different department, or an external SIP address.
Transfer Call Configuration
Configuration Fields:
  • Name: The identifier for the AI to call (e.g., transfer_call).
  • On Hold Music: Toggle this on to play holding music while the transfer connects.
  • Description: Tell the AI when to trigger the transfer (e.g., “Trigger this if the user asks to speak to a human representative or manager”).
  • From Section: Define the originating identity of the transfer. You must provide the SIP address and the associated Phone Number.
  • To Section: Define the Destination Phone Number where the call should be routed.

API Reference

You can completely manage your agent tools and functions programmatically using the Agni REST API.

Create Tool

Define a new tool or function payload via the API.

List Tools

Retrieve your entire library of configured functions.