All member projects

Code · Built by members

Grok Bot WhatsApp reference

Reference patterns for bridging WhatsApp (via Baileys) to an agent: device pairing, keeping the connection alive and restoring a server. Sanitised and MIT licensed.

Conceptual illustration: Reference patterns for bridging WhatsApp (via Baileys) to an agent: device pairing, keeping the connection alive and restoring a server. Sanitised and MIT licensed.
AI-generated editorial illustration, not a product screenshot.

What it is

This repo is an agent-first reference for connecting WhatsApp to a Grok Bot agent using the Baileys library. It sets out the architecture and the exact contracts between the bridge and the agent host, then gives a small TypeScript scaffold that shows the control flow.

It is meant to be handed to an agent as a guide, not cloned as a working system. All phone numbers, IDs and paths are placeholders. It is for people wiring their own agent into WhatsApp.

What it does

  • Splits the bridge into a one-shot pairing step and a long-running daemon that keeps the socket warm.
  • Routes replies back to the right chat through a correlation table keyed on the WhatsApp message ID.
  • Sets clear rules on what the bridge may send out and what goes into prompts.
  • Handles media through local attachment paths.
  • Uses placeholders only: no secrets, real numbers or hostnames.

Built with

  • TypeScript
  • Baileys
  • Grok Bot
  • agents
  • developer tools

More from the community

Code

governed-agent

by Jeremy

Capability-based security, scope-bounded planning and out-of-band audit for autonomous LLM agents.

App

ArchLang

by Chan

An open-source language for floor plans, now also inside ChatGPT: ask for a plan in plain words and ChatGPT writes it in ArchLang, compiles it and checks it.

App

Remote Clipboard

by Ming

Copy on one device and paste on another, or share with people and agents, through a short-lived room or the rclip CLI.

Back to all member projects