eugineous/moltbot-sandbox
Experimental TypeScript project running OpenClaw AI assistant on Cloudflare Workers sandbox containers with multi-channel support and serverless deployment
Originally published:
OpenClaw Sandbox: AI Assistant on Cloudflare Workers
The moltbot-sandbox project by eugineous represents an experimental proof-of-concept that demonstrates running OpenClaw (formerly Moltbot, formerly Clawdbot) as a personal AI assistant entirely within Cloudflare's serverless infrastructure. Built with TypeScript and leveraging Cloudflare Workers' sandbox containers, this implementation offers a fully managed, always-on deployment alternative to traditional self-hosting approaches.
This project is explicitly labeled as experimental and not officially supported, making it ideal for developers comfortable with bleeding-edge technology who want to explore serverless AI assistant deployments without managing their own infrastructure.
cloudflare-workersKey Features and Capabilities
OpenClaw brings several powerful features to the table as a personal AI assistant with a unique gateway architecture:
- Control UI: A web-based chat interface accessible through the gateway, providing immediate interaction with your AI assistant
- Multi-channel support: Native integration with popular platforms including Telegram, Discord, and Slack
- Device pairing: Secure direct message authentication requiring explicit approval, ensuring only authorized devices can access your assistant
- Persistent conversations: Chat history and context preservation across sessions when configured with R2 storage
- Agent runtime: Extensible AI capabilities powered by workspace and skills architecture
The moltbot-sandbox implementation packages these features to run in a Cloudflare Sandbox container, with optional R2 storage enabling data persistence across container restarts—a critical feature for maintaining conversation history and device pairings.
anthropic-claudeTechnical Stack and Architecture
The project is built entirely in TypeScript and runs on Cloudflare's Workers platform, specifically utilizing their sandbox container feature available on the Workers Paid plan ($5/month minimum). The architecture leverages several Cloudflare services:
- Cloudflare Workers: Serverless execution environment hosting the application
- Cloudflare Sandbox: Containerized runtime using standard-1 instances (1/2 vCPU, 4 GiB memory, 8 GB disk)
- Cloudflare Access: Authentication layer protecting the admin UI and API endpoints
- Browser Rendering: Enables browser navigation capabilities for the AI agent
- AI Gateway: Optional routing and analytics layer for API calls
- R2 Storage: Optional object storage for persistence
The project uses modern development tools including Vite for building, Vitest for testing, and includes Dockerfile support. Configuration is managed through wrangler.jsonc, Cloudflare's Workers configuration format.
cloudflare-deploymentInstallation and Setup Process
Getting started with moltbot-sandbox requires several steps, though the documentation provides clear guidance. After installing dependencies with npm, developers must configure API access either through direct Anthropic API keys or Cloudflare's AI Gateway unified billing system. A critical security step involves generating a gateway token using OpenSSL for remote access authentication.
Deployment is straightforward via npm run deploy, but the first request can take 1-2 minutes while the container initializes. However, before the Control UI becomes functional, administrators must complete two essential configuration steps: setting up Cloudflare Access to protect administrative endpoints and pairing devices through the admin interface at /_admin/.
The Cloudflare Access setup involves enabling protection on the workers.dev domain, configuring identity providers, and setting the CF_ACCESS_TEAM_DOMAIN and CF_ACCESS_AUD secrets. This security layer ensures only authorized users can access device management and API endpoints.
Cost Considerations
The project includes detailed cost transparency, which is refreshing for a cloud-based solution. Running the container 24/7 with a standard-1 instance generates approximately $34.50/month in total costs:
- Memory (4 GiB provisioned): ~$26/month
- CPU (at ~10% utilization): ~$2/month
- Disk (8 GB): ~$1.50/month
- Workers Paid plan: $5/month base fee
Importantly, the documentation notes that CPU billing is usage-based, not capacity-based, and suggests configuring SANDBOX_SLEEP_AFTER to reduce costs when idle. With proper sleep configuration, costs can drop to approximately $5-6/month in compute costs beyond the base plan fee for containers running only 4 hours daily.
Community and Development Status
As of February 2024, the repository shows minimal community engagement with 0 stars, 0 forks, and 0 open issues. The project was last updated on February 7, 2026, with one commit in its history. This suggests it's in very early stages or serves primarily as a personal implementation rather than a community-driven project.
The repository is licensed under Apache-2.0, providing permissive terms for modification and distribution. The presence of CONTRIBUTING.md and AGENTS.md files indicates intention for collaboration and documentation of agent capabilities, though active community participation hasn't materialized yet.
ai-assistantsComparison with Alternatives
Compared to traditional AI assistant deployments that require dedicated servers or container orchestration platforms like Kubernetes, moltbot-sandbox offers a serverless alternative with automatic scaling and managed infrastructure. The Cloudflare Workers approach eliminates concerns about server maintenance, operating system updates, and availability monitoring.
However, the experimental nature and lack of official support distinguishes this from production-ready solutions like hosted AI assistant services or established self-hosted frameworks. The cost structure may also be higher than minimal VPS deployments for users with consistent, predictable workloads, though it offers better cost efficiency for intermittent usage patterns when combined with sleep configurations.
For developers already invested in the Cloudflare ecosystem or those seeking serverless AI assistant deployments, moltbot-sandbox provides an interesting architectural reference, even if community adoption remains limited.
Original Source
https://github.com/eugineous/moltbot-sandbox
Last updated: