Summary
Want to deploy your own custom AI agent on Wati? With the Bring Your Own AI (BYOA) feature, you can integrate your AI agent directly into Wati as an AI operator. This allows your agent to work alongside your human operators - receiving, responding to, and managing customer conversations just like a member of your team.
Note:
The BYOA feature is offered as a paid add-on ($100 USD/month) for Wati customers.
If you’re already using Astra and want to connect it with Wati via BYOA, the add-on is not required. You only need to be on Wati’s Pro or Business plan to enable this integration.
You can find it under your User Management page in Wati!
Instructions
Follow this guide to understand how your AI agent can send and receive messages, manage chat context, and interact with Wati using APIs.
Add your custom AI agent to Wati
You can register your AI agent as an AI operator in Wati. Once added, your agent will receive a dedicated access token that allows it to interact with Wati’s public APIs - such as sending messages, updating contacts, or resolving chats.
Your AI operator will appear in the Team inbox operator list, and you can assign conversations to it manually or through Wati automations.
For example, you can create an automation rule to assign all new chats to your AI operator automatically.
How your AI agent receives customer messages
To receive messages, provide a webhook URL to Wati. Wati will push relevant message events to your AI agent through this webhook.
Your AI agent won’t be overwhelmed with unnecessary data — Wati only sends events from conversations assigned specifically to your AI agent. Conversations handled by human operators won’t trigger webhook events for your agent.
Supported webhook events
Currently, your AI agent can receive 2 types of webhook events:
Chat Assigned – Triggered when a chat is assigned to your AI agent.
Assigned Message Received - Triggered when there is a new incoming message for conversations that are assigned to your AI Agent.
How your AI agent can respond to customers
Once your agent is registered, a dedicated access token will be generated. You can use this dedicated access token with Wati’s public APIs to send messages, update contact information, or manage chat statuses.
You can find the full list of APIs in the Wati API documentation.
Here are the most commonly used endpoints to get started:
/sendSessionMessageSend a message response to a customer.
/getContactsRetrieve contact details (such as phone number and custom attributes) when a conversation is assigned to your AI agent.
/updateContactAttributesStore new information gathered during a conversation as contact attributes in Wati.
/updateChatStatusUpdate the chat status once your AI agent resolves a conversation.
/assignOperatorReassign a chat to a human operator if your AI agent cannot handle it.
Accessing conversation history
When your AI agent is assigned to a chat, it can retrieve the historical context using the /getMessages API endpoint. This helps your AI generate more accurate and contextual responses based on both past and recent messages.
Handling media messages
If a customer sends an image, document, or voice note, Wati will include a filename in the webhook event. Your AI agent can use the /getMedia API to download the file and process it accordingly.
Where to find your AI operator
After setup, your AI operator appears in the Team inbox operator list, where it can be assigned chats just like any other team member.
You can also use Wati automations to route messages automatically to your AI operator.
Frequently Asked Questions (FAQs)
Overview
1. What is the Bring Your Own AI (BYOA) feature in Wati?
The Bring Your Own AI (BYOA) feature allows you to integrate your custom AI agent into Wati as an AI operator that can receive, respond to, and manage customer conversations alongside human operators.
2. Is the BYOA feature free to use?
The BYOA feature is offered as a paid add-on that costs $100 USD per month for Wati customers.
3. Are there any plan requirements to use BYOA with Astra?
To connect Astra with Wati using BYOA, you must be on Wati’s Pro or Business plan.
4. Where can you find the BYOA feature in Wati?
The BYOA feature is available under the User Management page in Wati.
Setup and Assignment
5. How do you add and use a custom AI agent in Wati?
You can register your custom AI agent as an AI operator in Wati. Once registered, the agent receives a dedicated access token to interact with Wati APIs and appears in the Team inbox, where conversations can be assigned manually or through automation rules.
6. Can chats be automatically assigned to the AI agent?
Yes, you can create automation rules in Wati to automatically assign new chats to the AI operator.
Message Handling and Webhooks
7. How does the AI agent receive customer messages?
The AI agent receives messages through a webhook URL provided to Wati, which sends relevant message events for conversations assigned to the AI agent.
8. What webhook events does the AI agent support?
The AI agent supports two webhook events: “Chat Assigned,” triggered when a chat is assigned to the agent, and “Assigned Message Received,” triggered when a new message is received in an assigned conversation.
9. Does the AI agent receive events from all conversations?
No, the AI agent only receives webhook events for conversations that are specifically assigned to it.
APIs and Capabilities
10. How can the AI agent interact with customers and manage chats?
The AI agent uses its dedicated access token with Wati’s public APIs to send messages, retrieve contact details, update contact attributes, manage chat status, reassign chats to human operators, access conversation history using the /getMessages endpoint, and download media files using the /getMedia endpoint.







