Cloudflare Moltworker: AI Agents Without Dedicated Hardware
Moltworker is a new middleware and set of adapted scripts that allows developers to run Moltbot—an open-source, self-hosted AI personal assistant—on Cloudflare's platform instead of requiring dedicated Mac mini hardware. The solution combines a Worker entry point that acts as an API router with Cloudflare's Sandbox, Browser Rendering, and R2 storage services to create a fully managed AI agent infrastructure.
How It Works
Moltworker architecture consists of:
- Entry-point Worker: Routes API requests and proxies communications between Cloudflare APIs and the isolated environment
- Sandbox Container: Runs the standard Moltbot Gateway runtime and its integrations
- R2 Storage: Provides persistent object storage
- AI Gateway: Manages AI provider integrations with support for Bring Your Own Key (BYOK) and Unified Billing
- Cloudflare Access: Secures the entire stack with authentication and authorization
Node.js Compatibility Milestone
This announcement highlights a significant achievement: Cloudflare Workers now achieves 98.5% compatibility with the top 1,000 npm packages. An internal experiment testing the most popular npm packages in Workers found that only 15 packages genuinely failed to work (excluding build tools, CLI tools, and browser-only packages). This improvement stems from native support for Node.js APIs, including node:fs, reducing reliance on workarounds like memfs and enabling easier maintenance of critical dependencies like Playwright.
Developer Impact
Developers can now run complex AI applications directly on Cloudflare's global network without provisioning separate hardware. The platform automatically scales and benefits from Cloudflare's security and performance infrastructure. Integration with popular AI providers through AI Gateway and support for Bring Your Own Key secrets management simplifies credential handling.
Next steps: Developers interested in running Moltbot on Cloudflare should visit the Moltworker GitHub repository for setup instructions and deployment guides.