How to set up an AI agent to auto-reply on WhatsApp
Learn how to connect an OpenAI integration and create a per-instance AI agent that replies to your customers on WhatsApp automatically.
Updated on
What the Zapini AI agent is
The AI agent is an assistant that automatically answers your customers' messages on WhatsApp, using the OpenAI model configured in your account. You define a persona (how the agent behaves), an instruction prompt, and a knowledge base with your business information. Each WhatsApp instance can have its own agent.
💡 Tip: start with a single clear goal for the agent (for example, answering questions and qualifying leads) before adding more complex tasks.
Step 1 — Connect the AI integration
Open the Integrations menu and create an integration of type OpenAI. Paste your API key and save. This integration provides the "brain" the agent uses to generate replies.
Step 2 — Create the instance's AI agent
In your WhatsApp instance settings, open the Automation & AI section and create the AI agent. There is only one AI agent per instance, so this is the main assistant for that number.
- Name and persona: name the assistant and describe its tone (formal, friendly, concise).
- Instruction prompt: explain what it should and shouldn't do, business hours, and when to hand off to a human.
- Knowledge base: include details about products, pricing, policies and frequently asked questions.
Step 3 — Enable and test
Enable the integration and send a test message to the instance number from another WhatsApp. The agent should reply within a few seconds. Refine the prompt whenever you notice unexpected answers.
Best practices
- Keep the knowledge base up to date — it is the agent's main source of truth.
- Be explicit about limits: tell the agent not to invent prices or deadlines.
- Clearly define when a conversation should be handed off to a human.
Importantly, the Zapini AI never loops by replying to another AI, so conversations between two automated assistants are stopped safely.
Frequently asked questions
Was this article helpful?
Thanks for your feedback!