Connect your OpenClaw AI agent to MAX messenger (max.ru) — Russia's fast-growing messenger by VK/Mail.ru with 85M+ users.
Full integration: Long Polling, voice transcription via Whisper, typing indicators, channel publishing, and allowlist security.
Say "подключи MAX бот" — and the agent sets everything up automatically.
┌─────────────────────────────────────────────────────────────┐
│ MAX Messenger App │
│ (User writes/speaks) │
└──────────────────────────┬──────────────────────────────────┘
│ HTTPS
▼
┌─────────────────────────────────────────────────────────────┐
│ MAX API (platform-api.max.ru) │
│ Long Polling endpoint │
└──────────────────────────┬──────────────────────────────────┘
│ JSON events
▼
┌─────────────────────────────────────────────────────────────┐
│ openclaw-max-channel (Node.js plugin) │
│ ┌──────────────┐ ┌───────────────┐ ┌─────────────────┐ │
│ │ Long Polling │ │ Whisper voice │ │ Typing indicator│ │
│ │ loop │ │ transcription │ │ pulse (4.5s) │ │
│ └──────────────┘ └───────────────┘ └─────────────────┘ │
└──────────────────────────┬──────────────────────────────────┘
│ text message
▼
┌─────────────────────────────────────────────────────────────┐
│ OpenClaw Agent (Claude / GPT) │
│ Processes & generates reply │
└──────────────────────────┬──────────────────────────────────┘
│ reply text
▼
┌─────────────────────────────────────────────────────────────┐
│ MAX API → User sees the response │
└─────────────────────────────────────────────────────────────┘
Just tell your OpenClaw agent:
подключи MAX бот
or in English:
setup MAX bot
The agent will:
- Clone the plugin from GitHub
- Install Node.js dependencies
- Ask for your MAX bot token
- Add it to
.env - Update
openclaw.jsonautomatically - Restart the gateway
- Walk you through finding your MAX user_id for the allowlist
No manual file editing needed.
| Requirement | Notes |
|---|---|
| 🇷🇺 Russian legal entity or ИП | Required to register a MAX bot on business.max.ru |
| Node.js 18+ | For the plugin runtime |
| OpenClaw gateway | Running locally or on a server |
| Whisper (optional) | pip install openai-whisper — for voice message transcription |
If you prefer to set up manually:
git clone https://github.com/SC32br/openclaw-skill-max-bot ~/max-skill --depth=1
cp -r ~/max-skill/plugins/openclaw-max-channel ~/agents-workspace/plugins/
cd ~/agents-workspace/plugins/openclaw-max-channel && npm installecho 'MAX_TOKEN=your_token_here' >> ~/.openclaw/.env{
"plugins": {
"allow": ["openclaw-max-channel"],
"load": {
"paths": ["./plugins/openclaw-max-channel"]
},
"entries": {
"openclaw-max-channel": {
"enabled": true,
"config": {
"max": {
"token": "${MAX_TOKEN}",
"allowFrom": ["your_max_user_id"],
"dmPolicy": "allowlist",
"whisperBin": "whisper",
"whisperModel": "small",
"whisperLanguage": "ru"
}
}
}
}
}
}openclaw gateway restartSend a message to your bot in MAX — the agent will respond!
| Parameter | Type | Default | Description |
|---|---|---|---|
token |
string | — | MAX bot token. Use ${MAX_TOKEN} for env var |
allowFrom |
array | [] |
MAX user_ids allowed to interact with the bot |
dmPolicy |
string | "allowlist" |
"allowlist" — only listed users; "open" — everyone |
whisperBin |
string | "whisper" |
Path to Whisper binary |
whisperModel |
string | "small" |
Model: tiny / base / small / medium |
whisperLanguage |
string | "ru" |
Language code for transcription |
Voice transcription is built-in and works locally — no OpenAI API key required.
How it works:
- User sends a voice message in MAX
- Plugin detects audio attachment and shows 🎤 indicator
- Downloads the audio file from MAX API
- Runs:
whisper audio.ogg --model small --language ru - Injects transcribed text into the agent
- Shows ✍️ typing indicator while agent thinks
- Sends text reply back to user
Install Whisper (if not already installed):
pip install openai-whisperChoose your Whisper model based on server RAM:
| Model | File Size | RAM Needed | Quality | Best for |
|---|---|---|---|---|
tiny |
22 MB | ~1 GB | Low | Very fast, weak hardware |
base |
139 MB | ~1 GB | OK | Budget VPS |
small |
462 MB | ~2 GB | Good | Recommended |
medium |
1.5 GB | ~5 GB | Excellent | Powerful server |
Your MAX user_id is not the same as your Telegram ID — it's a completely separate number.
How to find it:
- Start your OpenClaw gateway:
openclaw gateway start - Send any message to your MAX bot from the MAX app
- Check gateway logs:
openclaw gateway logs | grep "Inbound" | tail -5
- Look for a line like:
[MAX] Inbound from 123456789 — text: "hello" - The number after
fromis your MAX user_id - Add it to
allowFrominopenclaw.json
Possible causes:
- Token is wrong or expired → check
MAX_TOKENin.env - Your user_id is not in
allowFrom→ add it (see section above) - Plugin not loaded → verify
openclaw.jsonhas"openclaw-max-channel"inplugins.allow
Fix:
openclaw gateway logs | tail -20Cause: Whisper is not installed.
Fix:
pip install openai-whisperVerify:
whisper --helpCause: Node.js version too old (need 18+).
Fix:
node --version # should be 18+
nvm install 18 && nvm use 18
cd ~/agents-workspace/plugins/openclaw-max-channel && npm installCause: Path in plugins.load.paths is wrong.
Fix: Use absolute path or verify relative path from gateway working directory:
"load": {
"paths": ["/home/user/agents-workspace/plugins/openclaw-max-channel"]
}Cause: Token format is wrong or regenerated.
Fix:
- Go to business.max.ru → Чат-боты → [ваш бот] → Интеграция
- Regenerate the token
- Update
MAX_TOKENin~/.openclaw/.env openclaw gateway restart
openclaw-skill-max-bot/
├── SKILL.md # OpenClaw skill descriptor + auto-installer
├── README.md # This file
├── LICENSE # MIT License
├── plugins/
│ └── openclaw-max-channel/
│ ├── index.js # Main plugin (Long Polling, Whisper, typing)
│ ├── package.json
│ └── openclaw.plugin.json # Plugin manifest
├── scripts/
│ └── max_send.py # CLI tool for sending messages/testing
├── references/
│ ├── api.md # MAX API reference
│ └── channel.md # MAX channel publishing guide
└── examples/
├── config-minimal.json # Minimal openclaw.json example
└── config-full.json # Full config with all options
- MAX Developers
- MAX API Reference
- MAX Business Portal (bot registration)
- OpenClaw
- OpenAI Whisper