Openclaw

Connect Openclaw's multi-channel gateway to BitRouter for unified routing

Openclaw Integration

Quick Start

# 1. Start BitRouter
bitrouter serve

# 2. Install Openclaw plugin
openclaw plugins install bitrouter

# 3. Configure and launch
openclaw config set provider bitrouter
openclaw start --provider bitrouter

What You Get

  • 20+ messaging platforms - WhatsApp, Telegram, Slack, Discord, etc.
  • Multi-provider routing - Optimize models per platform
  • Native plugin support - Seamless BitRouter integration
  • Isolated workspaces - Separate contexts per channel
  • Cost tracking - Monitor spending across all platforms

Installation

Prerequisites

# Install Openclaw
npm install -g openclaw@latest

# Quick setup
openclaw onboard --install-daemon

Connect to BitRouter

Choose your method:

openclaw plugins install bitrouter
openclaw config set provider bitrouter
openclaw config set bitrouter.url http://localhost:8787
openclaw start

Option 2: ACP Integration

openclaw config set protocol acp
openclaw config set acp.endpoint http://localhost:8787
openclaw acp

Option 3: Direct API

openclaw config set api.base http://localhost:8787
openclaw start

Essential Configuration

Platform-Specific Routing

# ~/.bitrouter/config.yaml
routes:
  # WhatsApp - conversational
  - match: "openclaw/whatsapp/*"
    provider: anthropic
    model: claude-3-5-haiku-latest
    options:
      temperature: 0.8
    
  # Slack - professional
  - match: "openclaw/slack/*"
    provider: openai
    model: gpt-4o
    options:
      temperature: 0.3
    
  # Discord - community
  - match: "openclaw/discord/*"
    provider: deepseek
    model: deepseek-chat
    
  # Telegram - quick
  - match: "openclaw/telegram/*"
    provider: google
    model: gemini-2.0-flash-exp

Workspace Isolation

workspaces:
  - name: "enterprise-slack"
    match: "openclaw/slack/enterprise/*"
    provider: anthropic
    model: claude-3-5-sonnet-latest
    guardrails:
      - data_isolation
      - audit_logging
    
  - name: "public-discord"
    match: "openclaw/discord/public/*"
    provider: openai
    model: gpt-4o-mini
    rate_limits:
      requests_per_minute: 10

Skills Integration

skills:
  source: clawhub.ai
  routing:
    - skill: "code-review"
      route: "openclaw/skills/review"
      provider: anthropic
      model: claude-3-5-sonnet-latest
    
    - skill: "debug-assistance"
      route: "openclaw/skills/debug"
      provider: openai
      model: gpt-4o

Common Recipes

Recipe: Multi-Channel Bot

platforms:
  whatsapp:
    route: "openclaw/whatsapp"
    qr_code: true
    
  slack:
    route: "openclaw/slack"
    oauth: true
    
  telegram:
    route: "openclaw/telegram"
    bot_token: true

Recipe: Voice Support

voice:
  wake_word: "hey openclaw"
  transcription:
    route: "openclaw/voice/transcribe"
    model: whisper-large-v3
  synthesis:
    route: "openclaw/voice/synthesize"
    model: tts-1-hd

Recipe: Live Canvas

canvas:
  enabled: true
  route: "openclaw/canvas/*"
  features:
    - collaborative_editing
    - real_time_sync
    - version_control

Platform Setup

WhatsApp Business

# Connect via QR code
openclaw connect whatsapp
# Scan QR code with phone

Slack Integration

# OAuth setup
openclaw connect slack --workspace YOUR_WORKSPACE
# Follow OAuth flow

Discord Bot

# Bot token setup
openclaw connect discord --token YOUR_BOT_TOKEN

Monitoring

Channel Activity

# View all channels
bitrouter dashboard --agent openclaw

# Channel metrics
bitrouter metrics --agent openclaw --channel whatsapp

# Export analytics
bitrouter export analytics --agent openclaw --format csv

Cost Tracking

# Platform breakdown
bitrouter costs breakdown --group-by platform

# Set budgets
bitrouter budget set --platform whatsapp --daily 10
bitrouter budget set --platform slack --daily 50

Troubleshooting

🔴 Connection Issues

# Check BitRouter
curl http://localhost:8787/health

# Verify Openclaw
openclaw config show

# Test connection
openclaw test connection --provider bitrouter

🟡 Platform Failures

# Debug platform
openclaw debug whatsapp

# Check logs
bitrouter logs --filter openclaw

# Verify credentials
openclaw platforms verify

🔵 Message Routing

# Trace message
bitrouter trace --message-id <id>

# Test route
bitrouter routes test "openclaw/whatsapp/message"

# Monitor live
bitrouter monitor --agent openclaw --live

Advanced Features

Multi-Agent Routing

multi_agent:
  - pattern: "openclaw/*/code/*"
    agent: claude-code
  - pattern: "openclaw/*/docs/*"
    agent: opencode

Custom Skills

# Add skill
openclaw skills add custom-skill

# Configure routing
openclaw skills config custom-skill \
  --route "openclaw/skills/custom" \
  --provider "anthropic"

Learn More

How is this guide?

Last updated on

On this page