Skip to main content
Project 5 min read

phonkywear-oss/moltbot-sandbox

OpenClaw AI assistant running on Cloudflare Workers. Multi-platform chat support, persistent conversations, secure device pairing. TypeScript-based serverl

Originally published:

GitHub by phonkywear-oss

OpenClaw AI Assistant on Cloudflare Workers: A Technical Review

The moltbot-sandbox project by phonkywear-oss represents an experimental deployment of OpenClaw (formerly Moltbot, formerly Clawdbot) as a personal AI assistant running entirely within Cloudflare's serverless infrastructure. This proof-of-concept demonstrates the viability of hosting a full-featured AI gateway with persistent conversations, multi-platform support, and extensible capabilities without traditional server hosting.

Project Overview and Key Features

OpenClaw is architected as a gateway-based AI assistant that connects to multiple chat platforms while maintaining a centralized control interface. The moltbot-sandbox implementation packages this into a Cloudflare Sandbox container, offering several compelling features:

  • Web-based Control UI - A browser-accessible chat interface served directly from the Cloudflare Worker
  • Multi-channel Integration - Native support for Telegram, Discord, and Slack communication platforms
  • Device Pairing System - Secure DM authentication requiring explicit administrator approval before devices can interact with the assistant
  • Persistent Conversations - Optional R2 storage integration maintains chat history and context across container restarts
  • Extensible Agent Runtime - Built-in workspace and skills system for expanding AI capabilities
  • Browser Rendering - Leverages Cloudflare's Browser Rendering API for web navigation tasks

The project is released under the Apache-2.0 license and uses TypeScript as its primary language, providing type safety and modern JavaScript features throughout the codebase.

cloudflare-workers

Installation and Setup Process

Deploying moltbot-sandbox requires a Cloudflare Workers Paid plan ($5/month minimum) to access Sandbox container functionality. The setup process involves several critical steps:

First, developers must configure API access by either providing a direct Anthropic API key for Claude model access or utilizing Cloudflare AI Gateway's Unified Billing feature. The AI Gateway option offers additional benefits including request routing, analytics, and centralized billing across multiple AI providers.

Security is paramount in the setup process. The installation requires generating a gateway token using OpenSSL for secure remote access to the Control UI. More importantly, administrators must configure Cloudflare Access to protect the administrative interface at /_admin/. This involves enabling Access on the workers.dev domain, configuring identity providers (email, Google, GitHub, etc.), and setting the appropriate secrets for JWT validation.

The device pairing workflow ensures that only explicitly approved devices can interact with the assistant, preventing unauthorized access even if the gateway token is compromised. This multi-layer security approach makes the system suitable for handling sensitive personal or business communications.

anthropic-claude

Technology Stack Analysis

The moltbot-sandbox project leverages a modern TypeScript-based stack optimized for the Cloudflare ecosystem:

  • Runtime Environment - Cloudflare Workers with Sandbox container support (standard-1 instance: 1/2 vCPU, 4 GiB memory, 8 GB disk)
  • Build Tooling - Vite for development and bundling, with Vitest for testing
  • Code Quality - Oxlint and Oxfmt configuration files indicate usage of next-generation Rust-based JavaScript tooling
  • Storage Layer - Optional Cloudflare R2 for persistent data across restarts
  • Authentication - Cloudflare Access for zero-trust security
  • AI Integration - Anthropic Claude via direct API or Cloudflare AI Gateway

The Dockerfile indicates container-based deployment capabilities, while the start-openclaw.sh script suggests streamlined startup procedures. The presence of wrangler.jsonc confirms this is a properly configured Cloudflare Workers project with all necessary bindings and settings.

cloudflare-ai-gateway

Cost Considerations

The project documentation provides transparent cost estimates for 24/7 operation. Running a standard-1 container continuously costs approximately $34.50/month, breaking down to roughly $26/mo for memory, $2/mo for CPU (at 10% utilization), $1.50/mo for disk, plus the $5/mo Workers Paid plan fee.

Importantly, the project supports a SANDBOX_SLEEP_AFTER configuration option that allows the container to sleep during idle periods. For users requiring only intermittent access (e.g., 4 hours/day), costs can drop to approximately $10-11/month total. This makes it significantly more affordable than traditional always-on VPS hosting while maintaining the benefits of serverless infrastructure.

Community and Development Status

As a newly published project (last updated February 2026), moltbot-sandbox currently shows 0 stars, 0 forks, and 0 open issues. The repository is actively maintained with recent commits and is not archived. While the limited community engagement suggests an early-stage project, the comprehensive documentation and production-ready security features indicate serious intent.

The presence of CONTRIBUTING.md and AGENTS.md files, along with organized test directories (test/e2e) and skills folders (skills/cloudflare-browser), demonstrates a well-structured codebase ready for community contributions.

ai-assistant-frameworks

Comparison with Alternatives

Traditional AI assistant deployments typically require maintaining server infrastructure, managing Docker containers, or relying on third-party hosting services. Moltbot-sandbox differentiates itself by:

  • Serverless-First Architecture - No server management, automatic scaling, and pay-per-use billing
  • Edge Deployment - Cloudflare's global network ensures low-latency responses worldwide
  • Integrated Security - Native Cloudflare Access integration eliminates the need for separate authentication systems
  • Cost Transparency - Predictable pricing with detailed cost breakdowns and optimization options

Compared to hosted AI assistant services, this self-hosted approach provides complete data control, customization freedom, and potentially lower costs for moderate usage patterns. However, it requires more technical expertise to deploy and maintain.

Final Assessment

The moltbot-sandbox project successfully demonstrates that sophisticated AI assistants can run effectively on serverless infrastructure. While explicitly marked as experimental and unsupported, the comprehensive documentation, robust security features, and thoughtful cost optimization options suggest a viable path for developers seeking self-hosted AI solutions without traditional server management burdens. The TypeScript codebase and modern tooling make it accessible for developers familiar with the JavaScript ecosystem, though the Cloudflare-specific configuration may present a learning curve for newcomers.

Share:

Original Source

https://github.com/phonkywear-oss/moltbot-sandbox

View Original

Last updated: