LiveKit Voice Agent + WhatsApp — mid-call & post-call integration patterns

Hey LiveKit community!

I have a working LiveKit voice agent running in production in India via Exotel, and I’m now looking to expand it with WhatsApp integration. Would love guidance from anyone who has tackled this.

What I already have:
A fully functional outbound voice AI agent (LiveKit Agents SDK + Python + Exotel for PSTN) handling real calls.

What I want to build next — two patterns:

:one: Post-call WhatsApp trigger
Once the voice call ends, automatically send a WhatsApp message to the user with a relevant CTA — e.g. a payment link, a form, a summary, a booking confirmation, or any follow-up action based on what was discussed on the call.

:two: Mid-call WhatsApp trigger (async, multi-channel)
While the voice call is still active, the agent sends a WhatsApp message with a CTA, waits for the user to act on it (complete a payment, fill a form, send a document, respond to a query), and then reacts on the ongoing call with the result — keeping the conversation continuous across both channels.

Some real examples of where this is useful:

  • Send payment link on WhatsApp → confirm payment on call
  • Send a form → process submission and continue on call
  • Push search results or product info to WhatsApp → discuss on call
  • Request a document via WhatsApp → acknowledge receipt on call

Questions I need help with:

  1. What’s the cleanest way to trigger a WhatsApp message from within a LiveKit agent session (both mid-call and post-call)?
  2. For the mid-call pattern — how do I feed an async external event (webhook / inbound WhatsApp message) back into the live agent context?
  3. Is there a pattern for a “waiting” state mid-conversation while the agent listens for an external signal, without the call feeling silent or dead to the user?
  4. Any examples or prior art in the community for this kind of multi-channel coordination on top of LiveKit?

Stack: LiveKit Agents SDK (Python), Exotel (PSTN, India), WhatsApp Business API.

Happy to share more details on the current setup. Thanks in advance!

@Ninad_Kulkarni_Speaks Here is how I think you can go about this.

For sending messages mid-call, provide the agent a tool like send_whatsapp_message whose purpose is to send a whatsapp message. When this tool is called & run, you can trigger an event (using inngest, temporal, etc. I prefer inngest) that sends the message using Whatsapp Business API. The challenge will be to await mid-conversation while the user takes action on a third party platform and then update the Livekit agent in realtime on the result of the action that was taken by the user. I think you can use RPCs to send external data to livekit agent in realtime. Check this Remote method calls | LiveKit Documentation

For the post-call, use ctx.add_shutdown_callback(function) to run a callback function when the agent session is shutting down. This callback can be anything you want like triggering events that take further action after the livekit call ends.

I hope this helps. Keep us posted on how it goes as it’s an exciting use case.

1 Like

This is well explained answer @Kamal_Scraping

Thanks!