Lesson 4 of 4
Testing & Deploying
Estimated time: 5 minutes
Testing & Deploying
Your assistant has a personality and is connected to multiple platforms. Before you go live, let's run structured tests, set up monitoring, and make sure everything holds up under real-world conditions.
Pre-Deployment Testing
Run the cross-platform test suite
OpenClaw has a built-in test runner that sends messages across all connected channels and validates responses:
openclaw test run --suite cross-platformThis sends a set of standard messages to each channel and checks:
- Response time (should be under 5 seconds)
- Personality consistency (matches system prompt)
- Platform-specific formatting (no broken markdown, etc.)
Running cross-platform tests...
✓ telegram — greeting (1.2s)
✓ telegram — knowledge (1.8s)
✓ telegram — fallback (1.4s)
✓ slack — greeting (1.1s)
✓ slack — knowledge (1.6s)
✓ slack — fallback (1.3s)
✓ whatsapp — greeting (2.1s)
✓ whatsapp — knowledge (2.4s)
✓ whatsapp — fallback (1.9s)
9/9 passed (0 failures)
Average response time: 1.6s
Fix failures before deploying
If any test fails, check the specific platform connection and your system prompt. Common issues: expired tokens, overly restrictive content filters, or network timeouts.
Test edge cases manually
Automated tests cover the basics. You should also test these manually:
Send a sequence of related messages to test context retention:
Message 1: "I'd like to order a birthday cake"
Message 2: "Chocolate please"
Message 3: "For Saturday"
The assistant should remember the cake order context across messages and not ask you to repeat information.
Send an image (like a cake design reference) on each platform. The assistant should:
- Acknowledge it received an image
- Respond appropriately (e.g., "That's a beautiful design! We can definitely do something similar.")
- Not crash or ignore the message
Send 5-10 messages in quick succession on one platform. The assistant should:
- Respond to each one (no dropped messages)
- Not mix up conversation contexts
- Stay under 5-second response time
Send a very long message (500+ words). The assistant should:
- Process it without timing out
- Respond to the actual content, not just the first few sentences
- Keep its response concise despite the long input
Set up health monitoring
Configure alerts so you know immediately if something breaks:
openclaw monitor setup \
--check-interval 60 \
--alert-on disconnect \
--alert-on error-rate 10 \
--alert-channel slack \
--alert-to "#ops"
| Flag | Purpose |
|---|---|
--check-interval 60 | Check every 60 seconds |
--alert-on disconnect | Alert if any channel disconnects |
--alert-on error-rate 10 | Alert if >10% of messages result in errors |
--alert-channel slack | Send alerts to Slack |
--alert-to "#ops" | Deliver to the #ops channel |
You can also send alerts to email or any other connected channel.
Verify monitoring is active:
openclaw monitor statusConfigure rate limits
Protect your assistant from abuse or accidental message floods:
openclaw agent config \
--rate-limit 30/min/user \
--rate-limit-message "You're sending messages too quickly! Please wait a moment and try again."
| Use Case | Limit | Why |
|---|---|---|
| Customer support | 30/min/user | Prevents spam while allowing normal conversations |
| Internal team bot | 60/min/user | Teams send more rapid-fire messages |
| Public community | 10/min/user | Tighter limits for open communities |
Go live
Everything tested? Monitoring in place? Time to deploy:
openclaw deploy --confirmThis locks your current configuration as the production version. Your assistant is now live across all connected platforms.
Deploying assistant...
✓ System prompt loaded
✓ Channels verified (3 connected)
✓ Rate limits configured
✓ Monitoring active
🟢 Assistant is LIVE
Channels:
WhatsApp — +1 (555) 123-4567
Telegram — @SunnyBakeryBot
Slack — #customer-support
Rollback if needed
If something goes wrong after deployment, you can instantly revert to the previous configuration:
openclaw deploy rollbackThis restores the previous system prompt, rate limits, and channel configuration.
Post-Launch Checklist
Keep an eye on these metrics for the first week:
- Response time — should stay under 5 seconds on average
- Error rate — should be under 1%
- Fallback rate — how often the bot can't answer (tune your knowledge if >20%)
- User satisfaction — read real conversations, note where the bot falls short
openclaw analytics --range 7d --summaryWhat You've Built
Congratulations! You now have a production multi-channel AI assistant that:
- Runs everywhere — WhatsApp, Telegram, Slack, Discord (or any combination)
- Sounds consistent — same personality and knowledge across all platforms
- Handles edge cases — fallback messages, rate limits, blocked topics
- Self-monitors — alerts you when something breaks
- Can be rolled back — instant revert if anything goes wrong
Where to Go Next
Connect your assistant to external data sources (product catalog, FAQ database, order system) using OpenClaw skills:
Morning Briefing Course
Learn how to connect external data sources and APIs to your OpenClaw agent.
/courses/01-morning-briefing
What should you do FIRST if your assistant starts giving incorrect responses after deployment?
Advanced Message Routing Across Channels
# Routing Like a Pro with OpenClaw Multi-channel routing is the backbone of a sophisticated AI agent infrastructure. It allows you to direct information flow based on origin, sender, and content, ens...