Building a Persistent File System for AI Agents on Cloudflare Durable Objects

2 months ago 高效码农

Adding a Persistent Virtual Filesystem to Cloudflare Durable Objects with @cloudflare/computer How to build a persistent file system for AI agents inside Cloudflare Durable Objects (DO) and let them execute commands directly. @cloudflare/computer wraps a Virtual File System (VFS) on top of the DO’s SQLite storage and plugs into multiple code and command execution backends. The toolkit is currently in preview, APIs may shift, and it works well for prototyping and exploration. Installation and Minimal Setup for File Storage Only How to give a DO file read and write capabilities that survive restarts as quickly as possible. Run npm install …

Building a Global AI Gateway: How Cloudflare Workers Solve Regional Restrictions for Gemini & Imagen

1 years ago 高效码农

Building a Robust Serverless AI Proxy with Cloudflare Workers In today’s fast-paced digital landscape, developers and data scientists need seamless, reliable access to state-of-the-art AI models. Yet, regional restrictions, API key security concerns, and latency issues often stand in the way. Enter Cloudflare Workers: a serverless solution that empowers you to deploy an edge-based AI proxy, bridging the gap between your users and Google’s Gemini and Imagen models. This post walks you through setting up a secure, high-performance Cloudflare Worker that forwards requests to Gemini for text generation and Imagen for image creation—no VPN required. Table of Contents Why Use …