Loading...
Automation & AI 2 min read Also available in: PT ES

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.

📷 Image: integrations screen with the OpenAI option highlighted

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.

📷 Image: AI agent configuration with persona and prompt fields

Best practices

  1. Keep the knowledge base up to date — it is the agent's main source of truth.
  2. Be explicit about limits: tell the agent not to invent prices or deadlines.
  3. 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

No. Each WhatsApp instance has a single AI agent. For different behaviors, adjust the prompt and knowledge base, or use another instance.
The agent uses the model configured in your OpenAI integration. You manage the key and model on the Integrations screen.
Yes, as long as the integration is enabled and the instance is connected. You can instruct the agent, via the prompt, to communicate business hours.

Thanks for your feedback!

Related articles