MemoDocumentation
EN

WhatsApp Integration

Connect Memo to your WhatsApp account and let the AI assist with your conversations. Powered by the whatsmeow Go library.

QR Pairing

  1. Open the WhatsApp tab in Memo
  2. Click "Connect"
  3. A QR code appears on screen
  4. Open WhatsApp on your phone → Linked Devices → Link a Device
  5. Scan the QR code
  6. Memo pairs and the chat list loads immediately

No phone number, password, or phone access required. Pairing is a one-time operation — Memo reconnects automatically on restart.

Bidirectional Messaging

  • Incoming — messages from your contacts appear in Memo's WhatsApp interface
  • Outgoing — send replies directly from Memo's chat bubble
  • Optimistic UI — sent messages appear instantly, before network confirmation

Contact Name Resolution

When you tell the WhatsApp assistant "message Berra", the name is resolved to the correct contact JID automatically. Tool output includes both name and JID for every contact. Group chats display their real group name instead of raw numeric JIDs.

Profile Photos

Contact and group avatars show real WhatsApp profile photos (cached on disk). Tap the header avatar to view at full resolution with a Download button. Falls back to a bronze letter badge for contacts without photos.

Search

Search your WhatsApp messages by contact name, group name, or content. Results show matching messages with timestamps and context.

Agent Tools

Four dedicated agent tools are registered for WhatsApp:

Tool Description
whatsapp_search Search messages by query, contact, or time range
whatsapp_send Send a message to a contact or group
whatsapp_contacts List all contacts and groups
whatsapp_read_chat Read recent messages from a specific chat

Dedicated WhatsApp Mode

A separate chat interface just for WhatsApp conversations, themed to match Memo's design language (bronze accent, dark panel colors). Message bubbles use the same style as the main chat.

Auto-Reconnect (v3.1.0)

If previously paired, WhatsApp reconnects automatically on app launch. Exponential backoff handles temporary network issues. A 5-second timeout on logout prevents indefinite hangs — local session is cleared if remote de-registration fails.

Reliability (v3.1.0)

  • SQLite write serialization via sync.Mutex on SaveMessage and SaveContact
  • Connection state mutex (startMu) prevents duplicate connections from rapid clicks
  • Streaming uses a safe accumulation pattern to prevent lost characters
  • Agent tool events no longer leak raw JSON into chat bubbles