Exciting news for AI enthusiasts. Modbot, also known as OpenClaw, can now be deployed on Cloudflare Workers.
For those unfamiliar, Modbot is a powerful personal AI agent. It operates with system-level access and persistent memory, allowing it to perform a wide array of tasks. This innovative software has captured the attention of developers everywhere. While many run it on dedicated home lab hardware, that’s no longer a necessity. You can now securely host your own Modbot instance on Cloudflare Workers, eliminating the need for purchasing and maintaining physical hardware.
Its capabilities are extensive.
- Browsing the web.
- Reading and responding to emails.
- Integrating with various services.
- Interacting through chat applications like WhatsApp, Telegram, Slack, and Signal.
A New Way to Deploy Modbot
This article will guide you through the process of deploying Modbot to your own Cloudflare account.
Note: A Cloudflare Workers paid plan (starting at $5/month) is required for this setup. This is because the deployment relies on Sandboxed Workers, a feature currently in beta and available on the paid tier. If you’re already a subscriber, there’s no extra cost.
The Technical Architecture
The core of this solution involves running Modbot inside Cloudflare’s sandboxed container environment. It’s a robust architecture. Let’s break down the key components that make this possible.
1. AI Gateway for Model Flexibility AI access is managed through Cloudflare’s AI Gateway. This is a fantastic feature because it provides the flexibility to connect your Modbot instance with a variety of AI providers, including:
- Anthropic
- OpenAI
- Gemini
- Open-source models like Llama and Mistral
2. Sandboxed Containers for Execution The entire backend process is powered by Sandboxed Workers. These are serverless instances of Cloudflare Containers, providing a secure and isolated environment for Modbot to run.
3. R2 for Persistent Storage By nature, containers are stateless. To give Modbot the ability to remember conversations and manage its workspace for file operations, persistent storage is crucial. This is achieved using Cloudflare R2, which provides the necessary statefulness.
4. Browser Rendering for Web Interaction One of Modbot’s key features is its ability to browse the web. This functionality is enabled by integrating with Cloudflare’s Browser Rendering service. This provides a browser-in-the-cloud, allowing the Modbot instance to open pages, browse websites, take screenshots, and perform any action you would in a local browser.
5. Zero Trust for Secure Access Security is paramount. The entire setup is built with a security-first mindset, leveraging Cloudflare’s Zero Trust platform. This ensures that only you, and individuals you explicitly grant permission to, can interact with your Modbot instance.
Getting Started: Deploy Your Own Instance
To get this running on your own account, a GitHub repository has been prepared with all the necessary instructions. You can find it at github.com/cloudflare/motalker.
Following the steps in the repository’s README.md file will deploy your own instance to a unique worker subdomain, such as your-agent.sandbox.cloudflare.workers.dev. Once deployed, you’ll have access to a control UI where you can interact with your agent. For example, you can run commands directly from the interface to check its status:
/status
This will return information about the running agent, confirming it’s active and ready for tasks.
The deployment also includes instructions for integrating your agent with chat applications. Imagine conversing with your personal AI agent directly from WhatsApp, with all the processing happening securely in the cloud. It’s a powerful way to stay connected to your agent on the go.
A Secure and Accessible AI Agent
This approach makes running a personal AI agent more accessible and secure than ever. By leveraging the Cloudflare ecosystem, you can deploy a powerful Modbot instance without the overhead of managing physical hardware. It’s a fantastic solution for anyone with a Workers paid plan looking to explore the world of personal AI agents.