数据分析

TinkerClaw WhatsApp

试用

OpenClaw 原生 WhatsApp 通道:22 项消息与群组操作,叠加 Protocol v2 多智能体协同。

它能做什么

通过 Baileys 直连 WhatsApp Web 协议,无需 Docker、无需 CLI 包装。共 22 项能力:发送文本、媒体、投票、贴纸、语音、GIF;交互支持回应、引用、编辑、撤回;群组可创建、改名、设置图标与描述、管理成员与管理员、获取邀请链接。历史消息提供全文搜索与 vCard 联系人抽取(含电话号码)。Protocol v2 在此之上引入每个 agent 的独立身份、群内多 agent 路由(广播/点名/轮询)、指数礼貌协议实现的拥塞控制、带陈旧度与认同循环检测的对话生命周期,以及保守/中等/激进/燃尽四种预算感知调度模式。

什么时候用它

  • 在同一 WhatsApp 群中协调多个 agent,避免刷屏和互相复读
  • 通过脚本发送投票、语音、贴纸、GIF 等富媒体消息
  • 以脚本方式管理群成员、群图标、描述与邀请链接
  • 根据 API 用量剩余动态调节 agent 话量

技能文档

TinkerClaw WhatsApp

Part of TinkerClaw — our OpenClaw fork running 24/7 with real-time token tracking, self-improving crons, and persistent cognitive memory.

Everything you can do in WhatsApp, your AI agent can do too. This skill documents all WhatsApp capabilities available through OpenClaw's native channel integration. No external Docker services, no CLI wrappers — direct WhatsApp Web protocol via Baileys.


  • OpenClaw with WhatsApp channel configured
  • WhatsApp account linked via QR code (openclaw whatsapp login)

Capabilities Overview

CategoryFeatures
MessagingText, media, polls, stickers, voice notes, GIFs
InteractionsReactions, replies/quotes, edit, unsend
GroupsCreate, rename, icon, description, participants, admin, invite links
HistoryFull-text search, vCard contact extraction with phone numbers

Total: 22 distinct actions.


Messaging

Send Text

message action=send channel=whatsapp to="+34612345678" message="Hello!"

Send Media (Image/Video/Document)

message action=send channel=whatsapp to="+34612345678" message="Check this out" filePath=/path/to/image.jpg

Supported: JPG, PNG, GIF, MP4, PDF, DOC, etc.

Send Poll

message action=poll channel=whatsapp to="+34612345678" pollQuestion="What time?" pollOption=["3pm", "4pm", "5pm"]

Send Sticker

message action=sticker channel=whatsapp to="+34612345678" filePath=/path/to/sticker.webp

Must be WebP format, ideally 512x512.

Send Voice Note

message action=send channel=whatsapp to="+34612345678" filePath=/path/to/audio.ogg asVoice=true

Use OGG/Opus format for voice notes — MP3 may not play correctly.

Send GIF

message action=send channel=whatsapp to="+34612345678" filePath=/path/to/animation.mp4 gifPlayback=true

Convert GIF to MP4 first (WhatsApp requires this):

ffmpeg -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4 -y

Interactions

Add Reaction

message action=react channel=whatsapp chatJid="34612345678@s.whatsapp.net" messageId="ABC123" emoji="🚀"

Remove Reaction

message action=react channel=whatsapp chatJid="34612345678@s.whatsapp.net" messageId="ABC123" remove=true

Reply/Quote Message

message action=reply channel=whatsapp to="34612345678@s.whatsapp.net" replyTo="QUOTED_MSG_ID" message="Replying to this!"

Edit Message (Own Messages Only)

message action=edit channel=whatsapp chatJid="34612345678@s.whatsapp.net" messageId="ABC123" message="Updated text"

Unsend/Delete Message

message action=unsend channel=whatsapp chatJid="34612345678@s.whatsapp.net" messageId="ABC123"

Group Management

Create Group

message action=group-create channel=whatsapp name="Project Team" participants=["+34612345678", "+34687654321"]

Rename Group

message action=renameGroup channel=whatsapp groupId="123456789@g.us" name="New Name"

Set Group Icon

message action=setGroupIcon channel=whatsapp groupId="123456789@g.us" filePath=/path/to/icon.jpg

Set Group Description

message action=setGroupDescription channel=whatsapp groupJid="123456789@g.us" description="Team chat for Q1 project"

Add Participant

message action=addParticipant channel=whatsapp groupId="123456789@g.us" participant="+34612345678"

Remove Participant

message action=removeParticipant channel=whatsapp groupId="123456789@g.us" participant="+34612345678"

Promote to Admin

message action=promoteParticipant channel=whatsapp groupJid="123456789@g.us" participants=["+34612345678"]

Demote from Admin

message action=demoteParticipant channel=whatsapp groupJid="123456789@g.us" participants=["+34612345678"]

Leave Group

message action=leaveGroup channel=whatsapp groupId="123456789@g.us"
message action=getInviteCode channel=whatsapp groupJid="123456789@g.us"

Returns: https://chat.whatsapp.com/XXXXX

message action=revokeInviteCode channel=whatsapp groupJid="123456789@g.us"

Get Group Info

message action=getGroupInfo channel=whatsapp groupJid="123456789@g.us"

Returns: name, description, participants, admins, creation date.


JID Formats

WhatsApp uses JIDs (Jabber IDs) internally:

TypeFormatExample
Individual@s.whatsapp.net34612345678@s.whatsapp.net
Group@g.us123456789012345678@g.us

When using to= with phone numbers, OpenClaw auto-converts to JID format.


Tips

Voice Notes

Use OGG/Opus format:

ffmpeg -i input.wav -c:a libopus -b:a 64k output.ogg

Stickers

Convert images to WebP stickers:

ffmpeg -i input.png -vf "scale=512:512:force_original_aspect_ratio=decrease,pad=512:512:(ow-iw)/2:(oh-ih)/2:color=0x00000000" output.webp

Rate Limits

WhatsApp has anti-spam measures. Avoid:

  • Bulk messaging to many contacts
  • Rapid-fire messages
  • Messages to contacts who haven't messaged you first

Message IDs

To react/edit/unsend, you need the message ID. Incoming messages include this in the event payload. For your own sent messages, the send response includes the ID.


Comparison with Other Skills

Featurewhatsapp-ultimatewacliwhatsapp-automationgif-whatsapp
Native integrationyesno (CLI)no (Docker)N/A
Send textyesyesnono
Send mediayesyesnono
Pollsyesnonono
Stickersyesnonono
Voice notesyesnonono
GIFsyesnonoyes
Reactionsyesnonono
Reply/Quoteyesnonono
Edityesnonono
Unsendyesnonono
Group createyesnonono
Group managementyes (full)nonono
Receive messagesyesyesyesno
Two-way chatyesnonono
External depsNoneGo binaryDocker + WAHAffmpeg


Protocol v2: Multi-Agent Discussions

If you put multiple AI agents in one WhatsApp group, the naive default is everyone responds to everything. Five agents replying to one message means 5x the API spend per turn, plus echo loops where agents agree with each other forever. Protocol v2 introduces congestion control, conversation lifecycle, and budget-aware scheduling so agents know when to talk, when to stay quiet, and when to wrap up.

Agent Identity

Each agent gets its own personality, icon, and (optionally) model:

channels:
  whatsapp:
    agentIcon: "🤖"          # single-agent icon prefix
    turnEndMarker: "⚡"       # end-of-turn marker in 1:1 chats
    multiAgent:
      mainAgentId: "jarvis"
      agents:
        jarvis:
          id: "jarvis"
          name: "Jarvis"
          icon: "🤖"
        luna:
          id: "luna"
          name: "Luna"
          icon: "🌙"
          model: "sonnet"
        rex:
          id: "rex"
          name: "Rex"
          icon: "🦖"
          model: "haiku"

Agent personalities live in the workspace:

workspace/
├── SOUL.md                  # main agent
├── agents/
│   ├── luna/SOUL.md         # Luna's personality
│   └── rex/SOUL.md          # Rex's personality

Intra-Agent Chats

Register WhatsApp groups where agents discuss freely (no trigger prefix needed):

      intraAgentChats:
        brainstorm:
          chatId: "120363424201898007@g.us"
          participants: ["jarvis", "luna", "rex"]
          owner: "oscar"
          mode: "broadcast"        # broadcast | addressed | round-robin

Routing modes:

  • broadcast — all agents respond (with congestion control)
  • addressed — only respond when mentioned by name ("Luna, what do you think?")
  • round-robin — structured turn-taking

Congestion Control (Exponential Courtesy Protocol)

Prevents N agents from all responding simultaneously:

      congestion:
        enabled: true
        baseDelayFactor: 150     # ms × agentCount² base delay
        maxDelay: 30000          # 30s cap
        backpressureThreshold: 1.5  # slow down over-talkers
        windowMs: 60000          # 60s sliding window

How it works:

  • Base delay scales quadratically with agent count (2 agents ≈ 600ms, 5 agents ≈ 3750ms)
  • Random jitter prevents synchronization
  • Agents talking more than their fair share get 2× delay penalty
  • If another agent posts during your wait, restart the timer (yield-on-collision)

Conversation Lifecycle

Agents detect when discussions go stale and know when to wrap up:

      lifecycle:
        stalenessWindow: 5        # compare last N messages
        stalenessThreshold: 0.85  # cosine similarity trigger
        maxTurnsPerObjective: 30  # hard cap
        autoClose: true

Features:

  • Staleness detection — cosine similarity of message embeddings detects circular discussions
  • Agreement loop detection — catches "I agree" / "Good point" / "Exactly" loops
  • Topic steering — one agent claims pivot role to redirect conversation
  • Objective tracking — set goals, track completion, auto-close with summary
  • Closure protocol — propose → ack → converge (all agents must agree)

Budget-Aware Scheduling

Adjusts conversation depth based on API usage and reset timing:

      budget:
        provider: "anthropic"
        windowDays: 7
        burnModeEnabled: true
        burnTriggerHours: 24     # hours before reset
        burnUsageThreshold: 0.20 # usage below 20%

Four modes:

ModeWhenCongestionStalenessMax TurnsTangents
Conservative>85% used2× slower0.80½No
Moderate60-85%Normal0.85NormalNo
Aggressive<60%0.7× faster0.85NormalYes
Burn<20% used, <24h to reset0.3× faster0.95Encouraged

Burn mode philosophy: unused tokens expire at reset. Better to have emergent agent-agent discussions than waste the budget.

DM Trigger Prefix

Protocol v2 extends triggerPrefix to DMs (previously groups only):

  • Owner — always bypasses triggerPrefix
  • Authorized contacts — must start message with prefix (e.g., "Jarvis, help me with...")
  • Intra-agent chats — bypass triggerPrefix entirely

Turn-End Marker

In 1:1 chats (selfChat or owner-only DM), append a visual marker to signal turn completion:

channels:
  whatsapp:
    turnEndMarker: "⚡"

4.0.0

  • Protocol v2: Multi-agent discussions with configurable routing (broadcast/addressed/round-robin)
  • Added: Congestion control — Exponential Courtesy Protocol prevents message explosion in multi-agent chats
  • Added: Conversation lifecycle — staleness detection, agreement loop detection, topic steering, objective tracking, closure protocol
  • Added: Budget-aware scheduling — four spending modes including burn mode for pre-reset token usage
  • Added: Agent identity system — per-agent SOUL.md, icons, names, model overrides
  • Added: DM triggerPrefix gating — non-owner contacts must use prefix in DMs
  • Added: Turn-end marker (⚡) for 1:1 chats
  • Added: agentIcon config for outbound message prefixing

3.7.0

  • Added: vCard phone number extraction — contact messages now return structured vcard field with names and phone numbers
  • Added: contactsArrayMessage support — multi-contact shares are now parsed
  • Improved: New contact messages store phone numbers in text_content for full-text search (e.g. search by phone number)
  • Improved: raw_json now included in search results for contact-type messages, enabling vCard extraction from historical data

3.4.0

  • Fixed: Chat search now resolves LID/JID aliases — searching by chat name finds messages across both @lid and @s.whatsapp.net JID formats
  • Added: resolveChatJids() cross-references chats, contacts, and messages tables to discover all JID aliases for a given chat filter
  • Improved: Search falls back to original LIKE behaviour if no JIDs resolve, so no regressions

3.0.0

Your Agent
    ↓
OpenClaw message tool
    ↓
WhatsApp Channel Plugin
    ↓
Baileys (WhatsApp Web Protocol)
    ↓
WhatsApp Servers

No external services. No Docker. No CLI tools. Direct protocol integration.


Pairs Well With

  • smart-model-router — auto-select the right model per agent role (creative → Sonnet, analyst → Haiku, devil's advocate → GPT)
  • agent-superpowers — verification iron law and three-agent review for when your multi-agent discussions produce code
  • subagent-overseer — monitor agent sessions without burning tokens on polling loops

https://github.com/globalcaos/tinkerclaw

Clone it. Fork it. Break it. Make it yours.


License

MIT — Part of OpenClaw


相关技能

Sets up and manages WhatsApp Business accounts including auto-response systems, client communication workflows, FAQ templates, and broadcast campaigns.

Send real WhatsApp VOICE NOTES (not audio files) from an OpenClaw agent. Use when the user asks the agent to 'send a voice message/note', reply by voice, or...

Source and send relevant reaction GIFs in WhatsApp chats using safe filters and deterministic ranking. Use when the user asks for a GIF/meme/reaction, or whe...

34 次安装

Send third-party WhatsApp messages or sync/search WhatsApp history via wacli, not normal active chats.

Chat API for WhatsApp (chat-api.com). Use this skill for ANY Chat API for WhatsApp request — reading, creating, and updating data. Whenever a task involves Chat API for WhatsApp, use this skill instead of calling the API directly.

1 次安装

Send and receive WhatsApp messages (Web + Business API), SMS, and voice call records through 2Chat. Connects OpenClaw to the official 2Chat remote MCP server so the agent can message contacts, manage WABA templates, read conversations and groups, publish WhatsApp statuses, browse catalogs, and more!

1 次安装