AI Agents
Create intelligent agents powered by knowledge base and tools that handle customer queries automatically across WhatsApp, Voice, Webchat, and API channels.
Overview
AI Agents are intelligent bots powered by your knowledge base and external tool integrations. They handle customer queries automatically across WhatsApp, Voice, Webchat, and API channels. Each agent can be configured with its own personality, AI model, language, and set of tools — allowing you to build specialized assistants for support, sales, scheduling, and more. Agents use Retrieval-Augmented Generation (RAG) to search your knowledge base and provide accurate, context-aware responses in real time.
Creating an AI Agent
Agent Configuration
Fine-tune how your AI agent behaves by adjusting these settings in the agent configuration panel.
Voice Channel Setup
Voice agents use Sarvam AI for text-to-speech, enabling your agent to speak to callers in natural-sounding voices across multiple languages.
Tool Integrations
Agents can call external tools during conversations to fetch data, perform actions, and integrate with third-party services. The AI decides which tool to use based on the tool's name and description.
Available tool types:
- Webhook — Call any URL with a custom payload
- REST API — Full REST integration supporting GET, POST, PUT, PATCH, and DELETE methods
- Google Sheets — Read, append, or update spreadsheet data
- Google Calendar — List, create, update, and delete events, or check availability
- Google Meet — Create video call links
- Google Docs — Create and manage documents
- Google Drive — Access and manage files
- Zoho CRM — Create, read, update, and search CRM records
- Slack — Send messages to channels
Body Template & System Variables
For REST API and Webhook tools, you can define a JSON body template with dynamic placeholders. Use {{param_name}} to insert AI-extracted parameters, and system variables for automatic context injection.
Available system variables:
{{__sender_phone}}— The sender's phone number, automatically injected from the incoming WhatsApp message or voice call. No need to define this as a parameter.{{__channel}}— The channel the message arrived on:whatsapp,voice,webchat, orapi.
Example body template for an energy generation API:
{
"credentials": "your-api-credentials",
"phoneNumber": "{{__sender_phone}}",
"date": "{{date}}"
}In this example, {{__sender_phone}} is filled automatically from the caller's number, while {{date}} is extracted by the AI from the user's message (e.g., "today", "yesterday", "24 March"). Define date as a required parameter with the description: "The date in YYYY-MM-DD format."
{{__sender_phone}}, {{__channel}}) are only included in the API request when you explicitly reference them in the body template. They are never sent automatically to protect user privacy.Knowledge Base Integration
Connect your agent to knowledge base articles so it can answer questions using your own content. The agent uses RAG (Retrieval-Augmented Generation) to search linked articles by semantic relevance and craft accurate responses.
Agents can be linked to multiple knowledge base articles. When a message comes in, the agent searches all linked articles and retrieves the most relevant content based on meaning, not just keywords.
Testing in Playground
The Playground lets you test your agent in three modes before deploying it to live channels.
Debug and Performance
Monitor and optimize your agent's performance using the detailed metrics available in the Playground debug tab.
- Latency — Response time tracked in milliseconds per request
- Token Usage — Number of input and output tokens consumed per request
- Cost — Calculated cost in USD per request based on model and token usage
- Cache Status — Shows whether a response was served from cache (hit) or generated fresh (miss). Cached responses are faster and cheaper
- Knowledge Base Chunks — Retrieved articles displayed with relevance/similarity scores so you can verify the right content is being matched
- Channel-specific Testing — Test the same agent on different channels (WhatsApp, Voice, Webchat, API) to verify behavior across all deployment targets
Assigning to Channels
Once your agent is configured and tested, assign it to one or more channels so it can handle live customer messages.
You can assign different agents to different channels, allowing specialized agents per use case. Per-channel language settings can also be configured independently, so the same agent can respond in different languages on different channels.
Agent Limits
Each subscription plan includes a maximum number of AI agents you can create. Your current usage is displayed as "X/Y agents" on the AI Agents page.
- When the agent limit is reached, the "Create Agent" button is disabled and you cannot create new agents
- Upgrade your plan in Billing → Upgrade Plan to increase your agent limit
- Inactive agents still count toward your limit, but preserving them avoids losing their configuration