AI Agents Overview
Automate customer conversations with intelligent AI-powered agents
AI Agents Overview
AI Agents allow you to automate customer conversations using large language models. When a customer sends a message to your sender, the agent can respond intelligently, answer questions from your knowledge base, and execute actions via webhooks.
When to Use AI Agents
AI Agents are ideal for:
| Use Case | Description |
|---|---|
| Customer Support | Answer common questions, troubleshoot issues, and escalate complex cases |
| Lead Qualification | Collect contact information and qualify leads through conversation |
| Appointment Booking | Guide customers through scheduling via conversational flows |
| FAQ Answering | Provide instant answers using your knowledge base documents |
| Order Status | Look up orders and provide updates via webhook integrations |
Supported Providers
Configure your agent with any of these LLM providers:
| Provider | Models | Notes |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, gpt-4-turbo | Most popular, great general-purpose |
| Anthropic | claude-3-5-sonnet, claude-3-5-haiku | Excellent reasoning capabilities |
| gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite | Cost-effective for high volume | |
| Mistral | mistral-large, mistral-small | European data residency option |
| Zavu | Managed models | No API key needed, billed to your account |
Quick Start
Here's how to create an AI agent for a sender:
import Zavudev from "@zavudev/sdk";
const zavu = new Zavudev({
apiKey: process.env["ZAVUDEV_API_KEY"],
});
// Create an agent for your sender
const { agent } = await zavu.senders.agent.create("sender_abc123", {
name: "Acme Support",
provider: "openai",
model: "gpt-4o-mini",
systemPrompt: `You are a helpful customer support agent for Acme Corp.
Be friendly and concise. If you don't know the answer, say so.
For billing questions, ask the customer to email billing@acme.com.`,
temperature: 0.7,
contextWindowMessages: 10,
triggerOnChannels: ["sms", "whatsapp"],
});
console.log("Agent created:", agent.id);
The agent is created disabled. Switch it on with PATCH /v1/senders/{senderId}/agent
and {"enabled": true} once it is configured; see Setup.
Agent Architecture
When a message arrives, the agent processes it through this flow:
CodeInbound Message | v +---------------+ | Agent Enabled?| +---------------+ | | No Yes | | v v +---------+ +-----------------+ | Webhook | | Check Flow State| | Only | +-----------------+ +---------+ | | Has Active No Active Flow Flow | | v v +---------+ +-----------+ | Execute | | Match Flow| | Step | | Triggers | +---------+ +-----------+ | | | No Match | | v v +---------+ +-----------+ | Send | | Query KB | |Response | | + LLM Call| +---------+ +-----------+ | v +-----------+ | Send | | Response | +-----------+
Key Components
Choose your AI provider and model. Configure system prompts, temperature, and context window size.
Create structured conversation paths for lead capture, booking, and multi-step processes.
Let the AI execute actions by calling your webhooks (check orders, create tickets, etc.).
Upload documents and FAQs. The agent uses RAG to find relevant context when answering.
Pricing
AI Agent costs are pass-through with no Zavu markup. You pay exactly what the providers charge:
| Provider | Model | Input Cost | Output Cost | ~Cost per Message |
|---|---|---|---|---|
| OpenAI | gpt-5.6-luna | $0.20/1M tokens | $1.20/1M tokens | ~$0.0004 |
| OpenAI | gpt-4o-mini | $0.15/1M tokens | $0.60/1M tokens | ~$0.0002 |
| OpenAI | gpt-4o | $2.50/1M tokens | $10/1M tokens | ~$0.004 |
| Anthropic | claude-3-5-haiku | $0.80/1M tokens | $4/1M tokens | ~$0.0014 |
| Anthropic | claude-3-5-sonnet | $3/1M tokens | $15/1M tokens | ~$0.005 |
| gemini-2.5-flash-lite | $0.10/1M tokens | $0.40/1M tokens | ~$0.0002 | |
| gemini-2.5-flash | $0.30/1M tokens | $2.50/1M tokens | ~$0.0007 |
~Cost per Message assumes roughly 1,000 input and 150 output tokens. Provider
prices move: the agent's model picker in the dashboard lists the catalog
currently in force, and is what billing charges against.