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.

Self-Chat Assistant — Message Yourself, Memo Replies (v3.9.0)

Beyond reading and drafting, Memo can act as a full assistant in your own "Message Yourself" chat: you message yourself on WhatsApp, Memo picks it up and replies. Opt-in from Settings (off by default, since it's the one WhatsApp feature that sends outgoing messages autonomously).

  • Replies run through a dedicated background session — the chat open in the desktop UI is never hijacked
  • Agent mode is always available in this conversation: agent tools and web search work without flipping any global toggle
  • A native "typing…" indicator shows while a reply generates, via WhatsApp's own presence API
  • Handles modern Linked-ID (@lid) addressing as well as classic phone-number JIDs

Slash Commands

Command Effect
/new Start a fresh session
/agent on|off Toggle tool-use mode
/web on|off Toggle web search
/auto-perm on|off Auto-approve agent tool calls vs. ask yes/no in-chat
/status Model, memory, web, and agent state
/help Full command list

Commands follow the app's Identity.UILanguage setting, read fresh on every call.

Routines From WhatsApp (v3.9.0)

Routines are fully usable without opening the Routines tab: "every day at 9am send me the latest AI news" just works. Three agent tools back this:

Tool Description
create_routine Create a scheduled automation from plain language
list_routines List existing routines with their IDs
cancel_routine Cancel by ID (learned from list_routines, never guessed)

Routines always run with agent mode and web search available; genuinely dangerous tools still respect the routine's auto-approve setting and the live permission-ask flow.

Hard security rule: delivery targets are never chosen by the model. A routine created from your self-chat always delivers to that same chat; another connected channel (e.g. Telegram) is only added if your text explicitly asks for it and it's actually connected.

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