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

How Tools Work

When a tool is attached to an agent, its name and description are injected into the LLM’s context window. During a conversation, the AI decides when to invoke a tool based on the description you provide. This means:
  • The description is the single most important field — it tells the AI when and why to trigger the tool.
  • The name should be a clear, lowercase identifier (e.g., end_call, transfer_to_support).
  • Tools execute instantly during the call — the caller doesn’t notice any delay.
Key insight: Think of the tool description as a prompt. The more specific and contextual your instructions, the more accurately the AI will know when to fire the tool.

Adding a Function

To create a new tool, click the + Add Function button in the top right corner of the Functions Library. Agni supports the following built-in function types:
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 natural-language instruction telling the AI exactly when it should trigger this function.
Example descriptions that work well:
"End the call after you have confirmed the user's appointment time,
repeated it back, and said goodbye. Do not end the call if the user
has any remaining questions."
"Hang up if the caller is abusive, uses profanity more than twice,
or explicitly asks to end the conversation."
Avoid vague descriptions like “End the call when done.” The AI needs specific, context-rich triggers to act reliably.

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_to_support).
  • On Hold Music: Toggle this on to play holding music while the transfer connects.
  • Description: Tell the AI when to trigger the transfer.
  • 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.
Example description:
"Transfer the call to a human agent if the user explicitly asks to
speak to a person, a manager, or says they want a real human. Also
transfer if the conversation loops more than 3 times on the same issue."

Best Practices

Don’t assume the AI knows your business logic. Spell out the exact conditions, in plain English, for when each tool should fire. Include edge cases.
Before going live, use the agent testing interface to verify your tools fire at the right moments. Try to trick the AI into firing them at the wrong time.
Use end_call, transfer_to_billing, check_order_status — not tool1 or myFunction. The name is part of the LLM’s context.
Don’t try to overload a single tool with multiple behaviors. Create separate tools for separate actions — it gives the AI clearer decision boundaries.

Managing Tools via API

You can create, update, and delete tools programmatically using the Agni REST API. This is useful for automating tool deployment across multiple agents.

Create Tool

Define a new tool with a JSON Schema definition via the API.

List Tools

Retrieve your entire library of configured functions.

Update Tool

Modify a tool’s name, description, or definition.

Delete Tool

Remove a tool from your library.