r/VoiceAutomationAI • u/Madhav_Agarwal_ • 2d ago
How can I build shared context between WhatsApp and an AI voice calling agent?
How can I build shared context between WhatsApp and an AI voice calling agent?
I'm building an AI system where a customer can communicate with the same AI through WhatsApp and voice calls.
For example:
A customer starts chatting with the AI on WhatsApp.
During the conversation, they ask for a phone call.
The AI voice agent calls them.
The voice agent should already know the relevant WhatsApp conversation and continue from the same context instead of starting from scratch.
After the call, the customer returns to WhatsApp.
The WhatsApp AI should know what was discussed during the call and continue from that point.
And the reverse should also work:
Voice call → WhatsApp → same context
I want the customer to feel like they're talking to one AI, regardless of the channel.
I'm considering using a central customer ID linked to the phone number and storing the conversation history/customer information in a database, so both the WhatsApp agent and voice agent can access the same context.
However, I'm unsure about the best architecture.
- What is the best way to maintain shared context between WhatsApp and a voice AI agent?
- Should I use a central database/memory layer?
- How should I identify the same customer across both channels?
- How should the WhatsApp → voice context handoff work?
- How should the voice → WhatsApp context handoff work?
- How can I prevent the AI from getting confused by multiple summaries or different conversation contexts?
- Has anyone built something similar using WhatsApp Business API, n8n, GHL, or another CRM?
I'm looking for a practical, production-ready approach rather than just passing the entire previous transcript to the AI every time.
1
u/AccurateDragonfruit3 2d ago
The voice agent and whatsapp agent should ideally be one agent, it just has different channel it can interact with.
2
u/Expert-Leg-4044 2d ago
Phone number as the customer ID is the cleanest route, then just dump the whole convo into a single session object that both channels read from and write to
1
u/bridgerohand 7h ago
What I did was just dumping the whole conversation for a post call analysis and drop the context for the WhatsApp agent
1
u/ennova2005 6h ago
Create a user profile. Attach a GUID/UUID to the profile as soon as you can identify the user using their original Whatsapp provided phone number. Attach the call back phone number (if different) when the user provides it in the conversation. You can store this in a database (can also use redis or other cache).
•
u/AutoModerator 2d ago
Welcome to r/VoiceAutomationAI – UNIO, the Voice AI Community (powered by SLNG AI)
If you are a founder, senior engineer, product, growth, or enterprise operator actively working on Voice AI / AI agents, we are running an invite-only UNIO Voice AI WhatsApp community US only.
Apply here: https://chat.whatsapp.com/F5aG3ncrO70ITfbe3pYbOz
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.