All integrations

WhatsApp

ChannelChat SDK

Customer messaging through WhatsApp Business Cloud via the Chat SDK.

Read the full channel docs

Install

Add this Chat SDK channel from eve's registry. This writes agent/channels/whatsapp.ts and installs Chat SDK and its adapter dependencies:

bash
eve add channel/chat-sdk-whatsapp

Quick start

Create agent/channels/whatsapp.ts. Register Chat SDK handlers on bot, call send to hand each turn to eve, and export the channel:

ts
// agent/channels/whatsapp.tsimport { createWhatsAppAdapter } from "@chat-adapter/whatsapp";import { createMemoryState } from "@chat-adapter/state-memory";import type { Message, Thread } from "chat";import { chatSdkChannel, messageContentOf } from "eve/channels/chat-sdk";
export const { bot, channel, send } = chatSdkChannel({  userName: "My Agent",  adapters: { whatsapp: createWhatsAppAdapter() },  state: createMemoryState(),  // Hand every message to eve, even mid-reply, so eve can steer the running turn.  concurrency: "concurrent",  // WhatsApp can't edit sent messages, so send each reply whole.  streaming: false,});
bot.onNewMention(async (thread: Thread, message: Message) => {  await thread.subscribe();  await send(messageContentOf(message), { thread });});
bot.onSubscribedMessage(async (thread: Thread, message: Message) => {  await send(messageContentOf(message), { thread });});
export default channel;

Credentials come from the createWhatsAppAdapter config or the adapter's environment variables; see the WhatsApp adapter docs.

Configure

The adapter mounts its webhook at /eve/v1/whatsapp. Point your WhatsApp Business Cloud webhook at it. The adapter owns provider auth, verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. See the Chat SDK channel docs for routes, streaming, and state options.