The Problem

Building bots that work across multiple messaging platforms like Telegram, Discord, and WhatsApp is a headache. Each has its own API quirks, authentication flow, and message formats. Add in multi-agent logic, reasoning, and memory, and suddenly you're drowning in glue code and spaghetti logic. Oh, and let’s not forget scaling—good luck without a solid architecture.

What This Does

ClawSwarm is a lighter, more focused version of OpenClaw, designed for multi-agent systems. It compiles to Rust (because performance matters) and is built on the Swarms framework, which handles the heavy lifting for agent-based communication. At its core, it provides unified messaging across Telegram, Discord, and WhatsApp, with optional reasoning via Claude (if you're fancy like that).

The key entry points live in clawswarm/: clawswarm/api/server.py: The gRPC gateway that ties it all together. clawswarm/agent/main.py: Where the agent logic kicks off. clawswarm/gateway/adapters/: Platform-specific adapters for Telegram, Discord, and WhatsApp.

Configuration is straightforward: use the .env.example file to set up API keys and platform credentials. No platform’s credentials? No problem—it just won’t start that adapter. The Dockerfile makes deployment a breeze, and the gRPC gateway ensures messages flow seamlessly (sorry, I mean "properly") between agents and platforms.

Real-World Use

Let’s say you’re building a customer support bot for Telegram and WhatsApp, but you also want it to ping your team on Discord when it can’t answer something. With ClawSwarm, you’d: Configure your platform credentials in .env. Write your agent’s logic in clawswarm/agent/main.py, using tools like clawswarm.tools.claudecodetool for reasoning or clawswarm.tools.webscraper for pulling live data. Run the app via Docker (docker-compose is your friend here) or straight Python.

Here’s a basic example of adding a custom tool to your agent:

Now your bot can call custom_tool whenever it needs to process text.

The Bottom Line

ClawSwarm is great if you need multi-platform bots with multi-agent logic. The unified API and gRPC gateway save you from writing boilerplate for every messaging platform. That said, the lack of version-pinned dependencies in requirements.txt might bite you in production—pin them yourself. If you're running a small personal project, this might be overkill. But for teams or production-ready bots? It’s worth a look.