Skip to how it works
LangGraph × WhatsApp
What’s includedHow it worksExtensionsFAQSetup
GitHub

Give your LangGraph agent its WhatsApp.

An open-source project that shows how to connect a LangGraph agent to a WhatsApp account you control. People message it like a contact, and it replies in the same chat.

View on GitHubHow it works

What’s included

Everything between WhatsApp and your agent.

Pair it once by scanning a QR code.

  • Text and voice notes

    People type or send an English voice note. The agent answers in text.

  • Photos and images

    It reads a photo with its caption, and can send back a generated image.

  • Memory per sender

    Each person gets a private thread. Long chats are summarized.

  • Your agent, your tools

    Instructions and tools live in one file: src/agent/index.ts.

How it works

One message, there and back.

Four stops come with the starter. The agent is yours.

  1. Their phone

    Step 1: WhatsApp

    Someone messages the account you linked.

  2. Included

    Step 2: WAHA

    Receives it and forwards a signed webhook.

  3. Included

    Step 3: Adapter

    Checks it, handles media and finds the sender’s thread.

  4. Your code

    Step 4: Your agent

    LangGraph runs your instructions and tools.

  5. Included

    Step 5: Same chat

    The reply goes back to the sender. The model never picks the recipient.

Extensions

Where you could take it from here.

Ideas, not features. The starter is the base; each of these needs code of your own.

  • A /new command

    Let someone start fresh. Each chat maps to one thread today; add a counter to the thread ID and /new opens the next one.

  • A recap on reset

    Before starting over, send the person a short summary of the old chat and carry it into the new thread.

  • Contact profiles

    Keep each person’s name, language and preferences in LangGraph’s long-term store, so they carry across threads.

  • Human handoff

    Pause the agent and pass a chat to a person with a LangGraph interrupt, then hand it back.

  • A production backend

    Run LangGraph’s production Agent Server on Postgres and Redis for durable threads and queued runs.

  • The official Cloud API

    Swap WAHA for Meta’s WhatsApp Business Cloud API behind the same adapter.

Thinking of building on this? Tell me what you have in mind, and we’ll figure out where to start together. Grab a 15-min chat

FAQ

Questions

References

Read more

WhatsApp gateway

  • WAHA on GitHub
  • WAHA webhooks and events
  • WAHA security

LangGraph and LangChain

  • Run a local Agent Server
  • Agent Server
  • Short-term memory

Going further

  • Deep Agents overview
  • ReAct agent template

Have questions about your implementation?

I can help you connect WhatsApp to your LangGraph agent, design its tools, or plan the move to Meta’s official Cloud API.

Schedule a 15-min chat or email ahmadshaukat_4@outlook.com
How it worksSetupFAQGitHub
Built with LangGraph, LangChain and WAHA by Ahmad.