Skip to main content

AI Agent Setup Guide

This guide walks you through setting up an AI Agent for your sender. You can configure agents through the Dashboard UI or programmatically via the API.

Agents have their own ids

An agent is a standalone object: it can answer on several senders, and it can exist with none while you build it.
The /v1/senders/{senderId}/agent routes still work. They resolve a sender to the one agent that answers on it: the agent created on it, else the agent connected to it with POST /v1/agents/{agentId}/senders. They cannot reach an agent with no sender. POST /v1/agents takes apiKey the same way the sender-scoped create does, so a standalone agent can use any provider.
A sender answers with at most one agent. Connecting one that is already in use returns 400 naming the agent that holds it — otherwise you would have an agent that looks connected and never receives a message.

Test it without sending anything

Once the agent exists, run it and read what it would say. Nothing is delivered and no execution is logged. A test run is billed like a live reply: on a zavu provider agent it is charged to your balance at the same per-token price (the response’s cost); on a bring-your-own-key agent it costs your provider.
It prints the reply plus tokens, latency, and how many knowledge-base chunks were retrieved. The model is offered the agent’s tools but none runs: if it picks one, the reply stops at that choice. Pass executeTools on the API to run them for real. It also warns about what a dry run cannot prove: an agent that is still disabled, a sender without the channels the agent triggers on, and contact metadata that exists on a real conversation but not here. Multi-turn, and isolating the prompt from retrieval:

Via Dashboard

1

Navigate to Agent Settings

Go to Senders in the sidebar, select your sender, and click the Agent tab.
2

Enable the Agent

Toggle the Enable Agent switch to activate automated responses for this sender.
3

Configure LLM Provider

Choose your AI provider and model:
  • Provider: Select OpenAI, Anthropic, Google, Mistral, or Zavu (managed)
  • Model: Choose from available models (e.g., gpt-4o-mini, claude-3-5-haiku)
  • API Key: Enter your provider API key (not needed for Zavu provider)
4

Write System Prompt

The system prompt defines your agent’s personality and behavior. Write clear instructions:
5

Set Trigger Channels

Select which channels should trigger the agent:
  • SMS: Text messages
  • WhatsApp: WhatsApp messages
You can enable the agent on both channels or just one.
6

Configure Advanced Settings

Adjust these optional settings:
7

Save and Test

Click Save to apply your configuration. Send a test message to your sender’s phone number to verify the agent responds correctly.

Via API

Create Agent

A sender answers with one agent. Creating one on a sender that already answers with an agent (created on it, or connected to it) returns 409 conflict.

Update Agent

Enable/Disable Agent

Get Agent Configuration

A sender with no agent returns 404.

Configuration Options

System Prompt Best Practices

Be Specific

Define exactly what the agent should and shouldn’t do. Include examples of good responses.

Set Boundaries

Specify what topics to avoid and when to escalate to humans.

Match the Channel

For SMS, instruct the agent to keep responses under 160 characters when possible.

Include Context

Mention your company name, products, and common customer questions.

Example System Prompts

Customer Support Agent:
Lead Qualification Agent:

Testing Your Agent

After configuring your agent, test it thoroughly:
  1. Send test messages from different phone numbers
  2. Test edge cases like questions the agent shouldn’t answer
  3. Verify escalation works correctly
  4. Check response quality across different topics
  5. Monitor logs in the Dashboard under Agent > Execution Logs
Always test your agent before enabling it for production traffic. Poorly configured agents can frustrate customers.

Next Steps

Add Flows

Create structured conversation paths

Add Tools

Let your agent execute actions

Add Knowledge Base

Upload documents for the agent to reference

AI Agents Concept

Learn how agents work under the hood