Introduction
OpenClaw's architecture makes it suitable for a wide range of applications, from personal AI assistants to enterprise-grade multi-channel support desks. This lesson explores four concrete use cases that demonstrate OpenClaw's flexibility. Each scenario shows how the core concepts (Gateway, Channels, Agents, Sessions) come together in practice.
Key Concepts
- Personal AI Assistant: A single-user setup where one agent serves you across multiple chat platforms
- Team Coding Bot: A shared agent that helps a development team with code reviews, debugging, and documentation via their preferred chat tool
- Automated Workflows: Event-driven agents that respond to messages with automated actions like deployments, alerts, or data processing
- Multi-Channel Support Desk: A customer-facing setup where multiple agents handle support requests across several platforms simultaneously
Real World Context
A small SaaS company has customers reaching out on WhatsApp, Discord, and their website's live chat. Each platform currently has its own bot with duplicated logic. Bugs fixed in the Discord bot do not get ported to WhatsApp. Response quality varies across channels. By switching to OpenClaw, the company unifies all channels through a single Gateway with shared agent logic, ensuring consistent responses regardless of where the customer writes.
Deep Dive
Use Case 1: Personal AI Assistant on WhatsApp
You want a coding assistant that you can message from your phone at any time. You set up OpenClaw on a small VPS and connect it to WhatsApp.
json{ "gateway": { "port": 18789 }, "channels": { "whatsapp": { "enabled": true, "phoneNumberId": "${WHATSAPP_PHONE_ID}", "accessToken": "${WHATSAPP_ACCESS_TOKEN}" } }, "agents": { "assistant": { "model": "anthropic:claude-sonnet-4-20250514", "systemPrompt": "You are my personal coding assistant. Help me write code, debug issues, and explain concepts. Be concise.", "tools": ["code-executor"], "memory": { "enabled": true, "maxMessages": 100 } } } }
This configuration creates a minimal setup: one channel (WhatsApp), one agent (assistant), and generous memory (100 messages). When you send a WhatsApp message, the Gateway receives it, creates or resumes a Session, and passes the message to the assistant agent. The agent uses Claude Sonnet with a code-executor tool to run code snippets you send and returns the results directly to your WhatsApp chat.
Use Case 2: Team Coding Bot on Discord
Your development team uses Discord. You want a bot that can help with code reviews, answer architecture questions, and look up documentation.
json{ "gateway": { "port": 18789 }, "channels": { "discord": { "enabled": true, "token": "${DISCORD_BOT_TOKEN}", "allowedGuilds": ["${DISCORD_GUILD_ID}"] } }, "agents": { "code-reviewer": { "model": "anthropic:claude-sonnet-4-20250514", "systemPrompt": "You are a senior code reviewer. Analyze code for bugs, performance issues, and best practice violations. Be thorough but constructive.", "tools": ["github-api", "code-analyzer"], "memory": { "enabled": true, "maxMessages": 30 } } } }
This configuration restricts the Discord channel to a specific guild (server) for security. The code-reviewer agent has access to GitHub API and code analyzer tools, letting it pull repository data and perform static analysis when team members paste code or share PR links.
Use Case 3: Automated Workflows via Telegram
You want a Telegram bot that triggers deployments, monitors server health, and sends alerts. This is less about conversation and more about command-and-response automation.
json{ "gateway": { "port": 18789 }, "channels": { "telegram": { "enabled": true, "token": "${TELEGRAM_BOT_TOKEN}", "allowedUsers": ["${ADMIN_TELEGRAM_ID}"] } }, "agents": { "devops": { "model": "openai:gpt-4o-mini", "systemPrompt": "You are a DevOps automation agent. Execute deployment commands, check server status, and report alerts. Only perform actions when explicitly asked.", "tools": ["ssh-executor", "docker-api", "health-checker"], "memory": { "enabled": false } } } }
This configuration locks the Telegram channel to a single admin user for security. The devops agent has powerful tools (SSH, Docker, health checks) but memory is disabled because each command is independent. When you type "/deploy staging" in Telegram, the agent executes the deployment pipeline and reports back the results.
Use Case 4: Multi-Channel Support Desk
Your company handles customer support across WhatsApp, Discord, and a WebChat widget on your website. Different agents handle different types of questions.
json{ "gateway": { "port": 18789 }, "channels": { "whatsapp": { "enabled": true, "phoneNumberId": "${WHATSAPP_PHONE_ID}", "accessToken": "${WHATSAPP_ACCESS_TOKEN}" }, "discord": { "enabled": true, "token": "${DISCORD_BOT_TOKEN}" }, "webchat": { "enabled": true, "corsOrigins": ["https://yourcompany.com"] } }, "agents": { "triage": { "model": "openai:gpt-4o-mini", "systemPrompt": "You are the first point of contact. Classify the customer's issue and route to the appropriate specialist agent.", "tools": ["agent-router"] }, "billing": { "model": "anthropic:claude-sonnet-4-20250514", "systemPrompt": "You handle billing and subscription questions. You can look up account details and process refunds.", "tools": ["billing-api", "account-lookup"] }, "technical": { "model": "anthropic:claude-sonnet-4-20250514", "systemPrompt": "You handle technical support. Help customers troubleshoot issues with our product.", "tools": ["knowledge-base", "log-viewer"] } } }
This configuration demonstrates multi-agent routing. The triage agent receives all incoming messages first and uses the agent-router tool to forward the conversation to either the billing or technical agent based on the customer's question. This works identically whether the customer writes on WhatsApp, Discord, or the website chat widget.
Common Pitfalls
- Giving automation agents too much power without access controls: Always restrict powerful tools (SSH, deployment) to specific authorized users via the channel's
allowedUserssetting. - Using the same agent for vastly different tasks: Specialized agents with focused system prompts perform better than a single generic agent trying to do everything.
- Forgetting that sessions are channel-scoped: If a customer starts on WhatsApp and switches to webchat, they get a new session. Plan for this in your support workflow.
Best Practices
- Use a triage agent for customer-facing setups: Let a lightweight agent classify and route messages rather than having one agent handle all topics.
- Match model power to task complexity: Use a lightweight model like GPT-4o-mini for simple routing and classification, and a powerful model like Claude Sonnet for tasks requiring deep reasoning.
- Restrict channel access in sensitive scenarios: Use
allowedUsersorallowedGuildsto control who can interact with powerful agents.
Summary
- Personal AI assistants use a single channel and agent for on-the-go coding help
- Team coding bots leverage Discord integration with specialized tools for code review and documentation
- Automated workflow bots use Telegram with restricted access for DevOps commands and monitoring
- Multi-channel support desks combine multiple channels with a triage agent that routes to specialist agents
- OpenClaw's consistent architecture means the same agent logic works across all platforms without modification