
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Mon, 13 Apr 2026 14:31:56 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Welcome to Agents Week]]></title>
            <link>https://blog.cloudflare.com/welcome-to-agents-week/</link>
            <pubDate>Sun, 12 Apr 2026 17:01:05 GMT</pubDate>
            <description><![CDATA[ Cloudflare's mission has always been to help build a better Internet. Sometimes that means building for the Internet as it exists. Sometimes it means building for the Internet as it's about to become. 

This week, we're kicking off Agents Week, dedicated to what comes next.
 ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare's mission has always been to help build a better Internet. Sometimes that means building for the Internet as it exists. Sometimes it means building for the Internet as it's about to become. </p><p>Today, we're kicking off Agents Week, dedicated to building the Internet for what comes next.</p>
    <div>
      <h2>The Internet wasn't built for the age of AI. Neither was the cloud.</h2>
      <a href="#the-internet-wasnt-built-for-the-age-of-ai-neither-was-the-cloud">
        
      </a>
    </div>
    <p>The cloud, as we know it, was a product of the last major technological paradigm shift: smartphones.</p><p>When smartphones put the Internet in everyone's pocket, they didn't just add users — they changed the nature of what it meant to be online. Always connected, always expecting an instant response. Applications had to handle an order of magnitude more users, and the infrastructure powering them had to evolve.</p><p>The approach the industry converged on was straightforward: more users, more copies of your application. As applications grew in complexity, teams broke them into smaller pieces — microservices — so each team could control its own destiny. But the core principle stayed the same: a finite number of applications, each serving many users. Scale meant more copies.</p><p>Kubernetes and containers became the default. They made it easy to spin up instances, load balance, and tear down what you didn't need. Under this one-to-many model, a single instance could serve many users, and even as user counts grew into the billions, the number of things you had to manage stayed finite.</p><p>Agents break this.</p>
    <div>
      <h2>One user, one agent, one task</h2>
      <a href="#one-user-one-agent-one-task">
        
      </a>
    </div>
    <p>Unlike every application that came before them, agents are one-to-one. Each agent is a unique instance. Serving one user, running one task. Where a traditional application follows the same execution path regardless of who's using it, an agent requires its own execution environment: one where the LLM dictates the code path, calls tools dynamically, adjusts its approach, and persists until the task is done.</p><p>Think of it as the difference between a restaurant and a personal chef. A restaurant has a menu — a fixed set of options — and a kitchen optimized to churn them out at volume. That's most applications today. An agent is more like a personal chef who asks: what do you want to eat? They might need entirely different ingredients, utensils, or techniques each time. You can't run a personal-chef service out of the same kitchen setup you'd use for a restaurant.</p><p>Over the past year, we've seen agents take off, with coding agents leading the way — not surprisingly, since developers tend to be early adopters. The way most coding agents work today is by spinning up a container to give the LLM what it needs: a filesystem, git, bash, and the ability to run arbitrary binaries.</p><p>But coding agents are just the beginning. Tools like Claude Cowork are already making agents accessible to less technical users. Once agents move beyond developers and into the hands of everyone — administrative assistants, research analysts, customer service reps, personal planners — the scale math gets sobering fast.</p>
    <div>
      <h2>The math on scaling agents to the masses</h2>
      <a href="#the-math-on-scaling-agents-to-the-masses">
        
      </a>
    </div>
    <p>If the more than 100 million knowledge workers in the US each used an agentic assistant at ~15% concurrency, you'd need capacity for approximately 24 million simultaneous sessions. At 25–50 users per CPU, that's somewhere between 500K and 1M server CPUs — just for the US, with one agent per person.</p><p>Now picture each person running several agents in parallel. Now picture the rest of the world with more than 1 billion knowledge workers. We're not a little short on compute. We're orders of magnitude away.</p><p>So how do we close that gap?</p>
    <div>
      <h2>Infrastructure built for agents</h2>
      <a href="#infrastructure-built-for-agents">
        
      </a>
    </div>
    <p>Eight years ago, we launched <a href="https://workers.cloudflare.com/"><u>Workers</u></a> — the beginning of our developer platform, and a bet on containerless, serverless compute. The motivation at the time was practical: we needed lightweight compute without cold-starts for customers who depended on Cloudflare for speed. Built on V8 isolates rather than containers, Workers turned out to be an order of magnitude more efficient — faster to start, cheaper to run, and natively suited to the "spin up, execute, tear down" pattern.</p><p>What we didn't anticipate was how well this model would map to the age of agents.</p><p>Where containers give every agent a full commercial kitchen: bolted-down appliances, walk-in fridges, the works, whether the agent needs them or not, isolates, on the other hand, give the personal chef exactly the counter space, the burner, and the knife they need for this particular meal. Provisioned in milliseconds. Cleaned up the moment the dish is served.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3UM1NukO0Ho4lQAYk5CoU8/30e1376c4fe61e86204a0de92ae4612b/BLOG-3238_2.png" />
          </figure><p>In a world where we need to support not thousands of long-running applications, but billions of ephemeral, single-purpose execution environments — isolates are the right primitive. </p><p>Each one starts in milliseconds. Each one is securely sandboxed. And you can run orders of magnitude more of them on the same hardware compared to containers.</p><p>Just a few weeks ago, we took this further with the <a href="https://blog.cloudflare.com/dynamic-workers/"><u>Dynamic Workers open beta</u></a>: execution environments spun up at runtime, on demand. An isolate takes a few milliseconds to start and uses a few megabytes of memory. That's roughly 100x faster and up to 100x more memory-efficient than a container. </p><p>You can start a new one for every single request, run a snippet of code, and throw it away — at a scale of millions per second.</p><p>For agents to move beyond early adopters and into everyone's hands, they also have to be affordable. Running each agent in its own container is expensive enough that agentic tools today are mostly limited to coding assistants for engineers who can justify the cost. <b>Isolates, by running orders of magnitude more efficiently, are what make per-unit economics viable at the scale agents require.</b></p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6iiD7zACxMNEDdvJWM6zbo/2261c320f3be3cd2fa6ef34593a1ee09/BLOG-3238_3.png" />
          </figure>
    <div>
      <h2>The horseless carriage phase</h2>
      <a href="#the-horseless-carriage-phase">
        
      </a>
    </div>
    <p>While it’s critical to build the right foundation for the future, we’re not there yet. And every paradigm shift has a period where we try to make the new thing work within the old model. The first cars were called "horseless carriages." The first websites were digital brochures. The first mobile apps were shrunken desktop UIs. We're in that phase now with agents.</p><p>You can see it everywhere. </p><p>We're giving agents headless browsers to navigate websites designed for human eyes, when what they need are structured protocols like MCP to discover and invoke services directly. </p><p>Many early MCP servers are thin wrappers around existing REST APIs — same CRUD operations, new protocol — when LLMs are actually far better at writing code than making sequential tool calls. </p><p>We're using CAPTCHAs and behavioral fingerprinting to verify the thing on the other end of a request, when increasingly that thing is an agent acting on someone's behalf — and the right question isn't "are you human?" but "which agent are you, who authorized you, and what are you allowed to do?"</p><p>We're spinning up full containers for agents that just need to make a few API calls and return a result.</p><p>These are just a few examples, but none of this is surprising. It's what transitions look like.</p>
    <div>
      <h2>Building for both</h2>
      <a href="#building-for-both">
        
      </a>
    </div>
    <p>The Internet is always somewhere between two eras. IPv6 is objectively better than IPv4, but dropping IPv4 support would break half the Internet. HTTP/2 and HTTP/3 coexist. TLS 1.2 still hasn't fully given way to 1.3. The better technology exists, the old technology persists, and the job of infrastructure is to bridge both.</p><p>Cloudflare has always been in the business of bridging these transitions. The shift to agents is no different.</p><p>Coding agents genuinely need containers — a filesystem, git, bash, arbitrary binary execution. That's not going away. This week, our container-based sandbox environments are going GA, because we're committed to making them the best they can be. We're going deeper on browser rendering for agents, because there will be a long tail of services that don't yet speak MCP, and agents will still need to interact with them. These aren't stopgaps — they're part of a complete platform.</p><p>But we're also building what comes next: the isolates, the protocols, and the identity models that agents actually need. Our job is to make sure you don't have to choose between what works today and what's right for tomorrow.</p>
    <div>
      <h2>Security in the model, not around it</h2>
      <a href="#security-in-the-model-not-around-it">
        
      </a>
    </div>
    <p>If agents are going to handle our professional and personal tasks — reading our email, operating on our code, interacting with our financial services — then security has to be built into the execution model, not layered on after the fact.</p><p>CISOs have been the first to confront this. The productivity gains from putting agents in everyone's hands are real, but today, most agent deployments are fraught with risk: prompt injection, data exfiltration, unauthorized API access, opaque tool usage. </p><p>A developer's vibe-coding agent needs access to repositories and deployment pipelines. An enterprise's customer service agent needs access to internal APIs and user data. In both cases, securing the environment today means stitching together credentials, network policies, and access controls that were never designed for autonomous software.</p><p>Cloudflare has been building two platforms in parallel: our developer platform, for people who build applications, and our zero trust platform, for organizations that need to secure access. For a while, these served distinct audiences. </p><p>But "how do I build this agent?" and "how do I make sure it's safe?" are increasingly the same question. We're bringing these platforms together so that all of this is native to how agents run, not a separate layer you bolt on.</p>
    <div>
      <h2>Agents that follow the rules</h2>
      <a href="#agents-that-follow-the-rules">
        
      </a>
    </div>
    <p>There's another dimension to the agent era that goes beyond compute and security: economics and governance.</p><p>When agents interact with the Internet on our behalf — reading articles, consuming APIs, accessing services — there needs to be a way for the people and organizations who create that content and run those services to set terms and get paid. Today, the web's economic model is built around human attention: ads, paywalls, subscriptions. </p><p>Agents don't have attention (well, not that <a href="https://arxiv.org/abs/1706.03762"><u>kind of attention</u></a>). They don't see ads. They don't click through cookie banners.</p><p>If we want an Internet where agents can operate freely <i>and</i> where publishers, content creators, and service providers are fairly compensated, we need new infrastructure for it. We’re building tools that make it easy for publishers and content owners to set and enforce policies for how agents interact with their content.</p><p>Building a better Internet has always meant making sure it works for everyone — not just the people building the technology, but the people whose work and creativity make the Internet worth using. That doesn't change in the age of agents. It becomes more important.</p>
    <div>
      <h2>The platform for developers and agents</h2>
      <a href="#the-platform-for-developers-and-agents">
        
      </a>
    </div>
    <p>Our vision for the developer platform has always been to provide a comprehensive platform that just works: from experiment, to MVP, to scaling to millions of users. But providing the primitives is only part of the equation. A great platform also has to think about how everything works together, and how it integrates into your development flow.</p><p>That job is evolving. It used to be purely about developer experience, making it easy for humans to build, test, and ship. Increasingly, it's also about helping agents help humans, and making the platform work not just for the people building agents, but for the agents themselves. Can an agent find the latest most up-to- date best practices? How easily can it discover and invoke the tools and CLIs it needs? How seamlessly can it move from writing code to deploying it?</p><p>This week, we're shipping improvements across both dimensions — making Cloudflare better for the humans building on it and for the agents running on it.</p>
    <div>
      <h2>Building for the future is a team sport</h2>
      <a href="#building-for-the-future-is-a-team-sport">
        
      </a>
    </div>
    <p>Building for the future is not something we can do alone. Every major Internet transition from HTTP/1.1 to HTTP/2 and HTTP/3, from TLS 1.2 to 1.3 — has required the industry to converge on shared standards. The shift to agents will be no different.</p><p>Cloudflare has a long history of contributing to and helping push forward the standards that make the Internet work. We've been <a href="https://blog.cloudflare.com/tag/ietf/"><u>deeply involved in the IETF</u></a> for over a decade, helping develop and deploy protocols like QUIC, TLS 1.3, and Encrypted Client Hello. We were a founding member of WinterTC, the ECMA technical committee for JavaScript runtime interoperability. We open-sourced the Workers runtime itself, because we believe the foundation should be open.</p><p>We're bringing the same approach to the agentic era. We're excited to be part of the Linux Foundation and AAIF, and to help support and push forward standards like MCP that will be foundational for the agentic future. Since Anthropic introduced MCP, we've worked closely with them to build the infrastructure for remote MCP servers, open-sourced our own implementations, and invested in making the protocol practical at scale. </p><p>Last year, alongside Coinbase, we <a href="https://blog.cloudflare.com/x402/"><u>co-founded the x402 Foundation</u></a>, an open, neutral standard that revives the long-dormant HTTP 402 status code to give agents a native way to pay for the services and content they consume. </p><p>Agent identity, authorization, payment, safety: these all need open standards that no single company can define alone.</p>
    <div>
      <h2>Stay tuned</h2>
      <a href="#stay-tuned">
        
      </a>
    </div>
    <p>This week, we're making announcements across every dimension of the agent stack: compute, connectivity, security, identity, economics, and developer experience.</p><p>The Internet wasn't built for AI. The cloud wasn't built for agents. But Cloudflare has always been about helping build a better Internet — and what "better" means changes with each era. This is the era of agents. This week, <a href="https://blog.cloudflare.com/"><u>follow along</u></a> and we'll show you what we're building for it.</p> ]]></content:encoded>
            <category><![CDATA[Agents Week]]></category>
            <category><![CDATA[Agents]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Workers AI]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Serverless]]></category>
            <guid isPermaLink="false">4dZj0C0XnS9BJQnxy2QkzY</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Dane Knecht</dc:creator>
        </item>
        <item>
            <title><![CDATA[Replicate is joining Cloudflare]]></title>
            <link>https://blog.cloudflare.com/replicate-joins-cloudflare/</link>
            <pubDate>Mon, 17 Nov 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ Bringing Replicate’s tools into Cloudflare will continue to make our Workers Platform the best place on the Internet to build and deploy any AI or agentic workflow.
 ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We have some big news to share today: Replicate, the leading platform for running AI models, is joining Cloudflare.</p><p>We first started talking to Replicate because we shared a lot in common beyond just a passion for bright color palettes. Our mission for Cloudflare’s Workers developer platform has been to make building and deploying full-stack applications as easy as possible. Meanwhile, Replicate has been on a similar mission to make deploying AI models as easy as writing a single line of code. And we realized we could build something even better together by integrating the Replicate platform into Cloudflare directly.</p><p>We are excited to share this news and even more excited for what it will mean for customers. Bringing Replicate’s tools into Cloudflare will continue to make our Developer Platform the best place on the Internet to build and deploy any AI or agentic workflow.</p>
    <div>
      <h2>What does this mean for you? </h2>
      <a href="#what-does-this-mean-for-you">
        
      </a>
    </div>
    <p>Before we spend more time talking about the future of AI, we want to answer the questions that are top of mind for Replicate and Cloudflare users. In short: </p><p><b>For existing Replicate users:</b> Your APIs and workflows will continue to work without interruption. You will soon benefit from the added performance and reliability of Cloudflare's global network.</p><p><b>For existing Workers AI users:</b> Get ready for a massive expansion of the model catalog and the new ability to run fine-tunes and custom models directly on Workers AI.</p><p>Now – let’s get back into why we’re so excited about our joint future.</p>
    <div>
      <h2>The AI Revolution was not televised, but it started with open source</h2>
      <a href="#the-ai-revolution-was-not-televised-but-it-started-with-open-source">
        
      </a>
    </div>
    <p>Before AI was AI, and the subject of <i>every</i> conversation, it was known for decades as “machine learning”. It was a specialized, almost academic field. Progress was steady but siloed, with breakthroughs happening inside a few large, well-funded research labs. The models were monolithic, the data was proprietary, and the tools were inaccessible to most developers. Everything changed when the culture of open-source collaboration — the same force that built the modern Internet — collided with machine learning, as researchers and companies began publishing not just their papers, but their model weights and code.</p><p>This ignited an incredible explosion of innovation. The pace of change in just the past few years has been staggering; what was state-of-the-art 18 months ago (or sometimes it feels like just days ago) is now the baseline. This acceleration is most visible in generative AI. </p><p>We went from uncanny, blurry curiosities to photorealistic image generation in what felt like the blink of an eye. Open source models like Stable Diffusion unlocked immediate creativity for developers, and that was just the beginning. If you take a look at Replicate’s model catalog today, you’ll see thousands of image models of almost every flavor, each iterating on the previous. </p><p>This happened not just with image models, but video, audio, language models and more…. </p><p>But this incredible, community-driven progress creates a massive practical challenge: How do you actually <i>run</i> these models? Every new model has different dependencies, requires specific GPU hardware (and enough of it), and needs a complex serving infrastructure to scale. Developers found themselves spending more time fighting with CUDA drivers and requirements.txt files than actually building their applications.</p><p>This is exactly the problem Replicate solved. They built a platform that abstracts away all that complexity (using their open-source tool <a href="https://github.com/replicate/cog"><u>Cog</u></a> to package models into standard, reproducible containers), letting any developer or data scientist run even the most complex open-source models with a simple API call. </p><p>Today, Replicate’s catalog spans more than 50,000 open-source models and fine-tuned models. While open source unlocked so many possibilities, Replicate’s toolset goes beyond that to make it possible for developers to access any models they need in one place. Period. With their marketplace, they also offer seamless access to leading proprietary models like GPT-5 and Claude Sonnet, all through the same unified API.</p><p>What’s worth noting is that Replicate didn't just build an inference service; they built a <b>community</b>. So much innovation happens through being inspired by what others are doing, iterating on it, and making it better. Replicate has become the definitive hub for developers to discover, share, fine-tune, and experiment with the latest models in a public playground. </p>
    <div>
      <h2>Stronger together: the AI catalog meets the AI cloud</h2>
      <a href="#stronger-together-the-ai-catalog-meets-the-ai-cloud">
        
      </a>
    </div>
    <p>Coming back to the Workers Platform mission: Our goal all along has been to enable developers to build full-stack applications without having to burden themselves with infrastructure. And while that hasn’t changed, AI has changed the requirements of applications.</p><p>The types of applications developers are building are changing — three years ago, no one was building agents or creating AI-generated launch videos. Today they are. As a result, what they need and expect from the cloud, or the <b>AI cloud</b>, has changed too.</p><p>To meet the needs of developers, Cloudflare has been building the foundational pillars of the AI Cloud, designed to run inference at the edge, close to users. This isn't just one product, but an entire stack:</p><ul><li><p><b>Workers AI:</b> Serverless GPU inference on our global network.</p></li><li><p><b>AI Gateway:</b> A control plane for caching, rate-limiting, and observing any AI API.</p></li><li><p><b>Data Stack:</b> Including Vectorize (our vector database) and R2 (for model and data storage).</p></li><li><p><b>Orchestration:</b> Tools like AI Search (formerly Autorag), Agents, and Workflows to build complex, multi-step applications.</p></li><li><p><b>Foundation:</b> All built on our core developer platform of Workers, Durable Objects, and the rest of our stack.</p></li></ul><p>As we’ve been helping developers scale up their applications, Replicate has been on a similar mission — to make deploying AI models as easy as deploying code. This is where it all comes together. Replicate brings one of the industry's largest and most vibrant <b>model catalog and developer community</b>. Cloudflare brings an incredibly performant <b>global network and serverless inference platform</b>. Together, we can deliver the best of both worlds: the most comprehensive selection of models, runnable on a fast, reliable, and affordable inference platform.</p>
    <div>
      <h2>Our shared vision</h2>
      <a href="#our-shared-vision">
        
      </a>
    </div>
    
    <div>
      <h3>For the community: the hub for AI exploration</h3>
      <a href="#for-the-community-the-hub-for-ai-exploration">
        
      </a>
    </div>
    <p>The ability to share models, publish fine-tunes, collect stars, and experiment in the playground is the heart of the Replicate community. We will continue to invest in and grow this as the premier destination for AI discovery and experimentation, now <b>supercharged by Cloudflare's global network</b> for an even faster, more responsive experience for everyone.</p>
    <div>
      <h3>The future of inference: one platform, all models</h3>
      <a href="#the-future-of-inference-one-platform-all-models">
        
      </a>
    </div>
    <p>Our vision is to bring the best of both platforms together. We will bring the entire Replicate catalog — all 50,000+ models and fine-tunes — to Workers AI. This gives you the ultimate choice: run models in Replicate's flexible environment or on Cloudflare's serverless platform, all from one place.</p><p>But we're not just expanding the catalog. We are thrilled to announce that we will be bringing fine-tuning capabilities to Workers AI, powered by Replicate's deep expertise. We are also making Workers AI more flexible than ever. Soon, you'll be able to <b>bring your own custom models</b> to our network. We'll leverage Replicate's expertise with <b>Cog</b> to make this process seamless, reproducible, and easy.</p>
    <div>
      <h3>The AI Cloud: more than just inference</h3>
      <a href="#the-ai-cloud-more-than-just-inference">
        
      </a>
    </div>
    <p>Running a model is just one piece of the puzzle. The real magic happens when you connect AI to your entire application. Imagine what you can build when Replicate's massive catalog is deeply integrated with the entire Cloudflare developer platform: run a model and store the results directly in <b>R2</b> or <b>Vectorize</b>; trigger inference from a <b>Worker</b> or <b>Queue</b>; use <b>Durable Objects</b> to manage state for an AI agent; or build real-time generative UI with <b>WebRTC</b> and WebSockets.</p><p>To manage all this, we will integrate our unified inference platform deeply with the <b>AI Gateway</b>, giving you a single control plane for <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a>, prompt management, A/B testing, and cost analytics across <i>all</i> your models, whether they're running on Cloudflare, Replicate, or any other provider.</p>
    <div>
      <h2>Welcome to the team!</h2>
      <a href="#welcome-to-the-team">
        
      </a>
    </div>
    <p>We are incredibly excited to welcome the Replicate team to Cloudflare. Their passion for the developer community and their expertise in the AI ecosystem are unmatched. We can't wait to build the future of AI together.</p> ]]></content:encoded>
            <category><![CDATA[Acquisitions]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[AI]]></category>
            <guid isPermaLink="false">5wrXGTWWVegEdBSpstdIhb</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Ben Firshman</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare's developer platform keeps getting better, faster, and more powerful. Here's everything that's new.]]></title>
            <link>https://blog.cloudflare.com/cloudflare-developer-platform-keeps-getting-better-faster-and-more-powerful/</link>
            <pubDate>Thu, 25 Sep 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare's developer platform keeps getting better, faster, and more powerful. Here's everything that's new. ]]></description>
            <content:encoded><![CDATA[ <p>When you build on Cloudflare, we consider it our job to do the heavy lifting for you. That’s been true since we <a href="https://blog.cloudflare.com/introducing-cloudflare-workers/"><u>introduced Cloudflare Workers in 2017</u></a>, when we first provided a runtime for you where you could just focus on building. </p><p>That commitment is still true today, and many of today’s announcements are focused on just that — removing friction where possible to free you up to build something great. </p><p>There are only so many blog posts we can write (and that you can read)! We have been busy on a much longer list of new improvements, and many of them we’ve been rolling out consistently over the course of the year. Today’s announcement breaks down all the new capabilities in detail, in one single post. The features being released today include:</p><ul><li><p><a href="#more-node-js-apis-and-packages-just-work-on-workers"><u>Use more APIs from Node.js</u></a> — including node:fs and node:https</p></li><li><p><a href="#ai-search-formerly-autorag-now-with-more-models-to-choose-from"><u>Use models from different providers in AI Search</u></a> (formerly AutoRAG)</p></li><li><p>Deploy <u>l</u>arger container instances and more concurrent instances to our Containers platform</p></li><li><p>Run 30 concurrent headless web browsers (previously 10), via the <a href="#playwright-in-browser-rendering-is-now-ga"><u>Browser Rendering API</u></a></p></li><li><p>Use the <a href="#playwright-in-browser-rendering-is-now-ga"><u>Playwright browser automation library</u></a> with the Browser Rendering API — now fully supported and GA</p></li><li><p>Use 4 vCPUs (prev 2) and 20GB of disk (prev 8GB) with <a href="#more-node-js-apis-and-packages-just-work-on-workers"><u>Workers Builds — now GA</u></a></p></li><li><p>Connect to production services and resources from local development with Remote Bindings — now GA</p></li><li><p><a href="#infrequent-access-in-r2-is-now-ga"><u>R2 Infrequent Access GA</u></a> - lower-cost storage class for backups, logs, and long-tail content</p></li><li><p>Resize, clip and reformat video files on-demand with Media Transformations — now GA</p></li></ul><p>Alongside that, we’re constantly adding new building blocks, to make sure you have all the tools you need to build what you set out to. Those launches (that also went out today, but require a bit more explanation) include:</p><ul><li><p>Connect to Postgres databases <a href="http://blog.cloudflare.com/planetscale-postgres-workers"><u>running on Planetscale</u></a></p></li><li><p>Send transactional emails via the new <a href="http://blog.cloudflare.com/email-service"><u>Cloudflare Email Service</u></a></p></li><li><p>Run distributed SQL queries with the new <a href="http://blog.cloudflare.com/cloudflare-data-platform"><u>Cloudflare Data Platform</u></a></p></li><li><p>Deploy your own <a href="https://www.cloudflare.com/learning/ai/how-to-get-started-with-vibe-coding/">AI vibe coding</a> platform to Cloudflare with <a href="https://blog.cloudflare.com/deploy-your-own-ai-vibe-coding-platform"><u>VibeSDK</u></a></p></li></ul>
    <div>
      <h2>AI Search (formerly AutoRAG) — now with More Models To Choose From</h2>
      <a href="#ai-search-formerly-autorag-now-with-more-models-to-choose-from">
        
      </a>
    </div>
    <p>AutoRAG is now AI Search! The new name marks a new and bigger mission: to make world-class search infrastructure available to every developer and business. AI Search is no longer just about retrieval for LLM apps: it’s about giving you a fast, flexible index for your content that is ready to power any AI experience. With recent additions like <a href="https://blog.cloudflare.com/conversational-search-with-nlweb-and-autorag/"><u>NLWeb support</u></a>, we are expanding beyond simple retrieval to provide a foundation for top quality search experiences that are open and built for the future of the web.</p><p>With AI Search you can now use models from different providers like OpenAI and Anthropic. Last month during AI Week we announced <a href="https://blog.cloudflare.com/ai-gateway-aug-2025-refresh/"><u>BYO Provider Keys for AI Gateway</u></a>. That capability now extends to AI Search. By attaching your keys to the AI Gateway linked to your AI Search instance, you can use many more models for both embedding and inference.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5RUPN3CB5MOHuF0qcaJ9Nq/527f20fb8c2109c2007a5a3eeffaaadc/image2.png" />
          </figure><p>Once configured, your AI Search instance will be able to reference models available through your AI Gateway when making a <code>/ai-search</code> request:</p>
            <pre><code>export default {
  async fetch(request, env) {
    
    // Query your AI Search instance with a natural language question to an OpenAI model
    const result = await env.AI.autorag("my-ai-search").aiSearch({
      query: "What's new for Cloudflare Birthday Week?",
      model: "openai/gpt-5"
    });

    // Return only the generated answer as plain text
    return new Response(result.response, {
      headers: { "Content-Type": "text/plain" },
    });
  },
};</code></pre>
            <p>In the coming weeks we will also roll out updates to align the APIs with the new name. The existing APIs will continue to be supported for the time being. Stay tuned to the AI Search <a href="https://developers.cloudflare.com/changelog/?product=ai-search"><u>Changelog</u></a> and <a href="https://discord.cloudflare.com/"><u>Discord</u></a> for more updates!</p>
    <div>
      <h2>Connect to production services and resources from local development with Remote Bindings — now GA</h2>
      <a href="#connect-to-production-services-and-resources-from-local-development-with-remote-bindings-now-ga">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/workers/development-testing/#remote-bindings"><u>Remote bindings</u></a> for local development are generally available, supported in <a href="https://developers.cloudflare.com/workers/wrangler/"><u>Wrangler</u></a> v4.37.0, the <a href="https://developers.cloudflare.com/workers/vite-plugin/"><u>Cloudflare Vite plugin</u></a>, and the <code>@cloudflare/vitest-pool-workers</code> package. Remote bindings are bindings that are configured to connect to a deployed resource on your Cloudflare account <i>instead </i>of the locally simulated resource. </p><p>For example, here’s how you can instruct Wrangler or Vite to send all requests to <code>env.MY_BUCKET</code> to hit the real, deployed R2 bucket instead of a locally simulated one: </p>
            <pre><code>{
  "name": "my-worker",
  "compatibility_date": "2025-09-25",

  "r2_buckets": [
    {
      "bucket_name": "my-bucket",
      "binding": "MY_BUCKET",
      "remote": true
    },
  ],
}</code></pre>
            <p>With the above configuration, all requests to <code>env.MY_BUCKET</code> will be proxied to the remote resource, but the Worker code will still execute locally. This means you get all the benefits of local development like faster execution times – without having to seed local databases with data. </p><p>You can pair remote bindings with <a href="https://developers.cloudflare.com/workers/wrangler/environments/"><b><u>environments</u></b></a>, so that you can use staging data during local development and leave production data untouched. </p><p>For example, here’s how you could point Wrangler or Vite to send all requests to <code>env.MY_BUCKET</code> to <code>staging-storage-bucket</code> when you run <code>wrangler dev --env staging</code> (<code>CLOUDFLARE_ENV=staging vite dev</code> if using Vite). </p>
            <pre><code>{
  "name": "my-worker",
  "compatibility_date": "2025-09-25",

"env": {
    "staging": {
      "r2_buckets": [
        {
          "binding": "MY_BUCKET",
          "bucket_name": "staging-storage-bucket",
          "remote": true
        }
      ]
    },
    "production": {
      "r2_buckets": [
        {
          "binding": "MY_BUCKET",
          "bucket_name": "production-storage-bucket" 
        }
      ]
    }
  }
}</code></pre>
            
    <div>
      <h2>More Node.js APIs and packages “just work” on Workers</h2>
      <a href="#more-node-js-apis-and-packages-just-work-on-workers">
        
      </a>
    </div>
    <p>Over the past year, we have been hard at work to make Workers more compatible with Node.js packages and APIs.</p><p>Several weeks ago, <a href="https://blog.cloudflare.com/bringing-node-js-http-servers-to-cloudflare-workers/"><u>we shared how node:http and node:https APIs are now supported on Workers</u></a>. This means that you can run backend Express and Koa.js work with only a few additional lines of code:</p>
            <pre><code>import { httpServerHandler } from 'cloudflare:node';
import express from 'express';

const app = express();

app.get('/', (req, res) =&gt; {
  res.json({ message: 'Express.js running on Cloudflare Workers!' });
});

app.listen(3000);
export default httpServerHandler({ port: 3000 });</code></pre>
            <p>And there’s much, much more. You can now:</p><ul><li><p>Read and write temporary files in Workers, using <code>node:fs</code></p></li><li><p>Do DNS looking using <a href="https://one.one.one.one/"><u>1.1.1.1</u></a> with <code>node:dns</code></p></li><li><p>Use <code>node:net</code> and <code>node:tls</code> for first class Socket support</p></li><li><p>Use common hashing libraries with <code>node:crypto</code></p></li><li><p>Access environment variables in a Node-like fashion on <code>process.env</code></p></li></ul><p><a href="https://blog.cloudflare.com/nodejs-workers-2025"><u>Read our full recap of the last year’s Node.js-related changes</u></a> for all the details.</p><p>With these changes, Workers become even more powerful and easier to adopt, regardless of where you’re coming from. The APIs that you are familiar with are there, and more packages you need will just work.</p>
    <div>
      <h2>Larger Container instances, more concurrent instances</h2>
      <a href="#larger-container-instances-more-concurrent-instances">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/containers/"><u>Cloudflare Containers</u></a> now has higher limits on concurrent instances and an upcoming new, larger instance type.</p><p>Previously you could run 50 instances of the <code>dev</code> instance type or 25 instances of the <code>basic</code> instance type concurrently. Now you can run concurrent containers with up to 400 GiB of memory, 100 vCPUs, and 2 TB of disk. This allows you to run up to 1000 <code>dev</code> instances or 400 <code>basic</code> instances concurrently. Enterprise customers can push far beyond these limits — contact us if you need more. If you are using Containers to power your app and it goes viral, you’ll have the ability to scale on Cloudflare.</p><p>Cloudflare Containers also now has a new <a href="https://developers.cloudflare.com/containers/platform-details/limits/"><u>instance type</u></a> coming soon — <code>standard-2</code> which includes 8 GiB of memory, 1 vCPU, and 12 GB of disk. This new instance type is an ideal default for workloads that need more resources, from <a href="https://github.com/cloudflare/sandbox-sdk"><u>AI Sandboxes</u></a> to data processing jobs.</p>
    <div>
      <h2>Workers Builds provides more disk and CPU — and is now GA</h2>
      <a href="#workers-builds-provides-more-disk-and-cpu-and-is-now-ga">
        
      </a>
    </div>
    <p>Last Birthday Week, we <a href="https://blog.cloudflare.com/builder-day-2024-announcements/#continuous-integration-and-delivery"><u>announced the launch</u></a> of our integrated <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD pipeline</a>, Workers Builds, in open beta. We also gave you <a href="https://blog.cloudflare.com/workers-builds-integrated-ci-cd-built-on-the-workers-platform/"><u>a detailed look</u></a> into how we built this system on our <a href="https://developers.cloudflare.com/workers/"><u>Workers platform</u></a> using <a href="https://developers.cloudflare.com/containers/"><u>Containers</u></a>, <a href="https://developers.cloudflare.com/durable-objects/"><u>Durable Objects</u></a>, <a href="https://developers.cloudflare.com/hyperdrive/"><u>Hyperdrive</u></a>, <a href="https://developers.cloudflare.com/log-explorer/log-search/"><u>Workers Logs</u></a>, and <a href="https://developers.cloudflare.com/workers/configuration/smart-placement/"><u>Smart Placement</u></a>.</p><p>This year, we are excited to announce that Workers Builds is now Generally Available. Here’s what’s new:</p><ul><li><p><a href="https://developers.cloudflare.com/changelog/2025-08-04-builds-increased-disk-size/"><b><u>Increased disk space for all plans</u></b></a>: We've increased the disk size from 8 GB to 20 GB for both free and paid plans, giving you more space for your projects and dependencies</p></li><li><p><a href="https://developers.cloudflare.com/changelog/2025-09-07-builds-increased-cpu-paid/"><b><u>More compute for paid plans</u></b></a>: We’ve doubled the CPU power for paid plans from 2 vCPU to 4 vCPU, making your builds significantly faster</p></li><li><p><b>Faster single-core and multi-core performance</b>: To ensure consistent, high performance builds, we now run your builds on the fastest available CPUs at the time your build runs</p></li></ul><p>Haven’t used <a href="https://developers.cloudflare.com/workers/ci-cd/builds/"><u>Workers Builds</u></a> yet? You can try it by <a href="https://developers.cloudflare.com/workers/ci-cd/builds/"><u>connecting a Git repository to an existing Worker</u></a>, or try it out on a fresh new project by clicking any <a href="https://developers.cloudflare.com/workers/platform/deploy-buttons/"><u>Deploy to Cloudflare button</u></a>, like the one below that deploys <a href="https://github.com/cloudflare/templates/tree/main/astro-blog-starter-template"><u>a blog built with Astro</u></a> to your Cloudflare account:</p><a href="https://deploy.workers.cloudflare.com/?url=https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/main/astro-blog-starter-template"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p>
    <div>
      <h2>A more consistent look and feel for the Cloudflare dashboard</h2>
      <a href="#a-more-consistent-look-and-feel-for-the-cloudflare-dashboard">
        
      </a>
    </div>
    <p><a href="https://dash.cloudflare.com/?to=/:account/workers/durable-objects"><u>Durable Objects</u></a>, <a href="https://dash.cloudflare.com/?to=/:account/r2"><u>R2</u></a>, and <a href="https://dash.cloudflare.com/?to=/:account/workers-and-pages"><u>Workers</u></a> now all have a more consistent look with the rest of our developer platform. As you explore these pages you’ll find that things should load faster, feel smoother and are easier to use.</p><p>Across storage products, you can now customize the table that lists the resources on your account, choose which data you want to see, sort by any column, and hide columns you don’t need. In the Workers and Pages dashboard, we’ve reduced clutter and have modernized the design to make it faster for you to get the data you need.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/0NkomTAkx45wn7nF4WYip/efb7b706d0ab7df34bfe229a025f4782/image4.png" />
          </figure><p>And when you create a new <a href="https://developers.cloudflare.com/pipelines/"><u>Pipeline</u></a> or a <a href="https://developers.cloudflare.com/hyperdrive"><u>Hyperdrive</u></a> configuration, you’ll find a new interface that helps you get started and guides you through each step.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Lx2tgIBRIWsq82p3Vjj3o/3a23f7065c9f354ed66dbe311f5d1d86/image1.png" />
          </figure><p>This work is ongoing, and we’re excited to continue improving with the help of your feedback, so keep it coming!</p>
    <div>
      <h2>Resize, clip and reformat video files on-demand with Media Transformations — now GA</h2>
      <a href="#resize-clip-and-reformat-video-files-on-demand-with-media-transformations-now-ga">
        
      </a>
    </div>
    <p>In March 2025 we <a href="https://blog.cloudflare.com/media-transformations-for-video-open-beta/"><u>announced Media Transformations</u></a> in open beta, which brings the magic of <a href="https://developers.cloudflare.com/images/transform-images/"><u>Image transformations</u></a> to short-form video files — including video files stored outside of Cloudflare. Since then, we have increased input and output limits, and added support for audio-only extraction. Media Transformations is now generally available.</p><p>Media Transformations is ideal if you have a large existing volume of short videos, such as generative AI output, e-commerce product videos, social media clips, or short marketing content. Content like this should be fetched from your existing storage like R2 or S3 directly, optimized by Cloudflare quickly, and delivered efficiently as small MP4 files or used to extract still images and audio.</p>
            <pre><code>https://example.com/cdn-cgi/media/&lt;OPTIONS&gt;/&lt;SOURCE-VIDEO&gt;

EXAMPLE, RESIZE:
https://example.com/cdn-cgi/media/width=760/https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4


EXAMPLE, STILL THUMBNAIL:
https://example.com/cdn-cgi/media/mode=frame,time=3s,width=120,height=120,fit=cover/https://pub-d9fcbc1abcd244c1821f38b99017347f.r2.dev/aus-mobile.mp4</code></pre>
            <p>Media Transformations includes a free tier available to all customers and is included with Media Platform subscriptions. Check out the <a href="https://developers.cloudflare.com/stream/transform-videos/"><u>transform videos documentation</u></a> for all the latest, then enable transformations for your zone today!</p>
    <div>
      <h2>Infrequent Access in R2 is now GA</h2>
      <a href="#infrequent-access-in-r2-is-now-ga">
        
      </a>
    </div>
    <p>R2 Infrequent Access is now generally available. Last year, we introduced the <a href="https://blog.cloudflare.com/r2-events-gcs-migration-infrequent-access/#infrequent-access-private-beta"><u>Infrequent Access</u></a> storage class designed for data that doesn’t need to be accessed frequently. It’s a great fit for use cases including long-tail user content, logs, or data backups.</p><p>Since launch, Infrequent Access has been proven in production by our customers running these types of workloads at scale. The results confirmed our goal: a storage class that reduces storage costs while maintaining performance and durability.</p><p><a href="https://developers.cloudflare.com/r2/pricing/"><u>Pricing</u></a> is simple. You pay less on data storage, while data retrievals are billed per GB to reflect the additional compute required to serve data from underlying storage optimized for less frequent access. And as with all of R2, there are <b>no egress fees</b>, so you don’t pay for the bandwidth to move data out.

Here’s how you can upload an object to R2 infrequent access class via Workers:</p>
            <pre><code>export default {
  async fetch(request, env) {

    // Upload the incoming request body to R2 in Infrequent Access class
    await env.MY_BUCKET.put("my-object", request.body, {
      storageClass: "InfrequentAccess",
    });

    return new Response("Object uploaded to Infrequent Access!", {
      headers: { "Content-Type": "text/plain" },
    });
  },
};</code></pre>
            <p>You can also monitor your Infrequent Access vs. Standard storage usage directly in your R2 dashboard for each bucket. Get started with <a href="https://developers.cloudflare.com/r2/get-started/"><u>R2</u></a> today!</p>
    <div>
      <h2>Playwright in Browser Rendering is now GA</h2>
      <a href="#playwright-in-browser-rendering-is-now-ga">
        
      </a>
    </div>
    <p>We’re excited to announce three updates to Browser Rendering:</p><ol><li><p>Our support for <a href="https://developers.cloudflare.com/browser-rendering/platform/playwright/"><u>Playwright</u></a> is now Generally Available, giving developers the stability and confidence to run critical browser tasks.</p></li><li><p>We’re introducing support for <a href="https://developers.cloudflare.com/browser-rendering/platform/stagehand/"><u>Stagehand</u></a>, enabling developers to build AI agents using natural language, powered by Cloudflare Workers AI.</p></li><li><p>Finally, to help developers scale, we are tripling <a href="https://developers.cloudflare.com/browser-rendering/platform/limits/#workers-paid"><u>limits for paid plans</u></a>, with more increases to come. </p></li></ol><p>The browser is no longer only used by humans. AI agents need to be able to reliably navigate browsers in the same way a human would, whether that's booking flights, filling in customer info, or scraping structured data. Playwright gives AI agents the ability to interact with web pages and perform complex tasks on behalf of humans. However, running browsers at scale is a significant infrastructure challenge. Cloudflare Browser Rendering solves this by providing headless browsers on-demand. By moving Playwright support to Generally Available, and now synced with the latest version v1.55, customers have a production-ready foundation to build reliable, scalable applications on. </p><p>To help AI agents better navigate the web, we’re introducing support for Stagehand, an open source browser automation framework.  Rather than dictating exact steps or specifying selectors, Stagehand enables developers to build more reliably and flexibly by combining code with natural-language instructions powered by AI. This makes it possible for AI agents to navigate and adapt if a website changes - just like a human would. </p><p>To get started with Playwright and Stagehand, check our <a href="https://developers.cloudflare.com/changelog/2025-09-25-br-playwright-ga-stagehand-limits/"><u>changelog</u></a> with code examples and more. </p><div>
  
</div><p></p> ]]></content:encoded>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <guid isPermaLink="false">4HnTgcx06k7ccxS0rYwIkC</guid>
            <dc:creator>Brendan Irvine-Broque</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Korinne Alpers</dc:creator>
        </item>
        <item>
            <title><![CDATA[Why Cloudflare, Netlify, and Webflow are collaborating to support Open Source tools like Astro and TanStack]]></title>
            <link>https://blog.cloudflare.com/cloudflare-astro-tanstack/</link>
            <pubDate>Tue, 23 Sep 2025 13:10:00 GMT</pubDate>
            <description><![CDATA[ Today, Cloudflare is proud to announce support for two cornerstone frameworks in the modern web ecosystem: we’re partnering with Webflow to sponsor Astro, and with Netlify to sponsor TanStack. ]]></description>
            <content:encoded><![CDATA[ 
    <div>
      <h5></h5>
      <a href="#">
        
      </a>
    </div>
    <p>Open source is the core fabric of the web, and the open source tools that power the modern web depend on the stability and support of the community. </p><p>To ensure two major open source projects have the resources they need, we are proud to announce our financial sponsorship to two cornerstone frameworks in the modern web ecosystem: <b>Astro</b> and <b>TanStack</b>.</p><p>Critically, we think it’s important we don’t do this alone — for the open web to continue to thrive, we must bet on and support technologies and frameworks that are open and accessible to all, and not beholden to any one company. </p><p>Which is why we are also excited to announce that for these sponsorships we are joining forces with our peers at <b>Netlify to sponsor TanStack</b> and <b>Webflow to sponsor Astro</b>.</p>
    <div>
      <h2>Why Astro and TanStack? Investing in the Future of the Frontend</h2>
      <a href="#why-astro-and-tanstack-investing-in-the-future-of-the-frontend">
        
      </a>
    </div>
    <p>Our decision to support Astro and TanStack was deliberate. These two projects represent distinct but complementary visions for the future of web development. One is redefining the architecture for high-performance, content-driven websites, while the other provides a full-stack toolkit for building the most ambitious web applications.</p>
    <div>
      <h3>Astro: the framework for the high-performance sites </h3>
      <a href="#astro-the-framework-for-the-high-performance-sites">
        
      </a>
    </div>
    <p>When it comes to endorsing a technology, we believe actions speak louder than words. </p><p>That’s why our support for Astro isn't just financial—it's foundational. We run our developer documentation site, developers.cloudflare.com, entirely on Astro. This isn't a small side project — it's a critical resource visited by hundreds of thousands of developers every day, with dozens of contributors constantly keeping it updated. For a site like this, performance isn't a feature; it's a requirement. </p><p>We chose Astro because its core principles mirror our own. Its "zero JS by default" architecture delivers the raw performance and stellar SEO that a content-heavy site demands, ensuring our docs are fast and discoverable. Just as importantly, Astro is framework-agnostic, letting teams use components from React, Vue, or Svelte without vendor lock-in. </p><p>Astro makes it easy for our global team to keep content up-to-date and, most importantly, keep our docs blazing fast. Our sponsorship is a direct result of the immense value we've experienced firsthand.   </p><blockquote><p><i>Cloudflare’s partnership and support affirms our shared mission: to make the web faster, more open, and better for everyone who builds on it.  - Fred K. Schott, Astro Co-creator, Project Steward</i></p></blockquote><blockquote><p><i>Webflow gives marketers, designers, and developers the freedom to build without compromise. Astro shares that same spirit by removing barriers, speeding up workflows, and opening new creative possibilities. Together with Cloudflare and Netlify, we’re helping ensure the tools our community relies on stay open, sustainable, and ready for the future. - Allan Leinwand, Webflow CTO</i></p></blockquote>
    <div>
      <h3>TanStack Start: the full-stack framework for ambitious applications</h3>
      <a href="#tanstack-start-the-full-stack-framework-for-ambitious-applications">
        
      </a>
    </div>
    <p>If Astro provides the ideal foundation for content-heavy sites, TanStack provides the ideal engine for complex web applications. TanStack is not a single framework but a suite of powerful, headless, and type-safe libraries that solve the hardest problems in modern application development.</p><p>Libraries like TanStack Query have become the de facto industry standard for managing asynchronous server state, elegantly solving complex challenges like caching, background refetching, and optimistic updates that once required thousands of lines of fragile, bespoke code. Similarly, TanStack Router brings full type-safety to routing, eliminating an entire class of common bugs, while TanStack Table and TanStack Form provide the robust, headless primitives needed to build sophisticated, data-intensive user interfaces.</p><p>And today, TanStack announced its official release of the release candidate for TanStack Start 1.0, taking a big stride towards production-readiness.</p><p><b>TanStack Start</b> is a new full-stack framework that composes these powerful libraries into a cohesive, enterprise-grade development experience. With features like full-document Server-Side Rendering (SSR), streaming, and a "deploy anywhere" architecture, TanStack Start is designed for the modern, serverless edge. It provides the power and type-safety needed for ambitious applications and is a perfect match for deployment environments like Cloudflare Workers.</p><blockquote><p><i>With Cloudflare alongside us, TanStack can keep raising the bar for fast, scalable, and type-safe tools for powering the next generation of web apps while protecting the openness and freedom developers depend on. - Tanner Linsley, TanStack creator</i></p></blockquote><blockquote><p><i>Supporting an open web is not a nice-to-have for us, but a requirement for us to fulfill our mission to build a better web. Collaborating with Cloudflare on making sure these top projects are funded is the easiest decision we can make! -</i> <i>Mat B, CEO</i></p></blockquote>
    <div>
      <h2>Joining forces builds a stronger open web</h2>
      <a href="#joining-forces-builds-a-stronger-open-web">
        
      </a>
    </div>
    <p>It is not lost on us that this coalition includes companies that compete in the market. We believe this is a feature, not a bug. It demonstrates a shared understanding that we are all building on the same open-source foundations. A healthy, innovative, and sustainable open-source ecosystem is the rising tide that lifts all of our boats.</p><p>This joint sponsorship model means Astro and TanStack are more resilient. For you, that means you can build on them with confidence, knowing they aren't dependent on a single company's shifting priorities.</p>
    <div>
      <h2>With that, show us what you build!</h2>
      <a href="#with-that-show-us-what-you-build">
        
      </a>
    </div>
    <p>The best way to support open source is to use it, build with it, and contribute back to it. See how easy it is to get started with Astro and TanStack and deploy an application to Cloudflare in minutes with the following framework guides:</p><ul><li><p><a href="https://developers.cloudflare.com/workers/framework-guides/web-apps/astro/"><u>Get started with Astro</u></a></p></li><li><p><a href="https://tanstack.com/start/latest/docs/framework/react/overview"><u>Get started with TanStack Start</u></a></p></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Partners]]></category>
            <category><![CDATA[Open Source]]></category>
            <guid isPermaLink="false">6fqBbuuMhg7sdSmsIGTchD</guid>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Piecing together the Agent puzzle: MCP, authentication & authorization, and Durable Objects free tier]]></title>
            <link>https://blog.cloudflare.com/building-ai-agents-with-mcp-authn-authz-and-durable-objects/</link>
            <pubDate>Mon, 07 Apr 2025 13:10:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare delivers toolkit for AI agents with new Agents SDK support for MCP (Model Context Protocol) clients, authentication/authorization/hibernation for MCP servers and Durable Objects free tier.  ]]></description>
            <content:encoded><![CDATA[ <p>It’s not a secret that at Cloudflare <a href="https://blog.cloudflare.com/build-ai-agents-on-cloudflare/"><u>we are bullish</u></a> on the future of <a href="https://www.cloudflare.com/learning/ai/what-is-agentic-ai/">agents</a>. We’re excited about a future where AI can not only co-pilot alongside us, but where we can actually start to delegate entire tasks to AI. </p><p>While it hasn’t been too long since we <a href="https://blog.cloudflare.com/build-ai-agents-on-cloudflare/"><u>first announced</u></a> our Agents SDK to make it easier for developers to build agents, building towards an agentic future requires continuous delivery towards this goal. Today, we’re making several announcements to help accelerate agentic development, including:</p><ul><li><p><b>New Agents SDK capabilities:</b> Build remote MCP clients, with transport and authentication built-in, to allow AI agents to connect to external services. </p></li><li><p><a href="https://developers.cloudflare.com/agents/model-context-protocol/authorization/#3-bring-your-own-oauth-provider"><b><u>BYO Auth provider for MCP</u></b></a><b>:</b> Integrations with <a href="https://stytch.com/"><u>Stytch</u></a>, <a href="https://auth0.com/"><u>Auth0</u></a>, and <a href="https://workos.com/"><u>WorkOS</u></a> to add authentication and authorization to your remote MCP server. </p></li><li><p><a href="https://developers.cloudflare.com/agents/model-context-protocol/mcp-agent-api/#hibernation-support"><b><u>Hibernation for McpAgent</u></b></a><b>:</b> Automatically sleep stateful, remote MCP servers when inactive and wake them when needed. This allows you to maintain connections for long-running sessions while ensuring you’re not paying for idle time. </p></li><li><p><a href="https://developers.cloudflare.com/changelog/2025-04-07-durable-objects-free-tier"><b><u>Durable Objects free tier</u></b></a><b>:</b> We view <a href="https://www.cloudflare.com/developer-platform/products/durable-objects/">Durable Objects</a> as a key component for building agents, and if you’re using our Agents SDK, you need access to it. Until today, Durable Objects was only accessible as part of our paid plans, and today we’re excited to include it in our free tier.</p></li><li><p><a href="https://blog.cloudflare.com/workflows-ga-production-ready-durable-execution"><b><u>Workflows GA</u></b></a><b>:</b> Enables you to ship production-ready, long-running, multi-step actions in agents.</p></li><li><p><a href="https://blog.cloudflare.com/introducing-autorag-on-cloudflare"><b><u>AutoRAG</u></b></a><b>:</b> Helps you <a href="https://www.cloudflare.com/learning/ai/how-to-build-rag-pipelines/">integrate context-aware AI</a> into your applications, in just a few clicks</p></li><li><p><a href="https://agents.cloudflare.com"><b><u>agents.cloudflare.com</u></b></a><b>:</b> our new landing page for all things agents.</p></li></ul>
    <div>
      <h2>New MCP capabilities in Agents SDK</h2>
      <a href="#new-mcp-capabilities-in-agents-sdk">
        
      </a>
    </div>
    <p>AI agents can now connect to and interact with external services through MCP (<a href="https://www.cloudflare.com/learning/ai/what-is-model-context-protocol-mcp/"><u>Model Context Protocol</u></a>). We’ve updated the Agents SDK to allow you to build a remote MCP client into your AI agent, with all the components — authentication flows, tool discovery, and connection management — built-in for you.</p><p>This allows you to build agents that can:</p><ol><li><p>Prompt the end user to grant access to a 3rd party service (MCP server).</p></li><li><p>Use tools from these external services, acting on behalf of the end user.</p></li><li><p>Call MCP servers from Workflows, scheduled tasks, or any part of your agent.</p></li><li><p>Connect to multiple MCP servers and automatically discover new tools or capabilities presented by the 3rd party service.</p></li></ol>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/X3RvQHewsVwJhq3TVOD0w/bbc5690d2d687f7a390f91474b3eb385/1.png" />
          </figure><p>MCP (Model Context Protocol) — <a href="https://www.anthropic.com/news/model-context-protocol"><u>first introduced by Anthropic</u></a> — is quickly becoming the standard way for AI agents to interact with external services, with providers like OpenAI, Cursor, and Copilot adopting the protocol.</p><p>We <a href="https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/"><u>recently announced</u></a> support for <a href="https://developers.cloudflare.com/agents/guides/remote-mcp-server/"><u>building remote MCP servers</u></a> on Cloudflare, and added an <code>McpAgent</code> class to our Agents SDK that automatically handles the remote aspects of MCP: transport and authentication/authorization. Now, we’re excited to extend the same capabilities to agents acting as MCP clients.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3nxl3bIRTbfRzpdLhHF720/41bea06c9e48b7d356d11a6f254b76ef/2.png" />
          </figure><p>Want to see it in action? Use the button below to deploy a fully remote MCP client that can be used to connect to remote MCP servers.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/mcp-client"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p>
    <div>
      <h2>AI Agents can now act as remote MCP clients, with transport and auth included</h2>
      <a href="#ai-agents-can-now-act-as-remote-mcp-clients-with-transport-and-auth-included">
        
      </a>
    </div>
    <p>AI agents need to connect to external services to access tools, data, and capabilities beyond their built-in knowledge. That means AI agents need to be able to act as remote MCP clients, so they can connect to remote MCP servers that are hosting these tools and capabilities. </p><p>We’ve added a new class, <code>MCPClientManager</code>, into the Agents SDK to give you all the tooling you need to allow your AI agent to make calls to external services via MCP. The <code>MCPClientManager</code> class automatically handles: </p><ul><li><p><b>Transport: </b>Connect to remote MCP servers over SSE and HTTP, with support for <a href="https://spec.modelcontextprotocol.io/specification/2025-03-26/basic/transports/#streamable-http"><u>Streamable HTTP</u></a> coming soon. </p></li><li><p><b>Connection management: </b>The client tracks the state of all connections and automatically reconnects if a connection is lost.</p></li><li><p><b>Capability discovery: </b>Automatically discovers all capabilities, tools, resources, and prompts presented by the MCP server.</p></li><li><p><b>Real-time updates</b>: When a server's tools, resources, or prompts change, the client automatically receives notifications and updates its internal state.</p></li><li><p><b>Namespacing: </b>When connecting to multiple MCP servers, all tools and resources are automatically namespaced to avoid conflicts.</p></li></ul>
    <div>
      <h3>Granting agents access to tools with built-in auth check for MCP Clients</h3>
      <a href="#granting-agents-access-to-tools-with-built-in-auth-check-for-mcp-clients">
        
      </a>
    </div>
    <p>We've integrated the complete OAuth authentication flow directly into the Agents SDK, so your AI agents can securely connect and authenticate to any remote MCP server without you having to build authentication flow from scratch.</p><p>This allows you to give users a secure way to log in and explicitly grant access to allow the agent to act on their behalf by automatically: </p><ul><li><p>Supporting the OAuth 2.1 protocol.</p></li><li><p>Redirecting users to the service’s login page.</p></li><li><p>Generating the code challenge and exchanging an authorization code for an access token.</p></li><li><p>Using the access token to make authenticated requests to the MCP server.</p></li></ul><p>Here is an example of an agent that can securely connect to MCP servers by initializing the client manager, adding the server, and handling the authentication callbacks:</p>
            <pre><code>async onStart(): Promise&lt;void&gt; {
  // initialize MCPClientManager which manages multiple MCP clients with optional auth
  this.mcp = new MCPClientManager("my-agent", "1.0.0", {
    baseCallbackUri: `${serverHost}/agents/${agentNamespace}/${this.name}/callback`,
    storage: this.ctx.storage,
  });
}

async addMcpServer(url: string): Promise&lt;string&gt; {
  // Add one MCP client to our MCPClientManager
  const { id, authUrl } = await this.mcp.connect(url);
  // Return authUrl to redirect the user to if the user is unauthorized
  return authUrl
}

async onRequest(req: Request): Promise&lt;void&gt; {
  // handle the auth callback after being finishing the MCP server auth flow
  if (this.mcp.isCallbackRequest(req)) {
    await this.mcp.handleCallbackRequest(req);
    return new Response("Authorized")
  }
  
  // ...
}</code></pre>
            <p>Connecting to multiple MCP servers and discovering what capabilities they offer</p><p>You can use the Agents SDK to connect an MCP client to multiple MCP servers simultaneously. This is particularly useful when you want your agent to access and interact with tools and resources served by different service providers. </p><p>The <code>MCPClientManager</code> class maintains connections to multiple MCP servers through the <code>mcpConnections</code> object, a dictionary that maps unique server names to their respective <code>MCPClientConnection</code> instances. </p><p>When you register a new server connection using <code>connect()</code>, the manager: </p><ol><li><p>Creates a new connection instance with server-specific authentication.</p></li><li><p>Initializes the connections and registers for server capability notifications.</p></li></ol>
            <pre><code>async onStart(): Promise&lt;void&gt; {
  // Connect to an image generation MCP server
  await this.mcp.connect("https://image-gen.example.com/mcp/sse");
  
  // Connect to a code analysis MCP server
  await this.mcp.connect("https://code-analysis.example.org/sse");
  
  // Now we can access tools with proper namespacing
  const allTools = this.mcp.listTools();
  console.log(`Total tools available: ${allTools.length}`);
}</code></pre>
            <p>Each connection manages its own authentication context, allowing one AI agent to authenticate to multiple servers simultaneously. In addition, <code>MCPClientManager</code> automatically handles namespacing to prevent collisions between tools with identical names from different servers. </p><p>For example, if both an “Image MCP Server” and “Code MCP Server” have a tool named “analyze”, they will both be independently callable without any naming conflicts.</p>
    <div>
      <h2>Use Stytch, Auth0, and WorkOS to bring authentication &amp; authorization to your MCP server </h2>
      <a href="#use-stytch-auth0-and-workos-to-bring-authentication-authorization-to-your-mcp-server">
        
      </a>
    </div>
    <p>With MCP, users will have a new way of interacting with your application, no longer relying on the dashboard or API as the entrypoint. Instead, the service will now be accessed by AI agents that are acting on a user’s behalf. To ensure users and agents can connect to your service securely, you’ll need to extend your existing authentication and authorization system to support these agentic interactions, implementing login flows, permissions scopes, consent forms, and access enforcement for your MCP server. </p><p>We’re adding integrations with <a href="https://stytch.com/"><u>Stytch</u></a>, <a href="https://auth0.com/"><u>Auth0</u></a>, and <a href="https://workos.com/"><u>WorkOS</u></a> to make it easier for anyone building an MCP server to configure authentication &amp; authorization for their MCP server. </p><p>You can leverage our MCP server integration with Stytch, Auth0, and WorkOS to: </p><ul><li><p>Allow users to authenticate to your MCP server through email, social logins, SSO (single sign-on), and MFA (multi-factor authentication).</p></li><li><p>Define scopes and permissions that directly map to your MCP tools.</p></li><li><p>Present users with a consent page corresponding with the requested permissions.</p></li></ul><p>Enforce the permissions so that agents can only invoke permitted tools. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6oYchjMwoMxwYxsqq4PObk/381937e89c249b87c1930295b407faf6/3.png" />
          </figure><p>Get started with the examples below by using the “Deploy to Cloudflare” button to deploy the demo MCP servers in your Cloudflare account. These demos include pre-configured authentication endpoints, consent flows, and permission models that you can tailor to fit your needs. Once you deploy the demo MCP servers, you can use the <a href="https://playground.ai.cloudflare.com/"><u>Workers AI playground</u></a>, a browser-based remote MCP client, to test out the end-to-end user flow. </p>
    <div>
      <h3>Stytch</h3>
      <a href="#stytch">
        
      </a>
    </div>
    <p><a href="https://stytch.com/docs/guides/connected-apps/mcp-servers"><u>Get started</u></a> with a remote MCP server that uses Stytch to allow users to sign in with email, Google login or enterprise SSO and authorize their AI agent to view and manage their company’s OKRs on their behalf. Stytch will handle restricting the scopes granted to the AI agent based on the user’s role and permissions within their organization. When authorizing the MCP Client, each user will see a consent page that outlines the permissions that the agent is requesting that they are able to grant based on their role.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/mcp-stytch-b2b-okr-manager"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><p>For more consumer use cases, deploy a remote MCP server for a To Do app that uses Stytch for authentication and MCP client authorization. Users can sign in with email and immediately access the To Do lists associated with their account, and grant access to any AI assistant to help them manage their tasks.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/mcp-stytch-consumer-todo-list"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><p>Regardless of use case, Stytch allows you to easily turn your application into an OAuth 2.0 identity provider and make your remote MCP server into a Relying Party so that it can easily inherit identity and permissions from your app. To learn more about how Stytch is enabling secure authentication to remote MCP servers, read their <a href="http://stytch.com/blog/remote-mcp-stytch-cloudflare"><u>blog post</u></a>.</p><blockquote><p><i>“One of the challenges of realizing the promise of AI agents is enabling those agents to securely and reliably access data from other platforms. Stytch Connected Apps is purpose-built for these agentic use cases, making it simple to turn your app into an OAuth 2.0 identity provider to enable secure access to remote MCP servers. By combining Cloudflare Workers with Stytch Connected Apps, we're removing the barriers for developers, enabling them to rapidly transition from AI proofs-of-concept to secure, deployed implementations.” — Julianna Lamb, Co-Founder &amp; CTO, Stytch.</i></p></blockquote>
    <div>
      <h3>Auth0</h3>
      <a href="#auth0">
        
      </a>
    </div>
    <p>Get started with a remote MCP server that uses Auth0 to authenticate users through email, social logins, or enterprise SSO to interact with their todos and personal data through AI agents. The MCP server securely connects to API endpoints on behalf of users, showing exactly which resources the agent will be able to access once it gets consent from the user. In this implementation, access tokens are automatically refreshed during long running interactions.</p><p>To set it up, first deploy the protected API endpoint: </p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-auth0/todos-api"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><p>Then, deploy the MCP server that handles authentication through Auth0 and securely connects AI agents to your API endpoint. </p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-auth0/mcp-auth0-oidc"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><blockquote><p><i>"Cloudflare continues to empower developers building AI products with tools like AI Gateway, Vectorize, and Workers AI. The recent addition of Remote MCP servers further demonstrates that Cloudflare Workers and Durable Objects are a leading platform for deploying serverless AI. We’re very proud that Auth0 can help solve the authentication and authorization needs for these cutting-edge workloads." — Sandrino Di Mattia, Auth0 Sr. Director, Product Architecture.</i></p></blockquote>
    <div>
      <h3>WorkOS</h3>
      <a href="#workos">
        
      </a>
    </div>
    <p>Get started with a remote MCP server that uses WorkOS's AuthKit to authenticate users and manage the permissions granted to AI agents. In this example, the MCP server dynamically exposes tools based on the user's role and access rights. All authenticated users get access to the <code>add</code> tool, but only users who have been assigned the <code>image_generation</code> permission in WorkOS can grant the AI agent access to the image generation tool. This showcases how MCP servers can conditionally expose capabilities to AI agents based on the authenticated user's role and permission.</p><a href="https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authkit"><img src="https://deploy.workers.cloudflare.com/button" /></a>
<p></p><blockquote><p><i>“MCP is becoming the standard for AI agent integration, but authentication and authorization are still major gaps for enterprise adoption. WorkOS Connect enables any application to become an OAuth 2.0 authorization server, allowing agents and MCP clients to securely obtain tokens for fine-grained permission authorization and resource access. With Cloudflare Workers, developers can rapidly deploy remote MCP servers with built-in OAuth and enterprise-grade access control. Together, WorkOS and Cloudflare make it easy to ship secure, enterprise-ready agent infrastructure.” — Michael Grinich, CEO of WorkOS.</i></p></blockquote>
    <div>
      <h2>Hibernate-able WebSockets: put AI agents to sleep when they’re not in use</h2>
      <a href="#hibernate-able-websockets-put-ai-agents-to-sleep-when-theyre-not-in-use">
        
      </a>
    </div>
    <p>Starting today, a new improvement is landing in the McpAgent class: support for the <a href="https://developers.cloudflare.com/durable-objects/best-practices/websockets/#websocket-hibernation-api"><u>WebSockets Hibernation API</u></a> that allows your MCP server to go to sleep when it’s not receiving requests and instantly wake up when it’s needed. That means that you now only pay for compute when your agent is actually working.</p><p>We <a href="https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/"><u>recently introduced</u></a> the <a href="https://developers.cloudflare.com/agents/model-context-protocol/tools/?cf_history_state=%7B%22guid%22%3A%22C255D9FF78CD46CDA4F76812EA68C350%22%2C%22historyId%22%3A11%2C%22targetId%22%3A%22DF3E523E0077ACCB6730439891CDD7D4%22%7D"><u>McpAgent class</u></a>, which allows developers to build remote MCP servers on Cloudflare by using Durable Objects to maintain stateful connections for every client session. We decided to build McpAgent to be stateful from the start, allowing developers to build servers that can remember context, user preferences, and conversation history. But maintaining client connections means that the session can remain active for a long time, even when it’s not being used. </p>
    <div>
      <h3>MCP Agents are hibernate-able by default</h3>
      <a href="#mcp-agents-are-hibernate-able-by-default">
        
      </a>
    </div>
    <p>You don’t need to change your code to take advantage of hibernation. With our latest SDK update, all McpAgent instances automatically include hibernation support, allowing your stateful MCP servers to sleep during inactive periods and wake up with their state preserved when needed. </p>
    <div>
      <h3>How it works</h3>
      <a href="#how-it-works">
        
      </a>
    </div>
    <p>When a request comes in on the Server-Sent Events endpoint, /sse, the Worker initializes a WebSocket connection to the appropriate Durable Object for the session and returns an SSE stream back to the client. All responses flow over this stream.</p><p>The implementation leverages the WebSocket Hibernation API within Durable Objects. When periods of inactivity occur, the Durable Object can be evicted from memory while keeping the WebSocket connection open. If the WebSocket later receives a message, the runtime recreates the Durable Object and delivers the message to the appropriate handler.</p>
    <div>
      <h2>Durable Objects on free tier</h2>
      <a href="#durable-objects-on-free-tier">
        
      </a>
    </div>
    <p>To help you build AI agents on Cloudflare, we’re making <a href="http://developers.cloudflare.com/durable-objects/what-are-durable-objects/"><u>Durable Objects</u></a> available on the free tier, so you can start with zero commitment. With Agents SDK, your AI agents deploy to Cloudflare running on Durable Objects.</p><p>Durable Objects offer compute alongside durable storage, that when combined with <a href="https://www.cloudflare.com/developer-platform/products/workers/">Workers</a>, unlock stateful, serverless applications. Each Durable Object is a stateful coordinator for handling client real-time interactions, making requests to external services like LLMs, and creating agentic “memory” through state persistence in <a href="https://blog.cloudflare.com/sqlite-in-durable-objects/"><u>zero-latency SQLite storage</u></a> — all tasks required in an AI agent. Durable Objects scale out to millions of agents effortlessly, with each agent created near the user interacting with their agent for fast performance, all managed by Cloudflare. </p><p>Zero-latency SQLite storage in Durable Objects was <a href="https://blog.cloudflare.com/sqlite-in-durable-objects/"><u>introduced in public beta</u></a> September 2024 for Birthday Week. Since then, we’ve focused on missing features and robustness compared to pre-existing key-value storage in Durable Objects. We are excited to make SQLite storage generally available, with a 10 GB SQLite database per Durable Object, and recommend SQLite storage for all new Durable Object classes. Durable Objects free tier can only access SQLite storage.</p><p><a href="https://www.cloudflare.com/plans/free/">Cloudflare’s free tier</a> allows you to build real-world applications. On the free plan, every Worker request can call a Durable Object. For <a href="https://developers.cloudflare.com/durable-objects/platform/pricing/"><u>usage-based pricing</u></a>, Durable Objects incur compute and storage usage with the following free tier limits.</p><div>
    <figure>
        <table>
            <colgroup>
                <col></col>
                <col></col>
                <col></col>
            </colgroup>
            <tbody>
                <tr>
                    <td> </td>
                    <td>
                        <p><span><span><strong>Workers Free</strong></span></span></p>
                    </td>
                    <td>
                        <p><span><span><strong>Workers Paid</strong></span></span></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p><span><span>Compute: Requests</span></span></p>
                    </td>
                    <td>
                        <p><span><span>100,000 / day</span></span></p>
                    </td>
                    <td>
                        <p><span><span>1 million / month included</span></span></p>
                        <p><span><span>+ $0.15 / million</span></span></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p><span><span>Compute: Duration</span></span></p>
                    </td>
                    <td>
                        <p><span><span>13,000 GB-s / day</span></span></p>
                    </td>
                    <td>
                        <p><span><span>400,000 GB-s / month  included </span></span></p>
                        <p><span><span>+ $12.50 / million GB-s</span></span></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p><span><span>Storage: Rows read</span></span></p>
                    </td>
                    <td>
                        <p><span><span>5 million / day</span></span></p>
                    </td>
                    <td>
                        <p><span><span>25 billion / month included</span></span></p>
                        <p><span><span>+ $0.001 / million </span></span></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p><span><span>Storage: Rows written</span></span></p>
                    </td>
                    <td>
                        <p><span><span>100,000 / day</span></span></p>
                    </td>
                    <td>
                        <p><span><span>50 million / month included</span></span></p>
                        <p><span><span>+ $1.00 / million</span></span></p>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p><span><span>Storage: SQL stored data</span></span></p>
                    </td>
                    <td>
                        <p><span><span>5 GB (total)</span></span></p>
                    </td>
                    <td>
                        <p><span><span>5 GB-month included</span></span></p>
                        <p><span><span>+ $0.20 / GB-month</span></span></p>
                    </td>
                </tr>
            </tbody>
        </table>
    </figure>
</div>
    <div>
      <h3>Find us at agents.cloudflare.com</h3>
      <a href="#find-us-at-agents-cloudflare-com">
        
      </a>
    </div>
    <p>We realize this is a lot of information to take in, but don’t worry. Whether you’re new to agents as a whole, or looking to learn more about how Cloudflare can help you build agents, today we launched a new site to help get you started — <a href="https://agents.cloudflare.com"><u>agents.cloudflare.com</u></a>. </p><p>Let us know what you build!</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Agents]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Model Context Protocol]]></category>
            <category><![CDATA[MCP]]></category>
            <guid isPermaLink="false">6lQQWDqELUkL4c1y13VL0V</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Dina Kozlov</dc:creator>
            <dc:creator>Vy Ton</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome to Developer Week 2025]]></title>
            <link>https://blog.cloudflare.com/welcome-to-developer-week-2025/</link>
            <pubDate>Sun, 06 Apr 2025 17:00:00 GMT</pubDate>
            <description><![CDATA[ We’re kicking off Cloudflare’s 2025 Developer Week — our innovation week dedicated to announcements for developers. ]]></description>
            <content:encoded><![CDATA[ <p>We’re kicking off Cloudflare’s 2025 Developer Week — our innovation week dedicated to announcements for developers.</p><p>It’s an exciting time to be a developer. In fact, as a developer, the past two years might have felt a bit like every week is Developer Week. Starting with the release of ChatGPT, it has felt like each day has brought a new, disruptive announcement, whether it’s new models, hardware, agents, or other tools. From late 2024 and in just the first few months of 2025, we’ve seen the DeepSeek model challenge assumptions about what it takes to train a new state-of-the-art model, <a href="https://www.cloudflare.com/learning/ai/what-is-model-context-protocol-mcp/"><u>MCP</u></a> introduce a new standard for how LLMs interface with the world, and OpenAI’s o4 model Ghiblify the world.</p><p>And while it’s exciting to witness a technological revolution unfold in front of your eyes, it’s even more exciting to partake in it. </p>
    <div>
      <h2>A new era of innovation</h2>
      <a href="#a-new-era-of-innovation">
        
      </a>
    </div>
    <p>One of the marvels of the recent AI revolution is the extent to which the cost of experimentation has gone down. Ideas that would have taken whole weekends, weeks, or months to build can now be turned into working code in a day. You can <a href="https://www.cloudflare.com/learning/ai/ai-vibe-coding/"><u>vibe-code</u></a> your way through things you might have never even tried before, or the parts of application that just don’t excite you. Whether you’ve spent your career working on frontend, backend, mobile, distributed systems or databases — with AI, you can truly be a full-stack engineer.</p><p>AI is making it faster to ship more code <i>and </i>expanding the audience of who can write code (anyone!) — <b>in the next 5 years we believe more code will be written than has been in the history of software</b>.</p><p>However, for all these seedlings of opportunity to flourish, a platform needs to exist to make it just as easy to deploy and scale the code as it was to write it.</p><p>As Andrej Karpathy said in his recent <a href="https://x.com/karpathy/status/1905051558783418370"><u>post</u></a>, on building a web application: “<i>It's not even code, it's... configurations, plumbing, orchestration, workflows, best practices</i>.”</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5wl4HsEw8SoTYvanlLJxXh/48a29a0b69e1703f883e6cb04e11c1d1/image4.png" />
          </figure>
    <div>
      <h2>The platform for the AI era</h2>
      <a href="#the-platform-for-the-ai-era">
        
      </a>
    </div>
    <p>That’s Cloudflare’s vision for developers — to provide a comprehensive platform that <i>just works</i>. From experiment, to MVP, to scaling to millions of users.</p><p>We started on that vision almost 8 years ago now, with the launch of <a href="https://developers.cloudflare.com/workers/"><u>Cloudflare Workers</u></a>, and kept chipping away at adding more and more primitives to allow developers to deploy their full-stack in one place.</p><p>Today, Cloudflare’s platform offers many of the building blocks you need: from compute, to storage, databases, and AI. With the tools you need to build along every step of the way: from local development to gradually rolling out to production, <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD</a>, and <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a>.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4e8ine6Izm5hQzHy56ilgu/6b7a75dfb2d99a077f7bdc0e95f7f119/without.png" />
          </figure><p>And, everything you build is deployed to Region: Earth, which means you never have to think about servers, scaling, or infrastructure. This is especially important today — when the industry is moving at an unprecedented pace, the opportunity cost of slowing down is the difference between success and failure. </p>
    <div>
      <h2>Developer Week 2025</h2>
      <a href="#developer-week-2025">
        
      </a>
    </div>
    <p>We’re incredibly proud of what we’ve built over the past 8 years, yet our work is nowhere near done. As our co-founder <a href="https://blog.cloudflare.com/author/michelle-zatlyn/"><u>Michelle</u></a> likes to say, we’re just getting started.</p><p>And this Developer Week we’re excited to take another step forward towards our mission. So what can you expect this Developer Week?</p><p>We’ll be releasing more tools and products to continue to ensure you have everything you need when building an application, whether it’s a web app, an agent, an MCP server, or anything else you dream up.</p><p>As I previously mentioned, though, primitives are just part of the equation. Building a developer platform also means investing in the developer experience. Many of you have been building on our platform for some time, and it’s an honor we don’t take lightly. We’re constantly listening to your feedback and improving the platform based on it. So this week, some of the announcements will be a direct reflection of that. </p>
    <div>
      <h2>See you around!</h2>
      <a href="#see-you-around">
        
      </a>
    </div>
    <p>One of the best, most rewarding parts of getting to work on this platform over the past 8 years has been seeing all that developers built on it. We want to hear your thoughts, feedback and what you’re building, and hope you share it with us whether on <a href="https://x.com/cloudflaredev"><u>X</u></a>, <a href="https://discord.com/invite/cloudflaredev"><u>Discord</u></a>, or in person at one of our meetups in <a href="https://lu.ma/hhws9bsx"><u>San Francisco</u></a>, <a href="https://lu.ma/43j0hpzf"><u>Austin</u></a>, and <a href="https://lu.ma/n6hxasmm"><u>London</u></a> this week.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/41HBPbCcgzvSjbrXd0m1gb/4d9f8d4f0c62ab2acd9f2832c241166d/image3.png" />
          </figure><p></p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">2o2NvqEIGYROgDU9dMzKce</guid>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Making Cloudflare the best platform for building AI Agents]]></title>
            <link>https://blog.cloudflare.com/build-ai-agents-on-cloudflare/</link>
            <pubDate>Tue, 25 Feb 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to share a few announcements on how we’re making it even easier to build AI agents on Cloudflare. ]]></description>
            <content:encoded><![CDATA[ <p>As engineers, we’re obsessed with efficiency and automating anything we find ourselves doing more than twice. If you’ve ever done this, you know that the happy path is always easy, but the second the inputs get complex, automation becomes really hard. This is because computers have traditionally required extremely specific instructions in order to execute.</p><p>The state of AI models available to us today has changed that. We now have access to computers that can reason, and make judgement calls in lieu of specifying every edge case under the sun.</p><p>That’s what <a href="https://www.cloudflare.com/learning/ai/what-is-agentic-ai/">AI agents</a> are all about.</p><p>Today we’re excited to share a few announcements on how we’re making it <i>even</i> <i>easier</i> to build AI agents on Cloudflare, including:</p><ul><li><p><code>agents-sdk</code> — a new JavaScript framework for building AI agents</p></li><li><p>Updates to Workers AI: structured outputs, tool calling, and longer context windows for <a href="https://developers.cloudflare.com/workers-ai/"><u>Workers AI</u></a>, Cloudflare’s serverless inference engine</p></li><li><p>An update to the <a href="https://github.com/cloudflare/workers-ai-provider"><u>workers-ai-provider</u></a> for the AI SDK</p></li></ul><p>We truly believe that Cloudflare is the ideal platform for building Agents and AI applications (more on why below), and we’re constantly working to make it better — you can expect to see more announcements from us in this space in the future.</p><p>Before we dive deep into the announcements, we wanted to give you a quick primer on agents. If you are familiar with agents, feel free to skip ahead. </p>
    <div>
      <h2>What are agents?</h2>
      <a href="#what-are-agents">
        
      </a>
    </div>
    <p>Agents are AI systems that can autonomously execute tasks by making decisions about tool usage and process flow. Unlike traditional automation that follows predefined paths, agents can dynamically adapt their approach based on context and intermediate results. Agents are also distinct from co-pilots (e.g. traditional chat applications) in that they can fully automate a task, as opposed to simply augmenting and extending human input.</p><ul><li><p>Agents → non-linear, non-deterministic (can change from run to run)</p></li><li><p>Workflows → linear, deterministic execution paths</p></li><li><p>Co-pilots → augmentative AI assistance requiring human intervention</p></li></ul>
    <div>
      <h3>Example: booking vacations</h3>
      <a href="#example-booking-vacations">
        
      </a>
    </div>
    <p>If this is your first time working with, or interacting with agents, this example will illustrate how an agent works within a context like booking a vacation.</p><p>Imagine you're trying to book a vacation. You need to research flights, find hotels, check restaurant reviews, and keep track of your budget.</p><p><b>Traditional workflow automation</b></p><p>A traditional automation system follows a predetermined sequence: it can take inputs such as dates, location, and budget, and make calls to predefined APIs in a fixed order. However, if any unexpected situations arise, such as flights being sold out, or the specified hotels being unavailable, it cannot adapt. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7fHwj0r4JgRDawOQnNN618/2f369a5224dee288d3baf656d5952469/image1.png" />
          </figure><p><b>AI co-pilot</b></p><p>A co-pilot acts as an intelligent assistant that can provide hotel and itinerary recommendations based on your preferences. If you have questions, it can understand and respond to natural language queries and offer guidance and suggestions. However, it is unable to take the next steps to execute the end-to-end action on its own. </p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/24e3EQSLKo3CJsKv0gFban/6a23620857c6bca8a873da185ee5be56/image2.png" />
          </figure><p><b>Agent</b></p><p>An agent combines AI's ability to make judgements and call the relevant tools to execute the task. An agent's output will be nondeterministic given: real-time availability and pricing changes, dynamic prioritization of constraints, ability to recover from failures, and adaptive decision-making based on intermediate results. In other words, if flights or hotels are unavailable, an agent can reassess and suggest a new itinerary with altered dates or locations, and continue executing your travel booking.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/30QFnfkVyFm1tyV9B2QvXU/ac79ff6ac70ba609d4ecf714d34f0146/image3.png" />
          </figure>
    <div>
      <h2>agents-sdk — the framework for building agents</h2>
      <a href="#agents-sdk-the-framework-for-building-agents">
        
      </a>
    </div>
    <p>You can now add agent powers to any existing Workers project with just one command:</p>
            <pre><code>$ npm i agents-sdk</code></pre>
            <p>… or if you want to build something from scratch, you can bootstrap your project with the <a href="https://github.com/cloudflare/agents-starter"><u>agents-starter template</u></a>:</p>
            <pre><code>$ npm create cloudflare@latest -- --template cloudflare/agents-starter
// ... and then deploy it
$ npm run deploy</code></pre>
            <p><code>agents-sdk</code> is a framework that allows you to build agents —  software that can autonomously execute tasks — and deploy them directly into production on Cloudflare Workers.</p><p>Your agent can start with the basics and act on HTTP requests…</p>
            <pre><code>import { Agent } from "agents-sdk";

export class IntelligentAgent extends Agent {
  async onRequest(request) {
    // Transform intention into response
    return new Response("Ready to assist.");
  }
}</code></pre>
            <p>Although this is just the initial release of <code>agents-sdk</code>, we wanted to ship more than just a thin wrapper over an existing library. Agents can communicate with clients in real time, persist state, execute long-running tasks on a schedule, send emails, run asynchronous workflows, browse the web, query data from your Postgres database, call AI models, and support human-in-the-loop use-cases. All of this works today, out of the box.</p><p>For example, you can build a powerful chat agent with the <code>AIChatAgent</code> class:</p>
            <pre><code>// src/index.ts
export class Chat extends AIChatAgent&lt;Env&gt; {
  /**
   * Handles incoming chat messages and manages the response stream
   * @param onFinish - Callback function executed when streaming completes
   */
  async onChatMessage(onFinish: StreamTextOnFinishCallback&lt;any&gt;) {
    // Create a streaming response that handles both text and tool outputs
    return agentContext.run(this, async () =&gt; {
      const dataStreamResponse = createDataStreamResponse({
        execute: async (dataStream) =&gt; {
          // Process any pending tool calls from previous messages
          // This handles human-in-the-loop confirmations for tools
          const processedMessages = await processToolCalls({
            messages: this.messages,
            dataStream,
            tools,
            executions,
          });

          // Initialize OpenAI client with API key from environment
          const openai = createOpenAI({
            apiKey: this.env.OPENAI_API_KEY,
          });

          // Cloudflare AI Gateway
          // const openai = createOpenAI({
          //   apiKey: this.env.OPENAI_API_KEY,
          //   baseURL: this.env.GATEWAY_BASE_URL,
          // });

          // Stream the AI response using GPT-4
          const result = streamText({
            model: openai("gpt-4o-2024-11-20"),
            system: `
              You are a helpful assistant that can do various tasks. If the user asks, then you can also schedule tasks to be executed later. The input may have a date/time/cron pattern to be input as an object into a scheduler The time is now: ${new Date().toISOString()}.
              `,
            messages: processedMessages,
            tools,
            onFinish,
            maxSteps: 10,
          });

          // Merge the AI response stream with tool execution outputs
          result.mergeIntoDataStream(dataStream);
        },
      });

      return dataStreamResponse;
    });
  }
  async executeTask(description: string, task: Schedule&lt;string&gt;) {
    await this.saveMessages([
      ...this.messages,
      {
        id: generateId(),
        role: "user",
        content: `scheduled message: ${description}`,
      },
    ]);
  }
}

export default {
  async fetch(request: Request, env: Env, ctx: ExecutionContext) {
    if (!env.OPENAI_API_KEY) {
      console.error(
        "OPENAI_API_KEY is not set, don't forget to set it locally in .dev.vars, and use `wrangler secret bulk .dev.vars` to upload it to production"
      );
      return new Response("OPENAI_API_KEY is not set", { status: 500 });
    }
    return (
      // Route the request to our agent or return 404 if not found
      (await routeAgentRequest(request, env)) ||
      new Response("Not found", { status: 404 })
    );
  },
} satisfies ExportedHandler&lt;Env&gt;;</code></pre>
            <p>… and connect to your Agent with any React-based front-end with the <a href="https://github.com/cloudflare/agents-starter/blob/main/src/app.tsx"><code><u>useAgent</u></code></a> hook that can automatically establish a bidirectional WebSocket, sync client state, and allow you to build Agent-based applications without a mountain of bespoke code:</p>
            <pre><code>// src/app.tsx
import { useAgent } from "agents-sdk/react";  

const agent = useAgent({
  agent: "chat",
});</code></pre>
            <p>We spent some time thinking about the production story here too: an agent framework that absolves itself of the hard parts — durably persisting state, handling long-running tasks &amp; loops, and horizontal scale — is only going to get you so far. Agents built with <code>agents-sdk</code> can be deployed directly to Cloudflare and run on top of <a href="https://developers.cloudflare.com/durable-objects/"><u>Durable Objects</u></a> — which you can think of as stateful micro-servers that can scale to tens of millions — and are able to run wherever they need to. Close to a user for low-latency, close to your data, and/or anywhere in between.</p><p><code>agents-sdk</code> also exposes:</p><ul><li><p>Integration with React applications via a <code>useAgent</code> hook that can automatically set up a WebSocket connection between your app and an agent</p></li><li><p>An <code>AIChatAgent</code> extension that makes it easier to build intelligent chat agents</p></li><li><p>State management APIs via <code>this.setState</code> as well as a native <code>sql</code> API for writing and querying data within each Agent</p></li><li><p>State synchronization between frontend applications and the agent state</p></li><li><p>Agent routing, enabling agent-per-user or agent-per-workflow use-cases. Spawn millions (or tens of millions) of agents without having to think about how to make the infrastructure work, provision CPU, or scale out storage.</p></li></ul><p>Over the coming weeks, expect to see even more here: tighter integration with email APIs to enable more human-in-the-loop use-cases, hooks into WebRTC for voice &amp; video interactivity, a built-in evaluation (evals) framework, and the ability to self-host agents on your own infrastructure.</p><p>We’re aiming high here: we think this is just the beginning of what agents are capable of, and we think we can make Workers the best place (but not the only place) to build &amp; run them.</p>
    <div>
      <h2>JSON mode, longer context windows, and improved tool calling in Workers AI</h2>
      <a href="#json-mode-longer-context-windows-and-improved-tool-calling-in-workers-ai">
        
      </a>
    </div>
    <p>When users express needs conversationally, tool calling converts these requests into structured formats like JSON that APIs can understand and process, allowing the AI to interact with databases, services, and external systems. This is essential for building agents, as it allows users to express complex intentions in natural language, and AI to decompose these requests, call appropriate tools, evaluate responses and deliver meaningful outcomes.</p><p>When using tool calling or building AI agents, the text generation model must respond with valid JSON objects rather than natural language. Today, we're adding JSON mode support to Workers AI, enabling applications to request a structured output response when interacting with AI models. Here's a request to <code>@cf/meta/llama-3.1-8b-instruct-fp8-fast</code> using JSON mode:</p>
            <pre><code>{
  "messages": [
    {
      "role": "system",
      "content": "Extract data about a country."
    },
    {
      "role": "user",
      "content": "Tell me about India."
    }
  ],
  "response_format": {
    "type": "json_schema",
    "json_schema": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "capital": {
          "type": "string"
        },
        "languages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "name",
        "capital",
        "languages"
      ]
    }
  }
}</code></pre>
            <p>And here’s how the model will respond:</p>
            <pre><code>{
  "response": {
    "name": "India",
    "capital": "New Delhi",
    "languages": [
      "Hindi",
      "English",
      "Bengali",
      "Telugu",
      "Marathi",
      "Tamil",
      "Gujarati",
      "Urdu",
      "Kannada",
      "Odia",
      "Malayalam",
      "Punjabi",
      "Sanskrit"
    ]
  }
}</code></pre>
            <p>As you can see, the model is complying with the JSON schema definition in the request and responding with a validated JSON object. JSON mode is compatible with OpenAI’s <code>response_format</code> implementation:</p>
            <pre><code>response_format: {
  title: "JSON Mode",
  type: "object",
  properties: {
    type: {
      type: "string",
      enum: ["json_object", "json_schema"],
    },
    json_schema: {},
  }
}</code></pre>
            <p>This is the list of models that now support JSON mode:</p><ul><li><p><a href="https://developers.cloudflare.com/workers-ai/models/llama-3.1-8b-instruct-fast/"><u>@cf/meta/llama-3.1-8b-instruct-fast</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/llama-3.1-70b-instruct/"><u>@cf/meta/llama-3.1-70b-instruct</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/llama-3.3-70b-instruct-fp8-fast/"><u>@cf/meta/llama-3.3-70b-instruct-fp8-fast</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/deepseek-r1-distill-qwen-32b/"><u>@cf/deepseek-ai/deepseek-r1-distill-qwen-32b</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/llama-3-8b-instruct/"><u>@cf/meta/llama-3-8b-instruct</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/llama-3.1-8b-instruct/"><u>@cf/meta/llama-3.1-8b-instruct</u></a></p></li><li><p><a href="https://developers.cloudflare.com/workers-ai/models/hermes-2-pro-mistral-7b/"><u>@hf/nousresearch/hermes-2-pro-mistral-7b</u></a></p></li></ul><p>We will continue extending this list to keep up with new, and requested models.</p><p>Lastly, we are changing how we restrict the size of AI requests to text generation models, moving from byte-counts to token-counts, introducing the concept of <b>context window</b> and raising the limits of the models in our catalog.</p><p>In generative AI, the context window is the sum of the number of input, reasoning, and completion or response tokens a model supports. You can now find the context window limit on each <a href="https://developers.cloudflare.com/workers-ai/models/llama-3.1-70b-instruct/"><u>model page</u></a> in our developer documentation and decide which suits your requirements and use case.</p><p>JSON mode is also the perfect companion when using function calling. You can use structured JSON outputs with traditional function calling or the Vercel AI SDK via the <code>workers-ai-provider</code>.</p>
    <div>
      <h2><a href="https://github.com/cloudflare/workers-ai-provider">workers-ai-provider</a> 0.1.1</h2>
      <a href="#0-1-1">
        
      </a>
    </div>
    <p>One of the most common ways to build with AI tooling today is by using the popular <a href="https://sdk.vercel.ai/docs/introduction"><u>AI SDK</u></a>. <a href="https://github.com/cloudflare/workers-ai-provider"><u>Cloudflare’s provider</u></a> for the AI SDK makes it easy to use Workers AI the same way you would call any other LLM, directly from your code.</p><p>In the <a href="https://github.com/cloudflare/workers-ai-provider/tree/workers-ai-provider%400.1.1"><u>most recent version</u></a>, we’ve shipped the following improvements: </p><ul><li><p>Tool calling enabled for generateText</p></li><li><p>Streaming now works out of the box</p></li><li><p>Usage statistics are now enabled</p></li><li><p>You can now use AI Gateway, even when streaming</p></li></ul><p>A key part of building agents is using LLMs for routing, and making decisions on which tools to call next, and summarizing structured and unstructured data. All of these things need to happen quickly, as they are on the critical path of the user-facing experience.</p><p>Workers AI, with its globally distributed fleet of GPUs, is a perfect fit for smaller, low-latency LLMs, so we’re excited to make it easy to use with tools developers are already familiar with. </p>
    <div>
      <h2>Why build agents on Cloudflare? </h2>
      <a href="#why-build-agents-on-cloudflare">
        
      </a>
    </div>
    <p>Since launching Workers in 2017, we’ve been building a platform to allow developers to build applications that are fast, scalable, and cost-efficient from day one. We took a fundamentally different approach from the way code was previously run on servers, making a bet about what the future of applications was going to look like — isolates running on a global network, in a way that was truly serverless. No regions, no concurrency management, no managing or scaling infrastructure. </p><p>The release of Workers was just the beginning, and we continued shipping primitives to extend what developers could build. Some more familiar, like a key-value store (<a href="https://developers.cloudflare.com/kv/"><u>Workers KV</u></a>), and some that we thought would play a role in enabling net new use cases like <a href="https://developers.cloudflare.com/durable-objects/"><u>Durable Objects</u></a>. While we didn’t quite predict AI agents (though “Agents” was one of the proposed names for Durable Objects), we inadvertently created the perfect platform for building them. </p><p>What do we mean by that? </p>
    <div>
      <h3>A platform that only charges you for what you use (regardless of how long it takes)</h3>
      <a href="#a-platform-that-only-charges-you-for-what-you-use-regardless-of-how-long-it-takes">
        
      </a>
    </div>
    <p>To be able to run agents efficiently, you need a system that can seamlessly scale up and down to support the constant stop, go, wait patterns. Agents are basically long-running tasks, sometimes waiting on slow reasoning LLMs and external tools to execute. With Cloudflare, you don’t have to pay for long-running processes when your code is not executing. Cloudflare Workers is designed to scale down and <a href="https://blog.cloudflare.com/workers-pricing-scale-to-zero/"><u>only charge you for CPU time</u></a>, as opposed to wall-clock time. </p><p>In many cases, especially when calling LLMs, the difference can be in orders of magnitude — e.g. 2–3 milliseconds of CPU vs. 10 seconds of wall-clock time. When building on Workers, we pass that difference on to you as cost savings. </p>
    <div>
      <h3>Serverless AI Inference</h3>
      <a href="#serverless-ai-inference">
        
      </a>
    </div>
    <p>We took a similar serverless approach when it comes to inference itself. When you need to call an AI model, you need it to be instantaneously available. While the foundation model providers offer APIs that make it possible to just call the LLM, if you’re running open-source models, <a href="https://www.cloudflare.com/learning/ai/what-is-lora/"><u>LoRAs</u></a>, or self-trained models, most cloud providers today require you to pre-provision resources for what your peak traffic will look like. This means that the rest of the time, you’re still paying for GPUs to sit there idle. With Workers AI, you can pay only when you’re calling our inference APIs, as opposed to unused infrastructure. In fact, you don’t have to think about infrastructure at all, which is the principle at the core of everything we do. </p>
    <div>
      <h3>A platform designed for durable execution</h3>
      <a href="#a-platform-designed-for-durable-execution">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/durable-objects/"><u>Durable Objects</u></a> and <a href="https://developers.cloudflare.com/workflows"><u>Workflows</u></a> provide a robust programming model that ensures guaranteed execution for asynchronous tasks that require persistence and reliability. This makes them ideal for handling complex operations like long-running deep thinking LLM calls, human-in-the-loop approval processes, or interactions with unreliable third-party APIs. By maintaining state across requests and automatically handling retries, these tools create a resilient foundation for building sophisticated AI agents that can perform complex, multistep tasks without losing context or progress, even when operations take significant time to complete.</p>
    <div>
      <h2>Lastly, new and updated agents documentation</h2>
      <a href="#lastly-new-and-updated-agents-documentation">
        
      </a>
    </div>
    <p>Did you catch all of that?</p><p>No worries if not: we’ve updated our <a href="https://developers.cloudflare.com/agents"><u>agents documentation</u></a> to include everything we talked about above, from breaking down the basics of agents, to showing you how to tackle foundational examples of building with agents.</p><p>We’ve also updated our <a href="https://developers.cloudflare.com/workers/get-started/prompting/"><u>Workers prompt</u></a> with knowledge of the agents-sdk library, so you can use Cursor, Windsurf, Zed, ChatGPT or Claude to help you build AI Agents and deploy them to Cloudflare.</p>
    <div>
      <h2>Can’t wait to see what you build! </h2>
      <a href="#cant-wait-to-see-what-you-build">
        
      </a>
    </div>
    <p>We’re just getting started, and we love to see all that you build. Please join our <a href="https://discord.com/invite/cloudflaredev"><u>Discord</u></a>, ask questions, and tell us what you’re building.</p> ]]></content:encoded>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Durable Objects]]></category>
            <guid isPermaLink="false">1k3ytqqRxQ9SsiYLMSBDfO</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Sunil Pai</dc:creator>
            <dc:creator>Matt Silverlock</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare acquires Baselime to expand serverless application observability capabilities]]></title>
            <link>https://blog.cloudflare.com/cloudflare-acquires-baselime-expands-observability-capabilities/</link>
            <pubDate>Fri, 05 Apr 2024 15:50:00 GMT</pubDate>
            <description><![CDATA[ Today, we’re thrilled to announce that Cloudflare has acquired Baselime, a serverless observability company ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Today, we’re thrilled to announce that <a href="https://www.cloudflare.com/press-releases/2024/cloudflare-enters-observability-market-with-acquisition-baselime/">Cloudflare has acquired Baselime</a>.</p><p>The cloud is changing. Just a few years ago, serverless functions were revolutionary. Today, entire applications are built on serverless architectures, from compute to databases, storage, queues, etc. — with Cloudflare leading the way in making it easier than ever for developers to build, without having to think about their architecture. And while the adoption of serverless has made it simple for developers to run fast, it has also made one of the most difficult problems in software even harder: how the heck do you unravel the behavior of distributed systems?</p><p>When I started Baselime 2 years ago, our goal was simple: enable every developer to build, ship, and learn from their serverless applications such that they can resolve issues before they become problems.</p><p>Since then, we built an observability platform that enables developers to understand the behaviour of their cloud applications. It’s designed for high cardinality and dimensionality data, from logs to distributed tracing with <a href="https://opentelemetry.io/">OpenTelemetry</a>. With this data, we automatically surface insights from your applications, and enable you to quickly detect, troubleshoot, and resolve issues in production.</p><p>In parallel, Cloudflare has been busy the past few years building the next frontier of cloud computing: the connectivity cloud. The team is building primitives that enable developers to build applications with a completely new set of paradigms, from Workers to D1, <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a>, Queues, KV, Durable Objects, AI, and all the other services available on the Cloudflare Developers Platform.</p><p>This synergy makes Cloudflare the perfect home for Baselime. Our core mission has always been to simplify and innovate around observability for the future of the cloud, and Cloudflare's ecosystem offers the ideal ground to further this cause. With Cloudflare, we're positioned to deeply integrate into a platform that tens of thousands of developers trust and use daily, enabling them to quickly build, ship, and troubleshoot applications. We believe that every Worker, Queue, KV, Durable Object, AI call, etc. should have built-in observability by default.</p><p>That’s why we’re incredibly excited about the potential of what we can build together and the impact it will have on developers around the world.</p><p>To give you a preview into what’s ahead, I wanted to dive deeper into the 3 core concepts we followed while building Baselime.</p>
    <div>
      <h3>High Cardinality and Dimensionality</h3>
      <a href="#high-cardinality-and-dimensionality">
        
      </a>
    </div>
    <p>Cardinality and dimensionality are best described using examples. Imagine you’re playing a board game with a deck of cards. High cardinality is like playing a game where every card is a unique character, making it hard to remember or match them. And high dimensionality is like each card has tons of details like strength, speed, magic, aura, etc., making the game's strategy complex because there's so much to consider.</p><p>This also applies to the data your application emits. For example, when you log an HTTP request that makes database calls.</p><ul><li><p>High cardinality means that your logs can have a unique <code>userId</code> or <code>requestId</code> (which can take millions of distinct values). Those are high cardinality fields.</p></li><li><p>High dimensionality means that your logs can have thousands of possible fields. You can record each HTTP header of your request and the details of each database call. Any log can be a key-value object with thousands of individual keys.</p></li></ul><p>The ability to query on high cardinality and dimensionality fields is key to modern observability. You can surface all errors or requests for a specific user, compute the duration of each of those requests, and group by location. You can answer all of those questions with a single tool.</p>
    <div>
      <h3>OpenTelemetry</h3>
      <a href="#opentelemetry">
        
      </a>
    </div>
    <p><a href="https://opentelemetry.io/">OpenTelemetry</a> provides a common set of tools, APIs, SDKs, and standards for instrumenting applications. It is a game-changer for debugging and understanding cloud applications. You get to see the big picture: how fast your HTTP APIs are, which routes are experiencing the most errors, or which database queries are slowest. You can also get into the details by following the path of a single request or user across your entire application.</p><p>Baselime is OpenTelemetry native, and it is built from the ground up to leverage OpenTelemetry data. To support this, we built a set of OpenTelemetry SDKs compatible with several serverless runtimes.</p><p>Cloudflare is building the cloud of tomorrow and has developed <a href="https://github.com/cloudflare/workerd">workerd</a>, a modern JavaScript runtime for Workers. With Cloudflare, we are considering embedding OpenTelemetry directly in the Workers’ runtime. That’s one more reason we’re excited to grow further at Cloudflare, enabling more developers to understand their applications, even in the most unconventional scenarios.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5srzwFELwKonKcv5tbyl7D/56db2543ab62c98e198b39164565308c/pasted-image-0--8-.png" />
            
            </figure>
    <div>
      <h3>Developer Experience</h3>
      <a href="#developer-experience">
        
      </a>
    </div>
    <p>Observability without action is just storage. I have seen too many developers pay for tools to store logs and metrics they never use, and the key reason is how opaque these tools are.</p><p>The crux of the issue in modern observability isn’t the technology itself, but rather the developer experience. Many tools are complex, with a significant learning curve. This friction reduces the speed at which developers can identify and resolve issues, ultimately affecting the reliability of their applications. Improving developer experience is key to unlocking the full potential of observability.</p><p>We built Baselime to be an exploratory solution that surfaces insights to you rather than requiring you to dig for them. For example, we notify you in real time when errors are discovered in your application, based on your logs and traces. You can quickly search through all of your data with full-text search, or using our powerful query engine, which makes it easy to correlate logs and traces for increased visibility, or ask our AI debugging assistant for insights on the issue you’re investigating.</p><p>It is always possible to go from one insight to another, asking questions about the state of your app iteratively until you get to the root cause of the issue you are troubleshooting.</p><p>Cloudflare has always prioritised the developer experience of its developer platform, especially with <a href="https://developers.cloudflare.com/workers/wrangler/">Wrangler</a>, and we are convinced it’s the right place to solve the developer experience problem of observability.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57hiGcPaNP3WBnqhDbU1TC/48fd408810c38c23969a932b72636da0/pasted-image-0-2.png" />
            
            </figure>
    <div>
      <h3>What’s next?</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Over the next few months, we’ll work to bring the core of Baselime into the Cloudflare ecosystem, starting with OpenTelemetry, real-time error tracking, and all the developer experience capabilities that make a great observability solution. We will keep building and improving observability for applications deployed outside Cloudflare because we understand that observability should work across providers.</p><p>But we don’t want to stop there. We want to push the boundaries of what modern observability looks like. For instance, directly connecting to your codebase and correlating insights from your logs and traces to functions and classes in your codebase. We also want to enable more AI capabilities beyond our debugging assistant. We want to deeply integrate with your repositories such that you can go from an error in your logs and traces to a Pull Request in your codebase within minutes.</p><p>We also want to enable everyone building on top of Large Language Models to do all your LLM observability directly within Cloudflare, such that you can optimise your prompts, improve latencies and reduce error rates directly within your cloud provider. These are just a handful of capabilities we can now build with the support of the Cloudflare platform.</p>
    <div>
      <h3>Thanks</h3>
      <a href="#thanks">
        
      </a>
    </div>
    <p>We are incredibly thankful to our community for its continued support, from day 0 to today. With your continuous feedback, you’ve helped us build something we’re incredibly proud of.</p><p>To all the developers currently using Baselime, you’ll be able to keep using the product and will receive ongoing support. Also, we are now making all the paid Baselime features completely free.</p><p>Baselime products remain available to sign up for while we work on integrating with the Cloudflare platform. We anticipate sunsetting the Baselime products towards the end of 2024 when you will be able to observe all of your applications within the Cloudflare dashboard. If you're interested in staying up-to-date on our work with Cloudflare, we will release a signup link in the coming weeks!</p><p>We are looking forward to continuing to innovate with you.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Observability]]></category>
            <category><![CDATA[Acquisitions]]></category>
            <category><![CDATA[Connectivity Cloud]]></category>
            <guid isPermaLink="false">7MaPl0JR4okx51bFTrn69J</guid>
            <dc:creator>Boris Tane</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare acquires PartyKit to allow developers to build real-time multi-user applications]]></title>
            <link>https://blog.cloudflare.com/cloudflare-acquires-partykit/</link>
            <pubDate>Fri, 05 Apr 2024 13:00:56 GMT</pubDate>
            <description><![CDATA[ We're thrilled to announce that PartyKit, a trailblazer in enabling developers to craft ambitious real-time, collaborative, multiplayer applications, is now a part of Cloudflare ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We're thrilled to announce that PartyKit, an open source platform for deploying real-time, collaborative, multiplayer applications, is now a part of Cloudflare. This acquisition marks a significant milestone in our journey to redefine the boundaries of serverless computing, making it more dynamic, interactive, and, importantly, stateful.</p>
    <div>
      <h3>Defining the future of serverless compute around state</h3>
      <a href="#defining-the-future-of-serverless-compute-around-state">
        
      </a>
    </div>
    <p>Building real-time applications on the web have always been difficult. Not only is it a distributed systems problem, but you need to provision and manage infrastructure, databases, and other services to maintain state across multiple clients. This complexity has traditionally been a barrier to entry for many developers, especially those who are just starting out.</p><p><a href="/introducing-workers-durable-objects">We announced Durable Objects in 2020</a> as a way of building synchronized real time experiences for the web. Unlike regular serverless functions that are ephemeral and stateless, Durable Objects are stateful, allowing developers to build applications that maintain state across requests. They also act as an ideal synchronization point for building real-time applications that need to maintain state across multiple clients. Combined with WebSockets, Durable Objects can be used to build a wide range of applications, from multiplayer games to collaborative drawing tools.</p><p>In 2022, PartyKit began as a project to further explore the capabilities of Durable Objects and make them more accessible to developers by exposing them through familiar components. In seconds, you could create a project that configured behavior for these objects, and deploy it to Cloudflare. By integrating with popular libraries such as <a href="https://github.com/yjs/yjs">Yjs</a> (the gold standard in collaborative editing) and React, PartyKit made it possible for developers to build a wide range of use cases, from multiplayer games to collaborative drawing tools, into their applications.</p><p>Building experiences with real-time components was previously only accessible to multi-billion dollar companies, but new computing primitives like Durable Objects on the edge make this accessible to regular developers and teams. With PartyKit now under our roof, we're doubling down on our commitment to this future — a future where serverless is stateful.</p><p>We’re excited to give you a preview into our shared vision for applications, and the use cases we’re excited to simplify together.</p>
    <div>
      <h3>Making state for serverless easy</h3>
      <a href="#making-state-for-serverless-easy">
        
      </a>
    </div>
    <p>Unlike conventional approaches that rely on external databases to maintain state, thereby complicating scalability and increasing costs, PartyKit leverages Cloudflare's Durable Objects to offer a seamless model where stateful serverless functions can operate as if they were running on a single machine, maintaining state across requests. This innovation not only simplifies development but also opens up a broader range of use cases, including real-time computing, collaborative editing, and multiplayer gaming, by allowing thousands of these "machines" to be spun up globally, each maintaining its own state. PartyKit aims to be a complement to traditional serverless computing, providing a more intuitive and efficient method for developing applications that require stateful behavior, thereby marking the "next evolution" of serverless computing.</p>
    <div>
      <h3>Simplifying WebSockets for Real-Time Interaction</h3>
      <a href="#simplifying-websockets-for-real-time-interaction">
        
      </a>
    </div>
    <p>WebSockets have revolutionized how we think about bidirectional communication on the web. Yet, the challenge has always been about scaling these interactions to millions without a hitch. Cloudflare Workers step in as the hero, providing a serverless framework that makes real-time applications like chat services, multiplayer games, and collaborative tools not just possible but scalable and efficient.</p>
    <div>
      <h3>Powering Games and Multiplayer Applications Without Limits</h3>
      <a href="#powering-games-and-multiplayer-applications-without-limits">
        
      </a>
    </div>
    <p>Imagine building multiplayer platforms where the game never lags, the collaboration is seamless, and video conferences are crystal clear. Cloudflare's Durable Objects morph the stateless serverless landscape into a realm where persistent connections thrive. PartyKit's integration into this ecosystem means developers now have a powerhouse toolkit to bring ambitious multiplayer visions to life, without the traditional overheads.</p><p>This is especially critical in gaming — there are few areas where low-latency and real-time interaction matter more. Every millisecond, every lag, every delay defines the entire experience. With PartyKit's capabilities integrated into Cloudflare, developers will be able to leverage our combined technologies to create gaming experiences that are not just about playing but living the game, thanks to scalable, immersive, and interactive platforms.</p>
    <div>
      <h3>The toolkit for building Local-First applications</h3>
      <a href="#the-toolkit-for-building-local-first-applications">
        
      </a>
    </div>
    <p>The Internet is great, and increasingly always available, but there are still a few situations where we are forced to disconnect — whether on a plane, a train, or a beach.</p><p>The premise of local-first applications is that work doesn't stop when the Internet does. Wherever you left off in your doc, you can keep working on it, assuming the state will be restored when you come back online. By storing data on the client and syncing when back online, these applications offer resilience and responsiveness that's unmatched. Cloudflare's vision, enhanced by PartyKit's technology, aims to make local-first not just an option but the standard for application development.</p>
    <div>
      <h3>What's next for PartyKit users?</h3>
      <a href="#whats-next-for-partykit-users">
        
      </a>
    </div>
    <p>Users can expect their existing projects to continue working as expected. We will be adding more features to the platform, including the ability to create and use PartyKit projects inside existing Workers and Pages projects. There will be no extra charges to use PartyKit for commercial purposes, other than the standard usage charges for Cloudflare Workers and other services. Further, we're going to expand the roadmap to begin working on integrations with popular frameworks and libraries, such as React, Vue, and Angular. We're deeply committed to executing on the PartyKit vision and roadmap, and we're excited to see what you build with it.</p>
    <div>
      <h3>The Beginning of a New Chapter</h3>
      <a href="#the-beginning-of-a-new-chapter">
        
      </a>
    </div>
    <p>The acquisition of PartyKit by Cloudflare isn't just a milestone for our two teams; it's a leap forward for developers everywhere. Together, we're not just building tools; we're crafting the foundation for the next generation of Internet applications. The future of serverless is stateful, and with PartyKit's expertise now part of our arsenal, we're more ready than ever to make that future a reality.</p><p>Welcome to the Cloudflare team, PartyKit. Look forward to building something remarkable together.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Acquisitions]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Durable Objects]]></category>
            <guid isPermaLink="false">7iSu3hCtgPt2FoZ60sWKuO</guid>
            <dc:creator>Sunil Pai</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Making state easy with D1 GA, Hyperdrive, Queues and Workers Analytics Engine updates]]></title>
            <link>https://blog.cloudflare.com/making-full-stack-easier-d1-ga-hyperdrive-queues/</link>
            <pubDate>Mon, 01 Apr 2024 13:00:06 GMT</pubDate>
            <description><![CDATA[ We kick off the week with announcements that help developers build stateful applications on top of Cloudflare, including making D1, our SQL database and Hyperdrive, our database accelerating service, generally available ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4BKrpfqvHnl6yaHdXXsCoc/70280206c43fc4ecfa026968440f52f0/image4-31.png" />
            
            </figure>
    <div>
      <h3>Making full-stack easier</h3>
      <a href="#making-full-stack-easier">
        
      </a>
    </div>
    <p>Today might be April Fools, and while we like to have fun as much as anyone else, we like to use this day for serious announcements. In fact, as of today, there are over 2 million developers building on top of Cloudflare’s platform — that’s no joke!</p><p>To kick off this Developer Week, we’re flipping the big “production ready” switch on three products: <a href="https://developers.cloudflare.com/d1/">D1, our serverless SQL database</a>; <a href="https://developers.cloudflare.com/hyperdrive/">Hyperdrive</a>, which makes your <i>existing</i> databases feel like they’re distributed (and faster!); and <a href="https://developers.cloudflare.com/analytics/analytics-engine/">Workers Analytics Engine</a>, our time-series database.</p><p>We’ve been on a mission to allow developers to bring their entire stack to Cloudflare for some time, but what might an application built on Cloudflare look like?</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5D3F21rYXhLv0bI6FID3Kc/4b0ca6dfc52e168a852599345e111a02/image6-11.png" />
            
            </figure><p>The diagram itself shouldn’t look too different from the tools you’re already familiar with: you want a <a href="https://developers.cloudflare.com/d1/">database</a> for your core user data. <a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">Object storage</a> for assets and user content. Maybe a <a href="https://developers.cloudflare.com/queues/">queue</a> for background tasks, like email or upload processing. A <a href="https://developers.cloudflare.com/kv/">fast key-value store</a> for runtime configuration. Maybe even a <a href="https://developers.cloudflare.com/analytics/analytics-engine/">time-series database</a> for aggregating user events and/or performance data. And that’s before we get to <a href="https://developers.cloudflare.com/workers-ai/">AI</a>, which is increasingly becoming a core part of many applications in search, recommendation and/or image analysis tasks (at the very least!).</p><p>Yet, without having to think about it, this architecture runs on Region: Earth, which means it’s scalable, reliable and fast — all out of the box.</p>
    <div>
      <h3>D1 GA: Production Ready</h3>
      <a href="#d1-ga-production-ready">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6FBwcKFjSHTCL2LcJRtNCo/46c6a403e7f8c743ac8a4dff252d85e4/image2-35.png" />
            
            </figure><p>Your core database is one of the most critical pieces of your infrastructure. It needs to be ultra-reliable. It can’t lose data. It needs to scale. And so we’ve been heads down over the last year getting the pieces into place to make sure D1 is production-ready, and we’re extremely excited to say that D1 — our <a href="https://www.cloudflare.com/developer-platform/products/d1/">global, serverless SQL database</a> — is now Generally Available.</p><p>The GA for D1 lands some of the most asked-for features, including:</p><ul><li><p>Support for 10GB databases — and 50,000 databases per account;</p></li><li><p>New data export capabilities; and</p></li><li><p>Enhanced query debugging (we call it “D1 Insights”) — that allows you to understand what queries are consuming the most time, cost, or that are just plain inefficient…  </p></li></ul><p>… to empower developers to build production-ready applications with D1 to meet all their relational SQL needs. And importantly, in an era where the concept of a “<a href="https://www.cloudflare.com/plans/free/">free plan</a>” or “hobby plan” is seemingly at risk, we have no intention of removing the free tier for D1 or reducing the <i>25 billion row reads</i> included in the $5/mo Workers Paid plan:</p><table><colgroup><col></col><col></col><col></col><col></col></colgroup><tbody><tr><td><p><span>Plan</span></p></td><td><p><span>Rows Read</span></p></td><td><p><span>Rows Written</span></p></td><td><p><span>Storage</span></p></td></tr><tr><td><p><span>Workers</span><span> </span><span>Paid</span></p></td><td><p><span>First 25 billion / month included</span><span><br /></span><span><br /></span><span>+ $0.001 / million rows</span></p></td><td><p><span>First 50 million / month included</span><span><br /></span><span><br /></span><span>+ $1.00 / million rows</span></p></td><td><p><span>First 5 GB included</span></p><br /><p><span>+ $0.75 / GB-mo</span></p></td></tr><tr><td><p><span>Workers Free</span></p></td><td><p><span>5 million / day</span></p></td><td><p><span>100,000 / day</span><span><span>	</span></span></p></td><td><p><span>5 GB (total)</span></p></td></tr></tbody></table><p><i>For those who’ve been following D1 since the start: this is the same pricing we announced at </i><a href="/d1-open-beta-is-here"><i>open beta</i></a></p><p>But things don’t just stop at GA: we have some major new features lined up for D1, including global read replication, even larger databases, more <a href="https://developers.cloudflare.com/d1/reference/time-travel/">Time Travel</a> capabilities that will allow you to branch your database, and new APIs for dynamically querying and/or creating new databases-on-the-fly from within a Worker.</p><p>D1’s read replication will automatically deploy read replicas as needed to get data closer to your users: and without you having to spin up, manage scaling, or run into consistency (replication lag) issues. Here’s a sneak preview of what D1’s upcoming Replication API looks like:</p>
            <pre><code>export default {
  async fetch(request: Request, env: Env) {
    const {pathname} = new URL(request.url);
    let resp = null;
    let session = env.DB.withSession(token); // An optional commit token or mode

    // Handle requests within the session.
    if (pathname === "/api/orders/list") {
      // This statement is a read query, so it will work against any
      // replica that has a commit equal or later than `token`.
      const { results } = await session.prepare("SELECT * FROM Orders");
      resp = Response.json(results);
    } else if (pathname === "/api/orders/add") {
      order = await request.json();

      // This statement is a write query, so D1 will send the query to
      // the primary, which always has the latest commit token.
      await session.prepare("INSERT INTO Orders VALUES (?, ?, ?)")
        .bind(order.orderName, order.customer, order.value);
        .run();

      // In order for the application to be correct, this SELECT
      // statement must see the results of the INSERT statement above.
      //
      // D1's new Session API keeps track of commit tokens for queries
      // within the session and will ensure that we won't execute this
      // query until whatever replica we're using has seen the results
      // of the INSERT.
      const { results } = await session.prepare("SELECT COUNT(*) FROM Orders")
        .run();
      resp = Response.json(results);
    }

    // Set the token so we can continue the session in another request.
    resp.headers.set("x-d1-token", session.latestCommitToken);
    return resp;
  }
}</code></pre>
            <p>Importantly, we will give developers the ability to maintain session-based consistency, so that users still see their own changes reflected, whilst still benefiting from the performance and latency gains that replication can bring.</p><p>You can learn more about how D1’s read replication works under the hood <a href="/building-d1-a-global-database/">in our deep-dive post</a>, and if you want to start building on D1 today, <a href="https://developers.cloudflare.com/d1/">head to our developer docs</a> to create your first database.</p>
    <div>
      <h3>Hyperdrive: GA</h3>
      <a href="#hyperdrive-ga">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/47WBGHvqFpRkza2ldA5RBi/7f7f47055e1f4f066e213b88e9e98737/image1-37.png" />
            
            </figure><p>We launched Hyperdrive into open beta <a href="/hyperdrive-making-regional-databases-feel-distributed">last September during Birthday Week</a>, and it’s now Generally Available — or in other words, battle-tested and production-ready.</p><p>If you’re not caught up on what Hyperdrive is, it’s designed to make the centralized databases you already have feel like they’re global. We use our <a href="https://www.cloudflare.com/network/">global network</a> to get faster routes to your database, keep connection pools primed, and cache your most frequently run queries as close to users as possible.</p><p>Importantly, Hyperdrive supports the most popular drivers and ORM (Object Relational Mapper) libraries out of the box, so you don’t have to re-learn or re-write your queries:</p>
            <pre><code>// Use the popular 'pg' driver? Easy. Hyperdrive just exposes a connection string
// to your Worker.
const client = new Client({ connectionString: env.HYPERDRIVE.connectionString });
await client.connect();

// Prefer using an ORM like Drizzle? Use it with Hyperdrive too.
// https://orm.drizzle.team/docs/get-started-postgresql#node-postgres
const client = new Client({ connectionString: env.HYPERDRIVE.connectionString });
await client.connect();
const db = drizzle(client);</code></pre>
            <p>But the work on Hyperdrive doesn’t stop just because it’s now “GA”. Over the next few months, we’ll be bringing support for the <i>other</i> most widely deployed database engine there is: MySQL. We’ll also be bringing support for connecting to databases inside private networks (including cloud VPC networks) via <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/">Cloudflare Tunnel</a> and <a href="https://developers.cloudflare.com/magic-wan/">Magic WAN</a> On top of that, we plan to bring more configurability around invalidation and caching strategies, so that you can make more fine-grained decisions around performance vs. data freshness.</p><p>As we thought about how we wanted to price Hyperdrive, we realized that it just didn’t seem right to charge for it. After all, the performance benefits from Hyperdrive are not only significant, but essential to connecting to traditional database engines. Without Hyperdrive, paying the latency overhead of 6+ round-trips to connect &amp; query your database per request just isn’t right.</p><p>And so we’re happy to announce that <b>for any developer on a Workers Paid plan, Hyperdrive is free</b>. That includes both query caching and connection pooling, as well as the ability to create multiple Hyperdrives — to separate different applications, prod vs. staging, or to provide different configurations (cached vs. uncached, for example).</p><table><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><td><p><span>Plan</span></p></td><td><p><span>Price per query</span></p></td><td><p><span>Connection Pooling</span></p></td></tr><tr><td><p><span>Workers</span><span> </span><span>Paid</span></p></td><td><p><span>$0 </span></p></td><td><p><span>$0</span></p></td></tr></tbody></table><p>To get started with Hyperdrive, <a href="https://developers.cloudflare.com/hyperdrive/">head over to the docs</a> to learn how to connect your existing database and start querying it from your Workers.</p>
    <div>
      <h3>Queues: Pull From Anywhere</h3>
      <a href="#queues-pull-from-anywhere">
        
      </a>
    </div>
    <p>The task queue is an increasingly critical part of building a modern, full-stack application, and this is what we had in mind when we <a href="/cloudflare-queues-open-beta">originally announced</a> the open beta of <a href="https://developers.cloudflare.com/queues/">Queues</a>. We’ve since been working on several major Queues features, and we’re launching two of them this week: pull-based consumers and new message delivery controls.</p><p>Any HTTP-speaking client <a href="https://developers.cloudflare.com/queues/reference/pull-consumers/">can now pull messages from a queue</a>: call the new /pull endpoint on a queue to request a batch of messages, and call the /ack endpoint to acknowledge each message (or batch of messages) as you successfully process them:</p>
            <pre><code>// Pull and acknowledge messages from a Queue using any HTTP client
$  curl "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/queues/${QUEUE_ID}/messages/pull" -X POST --data '{"visibilityTimeout":10000,"batchSize":100}}' \
     -H "Authorization: Bearer ${QUEUES_TOKEN}" \
     -H "Content-Type:application/json"

// Ack the messages you processed successfully; mark others to be retried.
$ curl "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/queues/${QUEUE_ID}/messages/ack" -X POST --data '{"acks":["lease-id-1", "lease-id-2"],"retries":["lease-id-100"]}' \
     -H "Authorization: Bearer ${QUEUES_TOKEN}" \
     -H "Content-Type:application/json"</code></pre>
            <p>A pull-based consumer can run anywhere, allowing you to run queue consumers alongside your existing legacy cloud infrastructure. Teams inside Cloudflare adopted this early on, with one use-case focused on writing device telemetry to a queue from our <a href="https://www.cloudflare.com/network/">310+ data centers</a> and consuming within some of our back-of-house infrastructure running on Kubernetes. Importantly, our globally distributed queue infrastructure means that messages are retained within the queue until the consumer is ready to process them.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2UUkrE3bqqIdQiemV49Hal/496c2d539b366a794d58479c99b1c9ec/image5-19.png" />
            
            </figure><p>Queues also <a href="https://developers.cloudflare.com/queues/reference/batching-retries/#delay-messages">now supports delaying messages</a>, both when sending to a queue, as well as when marking a message for retry. This can be useful to queue (pun intended) tasks for the future, as well apply a backoff mechanism if an upstream API or infrastructure has rate limits that require you to pace how quickly you are processing messages.</p>
            <pre><code>// Apply a delay to a message when sending it
await env.YOUR_QUEUE.send(msg, { delaySeconds: 3600 })

// Delay a message (or a batch of messages) when marking it for retry
for (const msg of batch.messages) {
	msg.retry({delaySeconds: 300})
} </code></pre>
            <p>We’ll also be bringing substantially increased per-queue throughput over the coming months on the path to getting Queues to GA. It’s important to us that Queues is <i>extremely</i> reliable: lost or dropped messages means that a user doesn’t get their order confirmation email, that password reset notification, and/or their uploads processed — each of those are user-impacting and hard to recover from.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1RhxWjKGRmoJtgQ4toybvY/57469d1ee721096a3c2b7551bbd277a4/image3-35.png" />
            
            </figure>
    <div>
      <h3>Workers Analytics Engine is GA</h3>
      <a href="#workers-analytics-engine-is-ga">
        
      </a>
    </div>
    <p><a href="https://developers.cloudflare.com/analytics/analytics-engine/">Workers Analytics Engine</a> provides unlimited-cardinality analytics at scale, via a built-in API to write data points from Workers, and a SQL API to query that data.</p><p>Workers Analytics Engine is backed by the same ClickHouse-based system we have depended on for years at Cloudflare. We use it ourselves to observe the health of our own services, to capture product usage data for billing, and to answer questions about specific customers’ usage patterns. At least one data point is written to this system on nearly every request to Cloudflare’s network. Workers Analytics Engine lets you build your own custom analytics using this same infrastructure, while we manage the hard parts for you.</p><p>Since <a href="/workers-analytics-engine">launching in beta</a>, developers have started depending on Workers Analytics Engine for these same use cases and more, from large enterprises to open-source projects like <a href="https://github.com/benvinegar/counterscale/">Counterscale</a>. Workers Analytics Engine has been operating at production scale with mission-critical workloads for years — but we hadn’t shared anything about pricing, until today.</p><p>We are keeping Workers Analytics Engine pricing simple, and based on two metrics:</p><ol><li><p><b>Data points written</b> — every time you call <a href="https://developers.cloudflare.com/analytics/analytics-engine/get-started/#3-write-data-from-your-worker">writeDataPoint()</a> in a Worker, this counts as one data point written. Every data point costs the same amount — unlike other platforms, there is no penalty for adding dimensions or cardinality, and no need to predict what the size and cost of a compressed data point might be.</p></li><li><p><b>Read queries</b> — every time you post to the Workers Analytics Engine <a href="https://developers.cloudflare.com/analytics/analytics-engine/sql-api/">SQL API</a>, this counts as one read query. Every query costs the same amount — unlike other platforms, there is no penalty for query complexity, and no need to reason about the number of rows of data that will be read by each query.</p></li></ol><p>Both the Workers Free and Workers Paid plans will include an allocation of data points written and read queries, with pricing for additional usage as follows:</p><table><colgroup><col></col><col></col><col></col></colgroup><tbody><tr><td><p><span>Plan</span></p></td><td><p><span>Data points written</span></p></td><td><p><span>Read queries</span></p></td></tr><tr><td><p><span>Workers</span><span> </span><span>Paid</span></p></td><td><p><span>10 million included per month</span></p><p><span><br /></span><span>+$0.25 per additional million</span></p></td><td><p><span>1 million included per month</span></p><p><span><br /></span><span>+$1.00 per additional million</span></p></td></tr><tr><td><p><span>Workers Free</span></p></td><td><p><span>100,000 included per day</span></p></td><td><p><span>10,000 included per day</span></p></td></tr></tbody></table><p>With this pricing, you can answer, “how much will Workers Analytics Engine cost me?” by counting the number of times you call a function in your Worker, and how many times you make a request to a HTTP API endpoint. Napkin math, rather than spreadsheet math.</p><p>This pricing will be made available to everyone in coming months. Between now and then, Workers Analytics Engine continues to be available at no cost. You can <a href="https://developers.cloudflare.com/analytics/analytics-engine/get-started/#limits">start writing data points from your Worker today</a> — it takes just a few minutes and less than 10 lines of code to start capturing data. We’d love to hear what you think.</p>
    <div>
      <h3>The week is just getting started</h3>
      <a href="#the-week-is-just-getting-started">
        
      </a>
    </div>
    <p>Tune in to what we have in store for you tomorrow on our second day of Developer Week. If you have questions or want to show off something cool you already built, please join our developer <a href="https://discord.cloudflare.com/"><i>Discord</i></a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[D1]]></category>
            <category><![CDATA[Hyperdrive]]></category>
            <category><![CDATA[Queues]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <guid isPermaLink="false">5O8kPvrc2dyHIwmf2c0shv</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Matt Silverlock</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome to Developer Week 2024]]></title>
            <link>https://blog.cloudflare.com/welcome-to-developer-week-2024/</link>
            <pubDate>Sun, 31 Mar 2024 17:00:42 GMT</pubDate>
            <description><![CDATA[ We’re kicking off 2024’s Developer Week, and we’re excited to welcome you to the week and give you a small preview of what to expect, and how we’re thinking about the future of our platform ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/qdRhUosSDjamfTtwzcP5W/20fa7e0e6823c1153cd84b1c8a5d4aa5/devweek24.png" />
            
            </figure><p>It’s time to ship. For us (that’s what Innovation Weeks are all about!), and also for our developers.</p><p>Shipping itself is always fun, but getting there is not always easy. Bringing something from idea to life requires many stars to align. That’s what this week is all about — helping developers, including the two million developers already building on our platform, bring their ideas to life.</p>
    <div>
      <h3>The full-stack cloud</h3>
      <a href="#the-full-stack-cloud">
        
      </a>
    </div>
    <p>Building applications requires assembling many different components.</p><p>The frontend, the face of the application, must be intuitive, responsive, and visually appealing to engage users effectively. Behind the scenes, you need a backend to handle data processing, storage, and retrieval, ensuring smooth functionality and performance. On top of all that, in the past year AI has entered the chat, so to speak, and increasingly every application requires an element of AI, making it a crucial part of the stack.</p><p>The job of a good platform is to provide all these components, and any others you will need, to you, the developer.</p><p>Just as there’s nothing more frustrating than coming home from the grocery store and realizing you left out an ingredient, realizing a platform is missing a major component or piece of functionality is no different.</p><p>We view providing the tooling that developers need as a critical part of our job as a platform, which is why with every Developer Week, we make it our mission to provide you with more and more pieces you may need. This week is no different — you can expect us to announce more tools and primitives from the frontend to backend to AI.</p><p>However, our job doesn’t stop there. If a good platform provides the components, a <i>great</i> platform goes a step further than that.</p><p>The job of a great platform is not only to provide the components, but make sure they play well with each other in a way that makes your job as a developer easier. Our vision for the developer platform is exactly that: to anticipate not just the tools you need but also think about how they work with each other, and how they integrate into your development flow.</p><p>This week, you will see announcements and deep dives that expound on our vision for an integrated platform: pulling back the curtain on the way we expose services in Workers through bindings for an integrated developer experience, talking about our vision for a unified data platform, updating you on framework support, and more.</p>
    <div>
      <h3>The connectivity cloud</h3>
      <a href="#the-connectivity-cloud">
        
      </a>
    </div>
    <p>While we’re excited for you to build on us as much as possible, we also realize that development projects are rarely greenfield. If you’ve been at this for a long time, chances are a large portion of your application already lives somewhere, whether on another cloud, or on-prem.</p><p>That’s why we’re constantly making it easier for you to connect to existing infrastructure or other providers, and working hard to make sure you can still reap the benefits of building on Cloudflare by making your application feel fast and global, regardless of where your backend is.</p><p>And vice versa, if your data is on us, but you need to access it from other providers, it’s not our job to keep it hostage in a captivity cloud by charging a tariff for egress.</p>
    <div>
      <h3>The experimentation cloud</h3>
      <a href="#the-experimentation-cloud">
        
      </a>
    </div>
    <p>Before you start assembling components, or even coming up with a plan or a spec for it, there’s an important but overlooked step to the development process — experimentation.</p><p>Experimentation can take many forms. Experimentation can be in the form of prototyping an MVP before you spend months developing a product or a feature. If you’ve found yourself rewriting your entire personal website just to try out a new tool or framework, that’s also experimentation.</p><p>It’s easy to overlook experimentation as a part of the process, but innovation doesn’t happen without it, which is why it’s something we always want to encourage and support as a part of our platform.</p><p>That’s why offering a generous free tier is something that’s been a part of our DNA since the very beginning, and something you can expect to forever be a staple of our platform.</p>
    <div>
      <h3>The demo to production cloud</h3>
      <a href="#the-demo-to-production-cloud">
        
      </a>
    </div>
    <p>Alright, you’ve got all the tools you need, you’ve had a chance to experiment, and at some point… it’s time to ship.</p><p>Shipping is exciting, but shipping is also vulnerable and scary. You’re exposing the thing you’ve been working hard on to the world to criticize. You’re exposing your code to a world of untested edge cases and abuse. You’re exposing your colleagues who are on call to the possibility of getting paged at 1 AM due to the code you released.</p><p>Of course, the wrong answer is not shipping.</p><p>The right answer is having a platform that supports you and holds your hand through the scary parts. This means a platform that can seamlessly scale from zero to sixty. A platform gives you the tools to test your code, and release it gradually to the world to help you gain confidence. Or a platform provides the <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a> you need when you are trying to figure out what’s gone wrong at 1 AM.</p><p>That’s why this week, you can look forward to some announcements from us that we hope will help you sleep better.</p>
    <div>
      <h3>The demo to production cloud — for inference</h3>
      <a href="#the-demo-to-production-cloud-for-inference">
        
      </a>
    </div>
    <p>We talked about some of the scary parts of deploying to production, and while all these apply to AI as well, building AI applications today, especially in production, presents its own unique set of challenges.</p><p>Almost every day you see a new AI demo go viral — from Sora to Devin, it’s easy and inspiring to imagine our world completely changed by AI. But if you’ve started actually playing with and implementing AI use cases, you know the harsh reality of making AI truly work. It requires a lot of trial and error to get the results you want — choosing a model, RAG, fine-tuning…</p><p>And that’s before you even go to production.</p><p>That’s when you encounter the real challenge — provisioning enough capacity to stay up, without over-provisioning and overpaying. This is the exact challenge we set out to solve from the early days of Workers — helping developers not worry about infrastructure, just the application they want to build.</p><p>With the recent rise of AI, we’ve noticed many of these challenges return. Thankfully, managing loads and infrastructure is what we’re good at here at Cloudflare. It’s what we’ve had practice at for over a decade of running our platform. It’s all just one giant scheduler.</p><p>Our vision for our AI platform is to help solve the exact challenges in deploying AI workloads that we’ve been helping developers solve for, well, any other type of workload. Whether you’re deploying directly on us with Workers AI, or another provider, we’ll help provide the tools you need to access the models you need, without overpaying for idle compute.</p><p>Don’t worry, it’s all going to be fine.</p>
    <div>
      <h3>So what can you expect this week?</h3>
      <a href="#so-what-can-you-expect-this-week">
        
      </a>
    </div>
    <p>No one in my family can keep a secret — my sister cannot get me a birthday present without spoiling it the week before. For me, the anticipation and the look of surprise is part of the fun! My coworkers seem to have <a href="https://x.com/chatsidhartha/status/1773711087357055442?s=20">clued into this</a>.</p><p>While I won’t give away too much, we’ve already teased out a few things last week (you can find some hints <a href="https://x.com/dok2001/status/1772805055311233453?s=20">here</a>, <a href="https://x.com/elithrar/status/1773015566380384302?s=20">here</a> and <a href="https://x.com/dok2001/status/1751077740772471172?s=20">here</a>), as well as in this blog post if you read closely (because as it turns out, I too, can’t help myself).</p>
    <div>
      <h3>See you tomorrow!</h3>
      <a href="#see-you-tomorrow">
        
      </a>
    </div>
    <p>Our series of announcements starts on Monday, April 1st. We look forward to sharing them with you here on our blog, and discussing them with you on <a href="https://discord.cloudflare.com/">Discord</a> and <a href="https://twitter.com/CloudflareDev">X</a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Connectivity Cloud]]></category>
            <guid isPermaLink="false">31t1ZFXgFabypxInKsn6xI</guid>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[New Workers pricing — never pay to wait on I/O again]]></title>
            <link>https://blog.cloudflare.com/workers-pricing-scale-to-zero/</link>
            <pubDate>Thu, 28 Sep 2023 13:00:03 GMT</pubDate>
            <description><![CDATA[ Announcing new pricing for Cloudflare Workers, where you are billed based on CPU time, and never for the idle time that your Worker spends waiting on network requests and other I/O. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1pAdu3xHWDEFZwNaAD27Cj/9de34b95a0b4e062edd6673b810d02aa/image4-15.png" />
            
            </figure><p>Today we are announcing new pricing for <a href="https://developers.cloudflare.com/workers/">Cloudflare Workers</a> and <a href="https://developers.cloudflare.com/pages/platform/functions/get-started/">Pages Functions</a>, where you are billed based on CPU time, and never for the idle time that your Worker spends waiting on network requests and other I/O. Unlike other platforms, when you build applications on Workers, you only pay for the compute resources you actually use.</p><p>Why is this exciting? To date, all large serverless compute platforms have billed based on how long your function runs — its duration or “wall time”. This is a reflection of a new paradigm built on a leaky abstraction — your code may be neatly packaged up into a “function”, but under the hood there’s a <a href="https://www.cloudflare.com/learning/cloud/what-is-a-virtual-machine/">virtual machine (VM)</a>. A VM can’t be paused and resumed quickly enough to execute another piece of code while it waits on I/O. So while a typical function might take 100ms to run, it might typically spend only 10ms doing CPU work, like crunching numbers or parsing JSON, with the rest of time spent waiting on I/O.</p><p><b>This status quo has meant that you are billed for this idle time, while nothing is happening.</b></p><p>With this announcement, Cloudflare is the first and only global serverless platform to offer standard pricing based on CPU time, rather than duration. We think you should only pay for the compute time you actually use, and that’s how we’re going to bill you going forward.</p>
    <div>
      <h3>Old pricing — two pricing models, each with tradeoffs</h3>
      <a href="#old-pricing-two-pricing-models-each-with-tradeoffs">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6x9m1087glgizKpAMBJFW5/4882c9dc0081ca2de6cb3468968ea491/Screenshot-2023-09-25-at-4.45.08-PM.png" />
            
            </figure>
    <div>
      <h3>New pricing — one simple and predictable pricing model</h3>
      <a href="#new-pricing-one-simple-and-predictable-pricing-model">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/25bav4xJzPGs970MMWrWOc/10970d02057b8f0181303482ad2f4e5b/Screenshot-2023-09-25-at-4.56.25-PM.png" />
            
            </figure>
    <div>
      <h3>With the same generous Free plan</h3>
      <a href="#with-the-same-generous-free-plan">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5cqN9JRJhjbfRjU3VU4Dl3/aa68ec49b181b29fdcbb978298abfa57/Screenshot-2023-09-25-at-4.59.55-PM.png" />
            
            </figure><p>Unlike wall time (duration, or GB-s), CPU time is more predictable and under your control. When you make a request to a third party API, you can’t control how long that API takes to return a response. This time can be quite long, and vary dramatically — particularly when building <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> applications that make inference requests to LLMs. If a request takes twice as long to complete, duration-based billing means you pay double. By contrast, CPU time is consistent and unaffected by time spent waiting on I/O — purely a function of the logic and processing of inputs on outputs to your Worker. It is entirely under your control.</p><p>Starting October 31, 2023, you will have the option to opt in individual <a href="https://developers.cloudflare.com/workers/">Workers</a> and <a href="https://developers.cloudflare.com/pages/platform/functions/">Pages Functions</a> projects on your account to new pricing, and newly created projects will default to new pricing. You’ll be able to estimate how much new pricing will cost in the Cloudflare dashboard. For the majority of current applications, new pricing is the same or less expensive than the previous Bundled and Unbound pricing plans.</p><p>If you’re on our Workers Paid plan, you will have until March 1, 2024 to switch to the new pricing on your own, after which all of your projects will be automatically migrated to new pricing. If you’re an Enterprise customer, any contract renewals after March 1, 2024, will use the new pricing. You’ll receive plenty of advance notice via email and dashboard notifications before any changes go into effect. And since CPU time is fully in your control, the more you optimize your Worker’s compute time, the less you’ll pay. Your incentives are aligned with ours, to make efficient use of compute resources on Region: Earth.</p>
    <div>
      <h2>The challenge of truly scaling to zero</h2>
      <a href="#the-challenge-of-truly-scaling-to-zero">
        
      </a>
    </div>
    <p>The beauty of serverless is that it allows teams to focus on what matters most — delivering value to their customers, rather than managing infrastructure. It saves you money by effortlessly scaling up and down all over the world based on your traffic, whether you’re an early stage startup or <a href="https://www.cloudflare.com/case-studies/shopify/">Shopify during Black Friday</a>.</p><p>One of the promises of serverless is the idea of scaling to zero — once those big days subside, you no longer have to pay for virtual machines to sit idle before your autoscaling kicks in, or be charged by the hour for instances that you barely ended up using. No compute = no bills for usage. Or so, at least, is the promise of serverless.</p><p>Yet, there’s one hidden cost, where even in the serverless world you will find yourself paying for idle resources — what happens when your function is sitting around waiting on I/O? With pricing based on the duration that a function runs, you’re still billed for time that your service is doing zero work, and just waiting on network requests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2miAVPZ7it2rhk06NCCNPH/292b6712868fbae8e1050776e751a3ac/image3-20.png" />
            
            </figure><p>Most applications spend far more time waiting on this I/O than they do using the CPU, often <i>ten times more</i>.</p><p>Imagine a similar scenario in your own life — you grab a cab to go to the airport. On the way, the driver decides to stop to refuel and grab a snack, but leaves the meter running. This is not time spent bringing you closer to your destination, but it’s time that you’re paying for. Now imagine for the time the driver was refueling the car, the meter was paused. That’s the difference between CPU time and duration, or wall clock time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4H873Xpqrx3Qpgd7Oe9CNm/2839487c6dd05a2d3af596ba40e113b0/image1-13.png" />
            
            </figure><p>But rather than waiting on the driver to refuel or grab a Snickers bar, what is it that you’re actually paying for when it comes to serverless compute?</p><p><b>Time spent waiting on services you don’t control</b></p><p>Most applications depend on one or many external service providers. Providers of hosted <a href="https://www.cloudflare.com/learning/ai/what-is-large-language-model/">large language models (LLMs)</a> like GPT-4 or Stable Diffusion. Databases as a service. Payment processors. Or simply an API request to a system outside your control. This is where software development is headed — rather than reinventing the wheel and slowly building everything themselves, both fast-moving startups and the Fortune 500 increasingly build using other services to avoid undifferentiated heavy lifting.</p><p>Every time an application interacts with one of these external services, it has to send data over the network and wait until it receives a response. And while some services are lightning fast, others can take considerable time, like waiting for a payment processor or for a large media file to be uploaded or converted. Your own application sits idle for most of the request, waiting on services outside your control.</p><p>Until today, you’ve had to pay while your application waits. You’ve had to pay more when a service you depend on has an operational issue and slows down, or times out in responding to your request. This has been a disincentive to incrementally move parts of your application to serverless.</p>
    <div>
      <h3>Cloudflare’s new pricing: the first serverless platform to truly scale down to zero</h3>
      <a href="#cloudflares-new-pricing-the-first-serverless-platform-to-truly-scale-down-to-zero">
        
      </a>
    </div>
    <p>The idea of “scale to zero” is that you never have to keep instances of your application sitting idle, waiting for something to happen. <a href="https://www.cloudflare.com/learning/serverless/what-is-serverless/">Serverless</a> is more than just not having to manage servers or virtual machines — you shouldn’t have to provision and manage the number of compute resources that are available or warm.</p><p>Our new pricing takes the “scale to zero” concept even further, and extends it to whether your application is actually performing work. If you’re still paying while nothing is happening, we don’t think that’s truly scale to zero. Your application is idle. The CPU can be used for other tasks. Whether your application is “running” is an old concept lifted from an era before multi-tenant cloud platforms. What matters is if you are actually using compute resources.</p>
    <div>
      <h2>Pay less, deploy everywhere, without hidden costs</h2>
      <a href="#pay-less-deploy-everywhere-without-hidden-costs">
        
      </a>
    </div>
    <p>Let’s compare what you’d pay on new Workers pricing to AWS Lambda, for the following Worker:</p><ul><li><p>One billion requests per month</p></li><li><p>Seven CPU milliseconds per request</p></li><li><p>200ms duration per request</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/65SnJPMC26Y0joJF76EJk8/b006ba6aa7a587c76ec6b6bb329fed39/Screenshot-2023-09-25-at-5.16.25-PM.png" />
            
            </figure><p><i>The above table is for informational purposes only. Prices are limited to the public fees as of September 20, 2023, and do not include taxes and any other fees. AWS Lambda and Lambda @ Edge prices are based on publicly available pricing in US-East (Ohio) region as published on </i><a href="https://aws.amazon.com/lambda/pricing/"><i>https://aws.amazon.com/lambda/pricing/</i></a></p><p>Workers are the most cost-effective option, and are <a href="https://www.cloudflare.com/network/">globally distributed</a>, automatically optimized with <a href="https://developers.cloudflare.com/workers/configuration/smart-placement/">Smart Placement</a>, and integrated with <a href="https://developers.cloudflare.com/durable-objects/">Durable Objects</a>, <a href="https://developers.cloudflare.com/r2/">R2</a>, <a href="https://developers.cloudflare.com/workers/learning/how-kv-works/">KV</a>, <a href="https://developers.cloudflare.com/workers/runtime-apis/cache/">Cache</a>, <a href="https://developers.cloudflare.com/queues/">Queues</a>, <a href="https://developers.cloudflare.com/d1/">D1</a> and <a href="https://developers.cloudflare.com/workers/configuration/bindings/">more</a>. And with Workers, you never have to pay extra for provisioned concurrency, pay a penalty for streaming responses, or incur <a href="/aws-egregious-egress/">egregious egress fees</a>.</p>
    <div>
      <h3>New Workers pricing makes building AI applications dramatically cheaper</h3>
      <a href="#new-workers-pricing-makes-building-ai-applications-dramatically-cheaper">
        
      </a>
    </div>
    <p>Yesterday we announced a new suite of products to let you build AI applications on Cloudflare — <a href="/best-place-region-earth-inference/">Workers AI</a>, <a href="/announcing-ai-gateway/">AI Gateway</a>, and our new <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector database</a>, <a href="/vectorize-vector-database-open-beta">Vectorize</a>.</p><p>Nearly everyone is building new products and features using AI models right now. Large language models and <a href="https://www.cloudflare.com/learning/ai/what-is-generative-ai/">generative AI models</a> are incredibly powerful. But they aren’t always fast — asking a model to create an image, transcribe a segment of audio, or write a story often takes multiple seconds — far longer than a typical API response or database query that we expect to return in tens of milliseconds. There is significant compute work going on behind the scenes, and that means longer duration per request to a Worker.</p><p>New Workers pricing makes this much less expensive than it was previously on the Unbound usage model.</p><p>Let’s take the same example as above, but instead assume the duration of the request is two seconds (2000ms), because the Worker makes an inference request to a large AI model. With new Workers pricing, you pay the exact same amount, no matter how long this request takes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4WzUKUySJqFN7VU3adRMjq/47f5bff96075cda23fe6ce0456e79611/Screenshot-2023-09-25-at-5.23.27-PM.png" />
            
            </figure>
    <div>
      <h3>No surprise bills — set a maximum limit on CPU time for each Worker</h3>
      <a href="#no-surprise-bills-set-a-maximum-limit-on-cpu-time-for-each-worker">
        
      </a>
    </div>
    <p>Surprise bills from cloud providers are an unfortunately common horror story. In the old way of provisioning compute resources, forgetting to shut down an instance of a database or virtual machine can cost hundreds of dollars. And accidentally autoscaling up too high can be even worse.</p><p>We’re building new safeguards to prevent these kinds of scenarios on Workers. As part of new pricing, you will be able to cap CPU usage on a per-Worker basis.</p><p>For example, if you have a Worker with a p99 CPU time of 15ms, you might use this to set a max CPU limit of 40ms — enough headroom to ensure that your worker will run successfully, while ensuring that even if you ship a bug that causes a CPU time to ratchet up dramatically, or have an edge case that causes infinite recursion, you can’t suddenly rack up a giant unexpected bill, or be vulnerable to a denial of wallet attack. This can be particularly helpful if your worker handles variable or user-generated input, to guard against edge cases that you haven’t accounted for.</p><p>Alternatively, if you’re running a production service, but want to make sure you stay on top of your costs, we will also be adding the option to configure <a href="https://developers.cloudflare.com/fundamentals/notifications/">notifications</a> that can automatically email you, page you, or send a webhook if your worker exceeds a particular amount of CPU time per request. You will be able to choose at what threshold you want to be notified, and how.</p>
    <div>
      <h3>New ways to “hibernate” Durable Objects while keeping connections alive</h3>
      <a href="#new-ways-to-hibernate-durable-objects-while-keeping-connections-alive">
        
      </a>
    </div>
    <p>While Workers are stateless functions, <a href="https://developers.cloudflare.com/durable-objects/">Durable Objects</a> are stateful and long-lived, commonly used to coordinate and persist real-time state in chat, multiplayer games, or collaborative apps. And unlike Workers, duration-based pricing fits Durable Objects well. As long as one or more clients are connected to a Durable Object, it keeps state available in memory. <a href="https://developers.cloudflare.com/durable-objects/platform/pricing/">Durable Objects pricing</a> will remain duration-based, and is not changing as part of this announcement.</p><p>What about when a client is connected to a Durable Object, but no work has happened for a long time? Consider a collaborative whiteboard app built using Durable Objects. A user of the app opens the app in a browser tab, but then forgets about it, and leaves it running for days, with an open WebSocket connection. Just like with Workers, we don’t think you should have to pay for this idle time. But until recently, there hasn’t been an API to signal to us that a Durable Object can be safely “hibernated”.</p><p>The recently introduced <a href="https://developers.cloudflare.com/durable-objects/api/hibernatable-websockets-api/">Hibernation API</a>, currently in beta, allows you to set an automatic response to be used while hibernated and serialize state such that it survives hibernation. This gives Cloudflare the inputs we need in order to maintain open WebSocket connections from clients, while “hibernating” the Durable Object such that it is not actively running, and you are not billed for idle time. The result is that your state is always available in-memory when actually need it, but isn’t unnecessarily kept around when it’s not. As long as your Durable Object is hibernating, even if there are active clients still connected over a WebSocket, you won’t be billed for duration.</p>
    <div>
      <h3>Snippets make Cloudflare’s CDN programmable — for free</h3>
      <a href="#snippets-make-cloudflares-cdn-programmable-for-free">
        
      </a>
    </div>
    <p>What if you just want to <a href="https://developers.cloudflare.com/workers/examples/alter-headers/">modify a header</a>, do a <a href="https://developers.cloudflare.com/workers/examples/country-code-redirect/">country code redirect</a>, or cache a custom query? Developers have relied on Workers to program Cloudflare’s CDN like this for many years. With the announcement of <a href="/snippets-announcement/">Cloudflare Snippets</a> last year, <a href="/cloudflare-snippets-alpha/">now in alpha</a>, we’re making it free.</p><p>If you use Workers today for these smaller use cases, to customize any of Cloudflare’s <a href="https://www.cloudflare.com/application-services/">application services</a>, Snippets will be the optimal, zero cost option.</p>
    <div>
      <h3>A serverless platform without limits</h3>
      <a href="#a-serverless-platform-without-limits">
        
      </a>
    </div>
    <p>Developers are building ever larger and more complex full-stack applications on Workers each month. Our promise to you is to help you scale in any direction, without worrying about paying for idle time or having to manage and provision compute resources across regions.</p><p>This also means not having to worry about limits. Workers already serves many millions of requests per second, and scales and performs so well that we are <a href="/building-cloudflare-on-cloudflare/">rebuilding our own CDN on top of Workers</a>. Individual Workers can now be <a href="https://developers.cloudflare.com/workers/platform/limits/#worker-size">up to 10MB</a>, with a max startup time of 400ms, and can be easily composed together using <a href="https://developers.cloudflare.com/workers/configuration/bindings/about-service-bindings/">Service Bindings</a>. Entire platforms are built on top of Workers, with a growing number of companies allowing their own customers to write and deploy custom code and applications via <a href="https://developers.cloudflare.com/cloudflare-for-platforms/workers-for-platforms/">Workers for Platforms</a>. Some of the biggest platforms in the world rely on Cloudflare and the Workers platform <a href="https://www.cloudflare.com/case-studies/shopify/">during the most critical moments</a>.</p><p>New pricing removes limits on the types of applications that could be built cost effectively with duration-based pricing. It removes the ceiling on CPU time from our original request-based pricing. We’re excited to see what you build, and are committed to being the development platform where you’re not constrained by limits on scale, regions, instances, concurrency or whatever else you need to handle to grow and operate globally.</p>
    <div>
      <h3>When will new pricing be available?</h3>
      <a href="#when-will-new-pricing-be-available">
        
      </a>
    </div>
    <p>Starting October 31, 2023, you will have the option to opt in individual <a href="https://developers.cloudflare.com/workers/">Workers</a> and <a href="https://developers.cloudflare.com/pages/platform/functions/">Pages Functions</a> projects on your account to new pricing, and newly created projects will default to new pricing. You will have until March 1, 2024, or the end of your Enterprise contract, whichever comes later, to switch to new pricing on your own, after which all of your projects will be automatically migrated to new pricing. You’ll receive plenty of advance notice via email and dashboard notifications before any changes go into effect.</p><p>Between now and then, we want to hear from you. We’ve based new pricing off feedback we’ve heard from developers building serverless applications, and companies estimating and projecting their costs. Tell us what you think of new pricing by <a href="https://forms.gle/STBQRy39CX98p9n18">sharing your feedback in this survey</a>. We read every response.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Connectivity Cloud]]></category>
            <guid isPermaLink="false">2qLGARvMRZ2T9X8ccT4fPl</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Brendan Irvine-Broque</dc:creator>
        </item>
        <item>
            <title><![CDATA[The best place on Region: Earth for inference]]></title>
            <link>https://blog.cloudflare.com/best-place-region-earth-inference/</link>
            <pubDate>Wed, 27 Sep 2023 13:02:00 GMT</pubDate>
            <description><![CDATA[ Today, we’re excited to make a series of announcements that we believe will make a similar impact as Workers did in the future of computing ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2nXxcEexoml7CrpZNwEdIj/48092e191987110e5182ca79535677ed/unnamed-2.png" />
            
            </figure><p>Today, Cloudflare’s Workers platform is the place over a million developers come to build sophisticated full-stack applications that previously wouldn’t have been possible.</p><p>Of course, Workers didn’t start out that way. It started, on a day like today, as a <a href="/introducing-cloudflare-workers/">Birthday Week</a> announcement. It may not have had all the bells and whistles that exist today, but if you got to try Workers when it launched, it conjured this feeling: “this is different, and it’s going to change things”. All of a sudden, going from nothing to a fully scalable, global application took <i>seconds</i>, not hours, days, weeks or even months. It was the beginning of a different way to build applications.</p><p>If you’ve played with generative AI over the past few months, you may have had a similar feeling. Surveying a few friends and colleagues, our “aha” moments were all a bit different, but the overarching sentiment across the industry at this moment is unanimous — this is different, and it’s going to change things.</p><p>Today, we’re excited to make a series of announcements that we believe will make a similar impact as Workers did in the future of computing. Without burying the lede any further, here they are:</p><ul><li><p><b>Workers AI</b> (formerly known as Constellation), <b>running on NVIDIA GPUs on Cloudflare’s global network</b>, bringing the serverless model to AI — pay only for what you use, spend less time on infrastructure, and more on your application.</p></li><li><p><b>Vectorize, our vector Database</b>, making it easy, fast and affordable to index and store vectors to support use cases that require access not just to running models, but customized data too.</p></li><li><p><b>AI Gateway</b>, giving organizations the tools to <b>cache, rate limit and observe</b> their AI deployments regardless of where they’re running.</p></li></ul><p>But that’s not all.</p><p>Doing big things is a team sport, and we don’t want to do it alone. Like in so much of what we do, we stand on the shoulders of giants. We’re thrilled to partner with some of the biggest players in the space: <b>NVIDIA, Microsoft, Hugging Face, Databricks, and Meta</b>.</p><p>Our announcements today mark just the beginning of Cloudflare’s journey into the <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI space</a>, like Workers did six years ago. While we encourage you to dive into each of our announcements (you won’t be disappointed!), we also wanted to take the chance to step back and provide you with a bit of our broader vision for AI, and how these announcements fit into it.</p>
    <div>
      <h3>Inference: The future of AI workloads</h3>
      <a href="#inference-the-future-of-ai-workloads">
        
      </a>
    </div>
    <p>There are two main processes involved in AI: training and inference.</p><p>Training a <a href="https://www.cloudflare.com/learning/ai/what-is-generative-ai/">generative AI model</a> is a long-running (sometimes months-long) compute intensive process, which results in a model. Training workloads are therefore best suited for running in traditional centralized cloud locations. Given the recent challenges in being able to obtain long-running access to GPUs, resulting in companies going multi-cloud, we’ve talked about the ways in which <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a> can provide an essential service that eliminates <a href="https://www.cloudflare.com/learning/cloud/what-are-data-egress-fees/">egress fees</a> for the training data to be accessed from any compute cloud. But that’s not what we’re here to talk about today.</p><p>While training requires many resources upfront, the much more ubiquitous AI-related compute task is inference. If you’ve recently asked ChatGPT a question, generated an image, translated some text, then you’ve performed an inference task. Since inference is required upon every single invocation (rather than just once), we expect that inference will become the dominant AI-related workload.</p><p>If training is best suited for a centralized cloud, then what is the best place for inference?</p>
    <div>
      <h3>The network — “just right” for inference</h3>
      <a href="#the-network-just-right-for-inference">
        
      </a>
    </div>
    <p>The defining characteristic of inference is that there’s usually a user waiting on the other end of it. That is, it’s a latency sensitive task.</p><p>The best place, you might think, for a latency sensitive task is on the device. And it might be in some cases, but there are a few problems. First, hardware on devices is not nearly as powerful. Battery life.</p><p>On the other hand, you have centralized cloud compute. Unlike devices, the hardware running in centralized cloud locations has nothing if not horsepower. The problem, of course, is that it’s hundreds of milliseconds away from the user. And sometimes, they’re even across borders, which presents its own set of challenges.</p><p>So devices are not yet powerful enough, and centralized cloud is too far away. This makes the network the goldilocks of inference. Not too far, with sufficient compute power — just right.</p>
    <div>
      <h3>The first inference cloud, running on Region Earth</h3>
      <a href="#the-first-inference-cloud-running-on-region-earth">
        
      </a>
    </div>
    <p>One lesson we learned building our developer platform is that running applications at network scale not only helps optimize performance and scale (though obviously that’s a nice benefit!), but even more importantly, creates the right level of abstraction for developers to move fast.</p>
    <div>
      <h4>Workers AI for serverless inference</h4>
      <a href="#workers-ai-for-serverless-inference">
        
      </a>
    </div>
    <p>Kicking things off with our announcement of <a href="/workers-ai/">Workers AI</a>, we’re bringing the first truly serverless GPU cloud, to its perfect match — Region Earth. No machine learning expertise, no rummaging for GPUs. Just pick one of our provided models, and go.</p><p>We’ve put a lot of thought into designing Workers AI to make the experience of deploying a model as smooth as possible.</p><p>And if you’re deploying any models in the year 2023, chances are, one of them is an <a href="https://www.cloudflare.com/learning/ai/what-is-large-language-model/">LLM</a>.</p>
    <div>
      <h4>Vectorize for… storing vectors!</h4>
      <a href="#vectorize-for-storing-vectors">
        
      </a>
    </div>
    <p>To build an end-to-end AI-operated chat bot, you also need a way to present the user with a UI, parse the corpus of information you want to pass it (for example your product catalog), use the model to convert it into <a href="https://www.cloudflare.com/learning/ai/what-are-embeddings/">embeddings</a> — and store them somewhere. Up until today, we offered the products you needed for the first two, but the latter — storing embeddings — requires a unique solution: a <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector database</a>.</p><p>Just as when we announced Workers, we soon after announced Workers KV — there’s little you can do with compute, without access to state. The same is true of AI — to build meaningful AI use cases, you need to give AI access to state. This is where a <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector database</a> comes into play, and why today we’re also excited to announce Vectorize, our own vector database.</p>
    <div>
      <h4>AI Gateway for caching, rate limiting and visibility into your AI deployments</h4>
      <a href="#ai-gateway-for-caching-rate-limiting-and-visibility-into-your-ai-deployments">
        
      </a>
    </div>
    <p>At Cloudflare, when we set out to improve something, the first step is always to measure it — if you can’t measure it, how can you improve it? When we heard about customers struggling to reign in AI deployment costs, we thought about how we would approach it — measure it, then improve it.</p><p>Our AI Gateway helps you do both!</p><p>Real-time observation capabilities empower proactive management, making it easier to monitor, debug, and fine-tune AI deployments. Leveraging it to cache, rate limit, and monitor AI deployments is essential for optimizing performance and managing costs effectively. By caching frequently used AI responses, it reduces latency and bolsters system reliability, while rate limiting ensures efficient resource allocation, mitigating the challenges of spiraling AI costs.</p>
    <div>
      <h4>Collaborating with Meta to bring Llama 2 to our global network</h4>
      <a href="#collaborating-with-meta-to-bring-llama-2-to-our-global-network">
        
      </a>
    </div>
    <p>Until recently, the only way to have access to an LLM was through calls to proprietary models. Training LLMs is a serious investment — in time, computing, and financial resources, and thus not something that’s accessible to most developers. Meta’s release of Llama 2, an open-source LLM, has presented an exciting shift, allowing developers to run and deploy their own LLMs. Except of course, one small detail — you still have to have access to a GPU to do so.</p><p>By making Llama 2 available as a part of the Workers AI catalog, we look forward to giving every developer access to an LLM — no configuration required.</p><p>Having a running model is, of course, just one component of an AI application.</p>
    <div>
      <h4>Leveraging the ONNX runtime to make moving between cloud to edge to device seamless for developers</h4>
      <a href="#leveraging-the-onnx-runtime-to-make-moving-between-cloud-to-edge-to-device-seamless-for-developers">
        
      </a>
    </div>
    <p>While the edge may be the optimal location for solving many of these problems, we do expect that applications will continue to be deployed at other locations along the spectrum of device, edge and centralized cloud.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7KCsHYhiF6Pe1IsVG2QyLI/0092b7f26a65a2b0d772a851123205dc/image1-22.png" />
            
            </figure><p>Take for example, self-driving cars — when you’re making decisions where every millisecond matters, you need to make these decisions on the device. Inversely, if you’re looking to run hundred-billion parameter versions of models, the centralized cloud is going to be better suited for your workload.</p><p>The question then becomes: how do you navigate between these locations smoothly?</p><p>Since our initial release of Constellation (now called Workers AI), one technology we were particularly excited by was the ONNX runtime. The ONNX runtime creates a standardized environment for running models, which makes it possible to run various models across different locations.</p><p>We already talked about the edge as a great place for running inference itself, but it’s also great as a routing layer to help guide workloads smoothly across all three locations, based on the use case, and what you’re looking to optimize for — be it latency, accuracy, cost, compliance, or privacy.</p>
    <div>
      <h4>Partnering with Hugging Face to provide optimized models at your fingertips</h4>
      <a href="#partnering-with-hugging-face-to-provide-optimized-models-at-your-fingertips">
        
      </a>
    </div>
    <p>There’s nothing of course that can help developers go faster than meeting them where they are, so we are <a href="/partnering-with-hugging-face-deploying-ai-easier-affordable/">partnering with Hugging Face</a> to bring serverless inference to available models, right where developers explore them.</p>
    <div>
      <h3>Partnering with Databricks to make AI models</h3>
      <a href="#partnering-with-databricks-to-make-ai-models">
        
      </a>
    </div>
    <p>Together with Databricks, we will be bringing the power of MLflow to data scientists and engineers. MLflow is an open-source platform for managing the end-to-end machine learning lifecycle, and this partnership will make it easier for users to deploy and manage <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">ML models</a> at scale. With this partnership, developers building on Cloudflare Workers AI will be able to leverage MLFlow compatible models for easy deployment into Cloudflare’s global network. Developers can use MLflow to efficiently package, implement, deploy and track a model directly into Cloudflare’s serverless developer platform.</p><p>AI that doesn’t keep your <a href="https://www.cloudflare.com/cio/">CIO</a> or CFO or General Counsel up at night</p><p>Things are moving quickly in AI, and it’s important to give developers the tools they need to get moving, but it’s hard to move fast when there are important considerations to worry about. What about compliance, costs, privacy?</p>
    <div>
      <h4>Compliance-friendly AI</h4>
      <a href="#compliance-friendly-ai">
        
      </a>
    </div>
    <p>Much as most of us would prefer not to think about it, AI and data residency are becoming increasingly regulated by governments. With governments requiring that data be processed locally or that their residents’ data be stored in-country, businesses have to think about that in the context of where inference workloads run as well. While with regard to latency, the network edge provides the ability to go as wide as possible. When it comes to compliance, the power of a network that spans 300 cities, and an offering like our Data Localization Suite, we enable the granularity required to keep AI deployments local.</p>
    <div>
      <h4>Budget-friendly AI</h4>
      <a href="#budget-friendly-ai">
        
      </a>
    </div>
    <p>Talking to many of our friends and colleagues experimenting with AI, one sentiment seems to resonate — AI is expensive. It’s easy to let costs get away before even getting anything into production or realizing value from it. Our intent with our AI platform is to make costs affordable, but perhaps more importantly, only charge you for what you use. Whether you’re using Workers AI directly, or our AI gateway, we want to provide the visibility and tools necessary to prevent AI spend from running away from you.</p>
    <div>
      <h4>Privacy-friendly AI</h4>
      <a href="#privacy-friendly-ai">
        
      </a>
    </div>
    <p>If you’re putting AI front and center of your customer experiences and business operations, you want to be reassured that any data that runs through it is in safe hands. As has always been the case with Cloudflare, we’re taking a privacy-first approach. We can assure our customers that   we will not use any customer data passing through Cloudflare for inference to train large language models.</p>
    <div>
      <h3>No, but really — we’re just getting started</h3>
      <a href="#no-but-really-were-just-getting-started">
        
      </a>
    </div>
    <p>We're just getting started with AI, folks, and boy, are we in for a wild ride! As we continue to unlock the benefits of this technology, we can't help but feel a sense of awe and wonder at the endless possibilities that lie ahead. From revolutionizing healthcare to transforming the way we work, AI is poised to change the game in ways we never thought possible. So buckle up, folks, because the future of AI is looking brighter than ever – and we can't wait to see what's next!</p><p>This wrap up message may have been generated by AI, but the sentiment is genuine — this is just the beginning, and we can’t wait to see what you build.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Connectivity Cloud]]></category>
            <guid isPermaLink="false">46iCevU4dkKQjY0NBbbv49</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>James Allworth</dc:creator>
            <dc:creator>Seph Zdarko</dc:creator>
        </item>
        <item>
            <title><![CDATA[Workers AI: serverless GPU-powered inference on Cloudflare’s global network]]></title>
            <link>https://blog.cloudflare.com/workers-ai/</link>
            <pubDate>Wed, 27 Sep 2023 13:00:47 GMT</pubDate>
            <description><![CDATA[ We are excited to launch Workers AI - an AI inference as a service platform, empowering developers to run AI models with just a few lines of code, all powered by our global network of GPUs ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1kH38tclcLOGwYv40vTHNy/300956275074e73dd480a93898d43c08/image1-29.png" />
            
            </figure><p>If you're anywhere near the developer community, it's almost impossible to avoid the impact that AI’s recent advancements have had on the ecosystem. Whether you're using <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> in your workflow to improve productivity, or you’re shipping AI based features to your users, it’s everywhere. The focus on AI improvements are extraordinary, and we’re super excited about the opportunities that lay ahead, but it's not enough.</p><p>Not too long ago, if you wanted to leverage the power of AI, you needed to know the ins and outs of <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">machine learning</a>, and be able to manage the infrastructure to power it.</p><p>As a developer platform with over one million active developers, we believe there is so much potential yet to be unlocked, so we’re changing the way AI is delivered to developers. Many of the current solutions, while powerful, are based on closed, proprietary models and don't address privacy needs that developers and users demand. Alternatively, the open source scene is exploding with powerful models, but they’re simply not accessible enough to every developer. Imagine being able to run a model, from your code, wherever it’s <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">hosted</a>, and never needing to find GPUs or deal with setting up the infrastructure to support it.</p><p>That's why we are excited to launch Workers AI - an AI inference as a service platform, empowering developers to run AI models with just a few lines of code, all powered by our global network of GPUs. It's open and accessible, serverless, privacy-focused, runs near your users, pay-as-you-go, and it's built from the ground up for a best in class developer experience.</p>
    <div>
      <h2>Workers AI - making inference <b>just work</b></h2>
      <a href="#workers-ai-making-inference-just-work">
        
      </a>
    </div>
    <p>We’re launching Workers AI to put AI inference in the hands of every developer, and to actually deliver on that goal, it should <b>just work</b> out of the box. How do we achieve that?</p><ul><li><p>At the core of everything, it runs on the right infrastructure - our world-class network of GPUs</p></li><li><p>We provide off-the-shelf models that run seamlessly on our infrastructure</p></li><li><p>Finally, deliver it to the end developer, in a way that’s delightful. A developer should be able to build their first Workers AI app in minutes, and say “Wow, that’s kinda magical!”.</p></li></ul><p>So what exactly is Workers AI? It’s another building block that we’re adding to our developer platform - one that helps developers run well-known AI models on serverless GPUs, all on Cloudflare’s trusted global network. As one of the latest additions to our developer platform, it works seamlessly with Workers + Pages, but to make it truly accessible, we’ve made it platform-agnostic, so it also works everywhere else, made available via a REST API.</p>
    <div>
      <h2>Models you know and love</h2>
      <a href="#models-you-know-and-love">
        
      </a>
    </div>
    <p>We’re launching with a curated set of popular, open source models, that cover a wide range of inference tasks:</p><ul><li><p><b>Text generation (large language model):</b> meta/llama-2-7b-chat-int8</p></li><li><p><b>Automatic speech recognition (ASR):</b> openai/whisper</p></li><li><p><b>Translation:</b> meta/m2m100-1.2</p></li><li><p><b>Text classification:</b> huggingface/distilbert-sst-2-int8</p></li><li><p><b>Image classification:</b> microsoft/resnet-50</p></li><li><p><b>Embeddings:</b> baai/bge-base-en-v1.5</p></li></ul><p>You can browse all available models in your Cloudflare dashboard, and soon you’ll be able to dive into logs and analytics on a per model basis!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3iLFApyCjCwTCEtV8QRhke/91793f5eaabe3c426cf5fb7f421f4508/image4-14.png" />
            
            </figure><p>This is just the start, and we’ve got big plans. After launch, we’ll continue to expand based on community feedback. Even more exciting - in an effort to take our catalog from zero to sixty, we’re announcing a partnership with Hugging Face, a leading AI community + hub. The partnership is multifaceted, and you can read more about it <a href="/best-place-region-earth-inference">here</a>, but soon you’ll be able to browse and run a subset of the Hugging Face catalog directly in Workers AI.</p>
    <div>
      <h2>Accessible to everyone</h2>
      <a href="#accessible-to-everyone">
        
      </a>
    </div>
    <p>Part of the mission of our developer platform is to provide <b>all</b> the building blocks that developers need to build the applications of their dreams. Having access to the right blocks is just one part of it — as a developer your job is to put them together into an application. Our goal is to make that as easy as possible.</p><p>To make sure you could use Workers AI easily regardless of entry point, we wanted to provide access via: Workers or Pages to make it easy to use within the Cloudflare ecosystem, and via REST API if you want to use Workers AI with your current stack.</p><p>Here’s a quick CURL example that translates some text from English to French:</p>
            <pre><code>curl https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/meta/m2m100-1.2b \
-H "Authorization: Bearer {API_TOKEN}" \
	-d '{ "text": "I'll have an order of the moule frites", "target_lang": "french" }'</code></pre>
            <p>And here are what the response looks like:</p>
            <pre><code>{
  "result": {
    "answer": "Je vais commander des moules frites"
  },
  "success": true,
  "errors":[],
  "messages":[]
}</code></pre>
            <p>Use it with any stack, anywhere - your favorite Jamstack framework, Python + Django/Flask, Node.js, Ruby on Rails, the possibilities are endless. And deploy.</p>
    <div>
      <h2>Designed for developers</h2>
      <a href="#designed-for-developers">
        
      </a>
    </div>
    <p>Developer experience is really important to us. In fact, most of this post has been about just that. Making sure it works out of the box. Providing popular models that just work. Being accessible to all developers whether you build and deploy with Cloudflare or elsewhere. But it’s more than that - the experience should be frictionless, zero to production should be fast, and it should feel good along the way.</p><p>Let’s walk through another example to show just how easy it is to use! We’ll run Llama 2, a popular <a href="https://www.cloudflare.com/learning/ai/what-is-large-language-model/">large language model</a> open sourced by Meta, in a worker.</p><p>We’ll assume you have some of the basics already complete (Cloudflare account, Node, NPM, etc.), but if you don’t <a href="https://developers.cloudflare.com/workers-ai/get-started/local-dev-setup/">this guide</a> will get you properly set up!</p>
    <div>
      <h3>1. Create a Workers project</h3>
      <a href="#1-create-a-workers-project">
        
      </a>
    </div>
    <p>Create a new project named workers-ai by running:</p>
            <pre><code>$ npm create cloudflare@latest</code></pre>
            <p>When setting up your workers-ai worker, answer the setup questions as follows:</p><ul><li><p>Enter <b>workers-ai</b> for the app name</p></li><li><p>Choose <b>Hello World</b> script for the type of application</p></li><li><p>Select <b>yes</b> to using TypeScript</p></li><li><p>Select <b>yes</b> to using Git</p></li><li><p>Select <b>no</b> to deploying</p></li></ul><p>Lastly navigate to your new app directory:</p>
            <pre><code>cd workers-ai</code></pre>
            
    <div>
      <h3>2. Connect Workers AI to your worker</h3>
      <a href="#2-connect-workers-ai-to-your-worker">
        
      </a>
    </div>
    <p>Create a Workers AI binding, which allows your worker to access the Workers AI service without having to manage an API key yourself.</p><p>To bind Workers AI to your worker, add the following to the end of your <b>wrangler.toml</b> file:</p>
            <pre><code>[ai]
binding = "AI" #available in your worker via env.AI</code></pre>
            <p>You can also bind Workers AI to a Pages Function. For more information, refer to <a href="https://developers.cloudflare.com/pages/platform/functions/bindings/#ai">Functions Bindings</a>.</p>
    <div>
      <h3>3. Install the Workers AI client library</h3>
      <a href="#3-install-the-workers-ai-client-library">
        
      </a>
    </div>
    
            <pre><code>npm install @cloudflare/ai</code></pre>
            
    <div>
      <h3>4. Run an inference task in your worker</h3>
      <a href="#4-run-an-inference-task-in-your-worker">
        
      </a>
    </div>
    <p>Update the <b>source/index.ts</b> with the following code:</p>
            <pre><code>import { Ai } from '@cloudflare/ai'
export default {
  async fetch(request, env) {
    const ai = new Ai(env.AI);
    const input = { prompt: "What's the origin of the phrase 'Hello, World'" };
    const output = await ai.run('@cf/meta/llama-2-7b-chat-int8', input );
    return new Response(JSON.stringify(output));
  },
};</code></pre>
            
    <div>
      <h3>5. Develop locally with Wrangler</h3>
      <a href="#5-develop-locally-with-wrangler">
        
      </a>
    </div>
    <p>While in your project directory, test Workers AI locally by running:</p>
            <pre><code>$ npx wrangler dev --remote</code></pre>
            <p><b>Note -</b> These models currently only run on Cloudflare’s network of GPUs (and not locally), so setting <code>--remote</code> above is a must, and you’ll be prompted to log in at this point.</p><p>Wrangler will give you a URL (most likely localhost:8787). Visit that URL, and you’ll see a response like this</p>
            <pre><code>{
  "response": "Hello, World is a common phrase used to test the output of a computer program, particularly in the early stages of programming. The phrase "Hello, World!" is often the first program that a beginner learns to write, and it is included in many programming language tutorials and textbooks as a way to introduce basic programming concepts. The origin of the phrase "Hello, World!" as a programming test is unclear, but it is believed to have originated in the 1970s. One of the earliest known references to the phrase is in a 1976 book called "The C Programming Language" by Brian Kernighan and Dennis Ritchie, which is considered one of the most influential books on the development of the C programming language.
}</code></pre>
            
    <div>
      <h3>6. Deploy your worker</h3>
      <a href="#6-deploy-your-worker">
        
      </a>
    </div>
    <p>Finally, deploy your worker to make your project accessible on the Internet:</p>
            <pre><code>$ npx wrangler deploy
# Outputs: https://workers-ai.&lt;YOUR_SUBDOMAIN&gt;.workers.dev</code></pre>
            <p>And that’s it. You can literally go from zero to deployed AI in minutes. This is obviously a simple example, but shows how easy it is to run Workers AI from any project. </p>
    <div>
      <h2>Privacy by default</h2>
      <a href="#privacy-by-default">
        
      </a>
    </div>
    <p>When Cloudflare was founded, our value proposition had three pillars: more secure, more reliable, and more performant. Over time, we’ve realized that a better Internet is also a more private Internet, and we want to play a role in building it.</p><p>That’s why Workers AI is private by default - we don’t train our models, LLM or otherwise, on your data or conversations, and our models don’t learn from your usage. You can feel confident using Workers AI in both personal and business settings, without having to worry about leaking your data. Other providers only offer this fundamental feature with their enterprise version. With us, it’s built in for everyone.</p><p>We’re also excited to support data localization in the future. To make this happen, we have an ambitious GPU rollout plan - we’re launching with seven sites today, roughly 100 by the end of 2023, and nearly everywhere by the end of 2024. Ultimately, this will empower developers to keep delivering killer AI features to their users, while staying compliant with their end users’ data localization requirements.</p>
    <div>
      <h2>The power of the platform</h2>
      <a href="#the-power-of-the-platform">
        
      </a>
    </div>
    
    <div>
      <h4>Vector database - Vectorize</h4>
      <a href="#vector-database-vectorize">
        
      </a>
    </div>
    <p>Workers AI is all about running Inference, and making it really easy to do so, but sometimes inference is only part of the equation. Large language models are trained on a fixed set of data, based on a snapshot at a specific point in the past, and have no context on your business or use case. When you submit a prompt, information specific to you can increase the quality of results, making it more useful and relevant. That’s why we’re also launching Vectorize, our <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector database</a> that’s designed to work seamlessly with Workers AI. Here’s a quick overview of how you might use Workers AI + Vectorize together.</p><p>Example: Use your data (knowledge base) to provide additional context to an LLM when a user is chatting with it.</p><ol><li><p><b>Generate initial embeddings:</b> run your data through Workers AI using an <a href="https://www.cloudflare.com/learning/ai/what-are-embeddings/">embedding model</a>. The output will be embeddings, which are numerical representations of those words.</p></li><li><p><b>Insert those embeddings into Vectorize:</b> this essentially seeds the vector database with your data, so we can later use it to retrieve embeddings that are similar to your users’ query</p></li><li><p><b>Generate embedding from user question:</b> when a user submits a question to your AI app, first, take that question, and run it through Workers AI using an embedding model.</p></li><li><p><b>Get context from Vectorize:</b> use that embedding to query Vectorize. This should output embeddings that are similar to your user’s question.</p></li><li><p><b>Create context aware prompt:</b> Now take the original text associated with those embeddings, and create a new prompt combining the text from the vector search, along with the original question</p></li><li><p><b>Run prompt:</b> run this prompt through Workers AI using an LLM model to get your final result</p></li></ol>
    <div>
      <h4>AI Gateway</h4>
      <a href="#ai-gateway">
        
      </a>
    </div>
    <p>That covers a more advanced use case. On the flip side, if you are running models elsewhere, but want to get more out of the experience, you can run those APIs through our AI gateway to get features like caching, rate-limiting, analytics and logging. These features can be used to protect your end point, monitor and optimize costs, and also help with data loss prevention. Learn more about AI gateway <a href="/announcing-ai-gateway">here</a>.</p>
    <div>
      <h2>Start building today</h2>
      <a href="#start-building-today">
        
      </a>
    </div>
    <p>Try it out for yourself, and let us know what you think. Today we’re launching Workers AI as an open Beta for all Workers plans - free or paid. That said, it’s super early, so…</p>
    <div>
      <h4>Warning - It’s an early beta</h4>
      <a href="#warning-its-an-early-beta">
        
      </a>
    </div>
    <p>Usage is <b>not currently recommended for production apps</b>, and limits + access are subject to change.</p>
    <div>
      <h4>Limits</h4>
      <a href="#limits">
        
      </a>
    </div>
    <p>We’re initially launching with limits on a per-model basis</p><ul><li><p>@cf/meta/llama-2-7b-chat-int8: 50 reqs/min globally</p></li></ul><p>Checkout our <a href="https://developers.cloudflare.com/workers-ai/platform/limits/">docs</a> for a full overview of our limits.</p>
    <div>
      <h4>Pricing</h4>
      <a href="#pricing">
        
      </a>
    </div>
    <p>What we released today is just a small preview to give you a taste of what’s coming (we simply couldn’t hold back), but we’re looking forward to putting the full-throttle version of Workers AI in your hands.</p><p>We realize that as you approach building something, you want to understand: how much is this going to cost me? Especially with AI costs being so easy to get out of hand. So we wanted to share the upcoming pricing of Workers AI with you.</p><p>While we won’t be billing on day one, we are announcing what we expect our pricing will look like.</p><p>Users will be able to choose from two ways to run Workers AI:</p><ul><li><p><b>Regular Twitch Neurons (RTN)</b> - running wherever there's capacity at $0.01 / 1k neurons</p></li><li><p><b>Fast Twitch Neurons (FTN)</b> - running at nearest user location at $0.125 / 1k neurons</p></li></ul><p>You may be wondering — what’s a neuron?</p><p>Neurons are a way to measure AI output that always scales down to zero (if you get no usage, you will be charged for 0 neurons). To give you a sense of what you can accomplish with a thousand neurons, you can: generate 130 LLM responses, 830 image classifications, or 1,250 embeddings.</p><p>Our goal is to help our customers pay only for what they use, and choose the pricing that best matches their use case, whether it’s price or latency that is top of mind.</p>
    <div>
      <h3>What’s on the roadmap?</h3>
      <a href="#whats-on-the-roadmap">
        
      </a>
    </div>
    <p>Workers AI is just getting started, and we want your feedback to help us make it great. That said, there are some exciting things on the roadmap.</p>
    <div>
      <h4>More models, please</h4>
      <a href="#more-models-please">
        
      </a>
    </div>
    <p>We're launching with a solid set of models that just work, but will continue to roll out new models based on your feedback. If there’s a particular model you'd love to see on Workers AI, pop into our <a href="https://discord.cloudflare.com/">Discord</a> and let us know!</p><p>In addition to that, we're also announcing a <a href="/best-place-region-earth-inference">partnership with Hugging Face</a>, and soon you'll be able to access and run a subset of the Hugging Face catalog directly from Workers AI.</p>
    <div>
      <h4>Analytics + observability</h4>
      <a href="#analytics-observability">
        
      </a>
    </div>
    <p>Up to this point, we’ve been hyper focussed on one thing - making it really easy for any developer to run powerful AI models in just a few lines of code. But that’s only one part of the story. Up next, we’ll be working on some analytics and <a href="https://www.cloudflare.com/learning/performance/what-is-observability/">observability</a> capabilities to give you insights into your usage + performance + spend on a per-model basis, plus the ability to fig into your logs if you want to do some exploring.</p>
    <div>
      <h4>A road to global GPU coverage</h4>
      <a href="#a-road-to-global-gpu-coverage">
        
      </a>
    </div>
    <p>Our goal is to be the best place to run inference on Region: Earth, so we're adding GPUs to our data centers as fast as we can.</p><p><b>We plan to be in 100 data centers by the end of this year</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5A8SGUOEAcs3sjNjv48yIh/bafbc77b256fef490d4357613b036603/image3-28.png" />
            
            </figure><p><b>And nearly everywhere by the end of 2024</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2rrL2H0dHYZ4hxOBq0X1pw/f38d122af92f789dc2b31d3bdea1ab06/unnamed-3.png" />
            
            </figure><p><b>We’re really excited to see you build</b> - head over to <a href="https://developers.cloudflare.com/workers-ai/">our docs</a> to get started.</p><p>If you need inspiration, want to share something you’re building, or have a question - pop into our <a href="https://discord.com/invite/cloudflaredev">Developer Discord</a>.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Database]]></category>
            <category><![CDATA[Vectorize]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">6jSrrIFC7yStZxCaqaM0c1</guid>
            <dc:creator>Phil Wittig</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Rebecca Weekly</dc:creator>
            <dc:creator>Celso Martinho</dc:creator>
            <dc:creator>Meaghan Choi</dc:creator>
        </item>
        <item>
            <title><![CDATA[Partnering with Hugging Face to make deploying AI easier and more affordable than ever 🤗]]></title>
            <link>https://blog.cloudflare.com/partnering-with-hugging-face-deploying-ai-easier-affordable/</link>
            <pubDate>Wed, 27 Sep 2023 13:00:33 GMT</pubDate>
            <description><![CDATA[ Today, we’re excited to announce that we are partnering with Hugging Face to make AI models more accessible and affordable than ever before to developers ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1F3TYuufltf2QjxIC3yZfw/f79a7e4526c5b84501bd6dd88107a232/image3-26.png" />
            
            </figure><p>Today, we’re excited to announce that we are partnering with Hugging Face to make AI models more accessible and affordable than ever before to developers.</p><p>There are three things we look forward to making available to developers over the coming months:</p><ol><li><p>We’re excited to bring serverless GPU models to Hugging Face — no more wrangling infrastructure or paying for unused capacity. Just pick your model, and go;</p></li><li><p>Bringing popular Hugging Face optimized models to Cloudflare’s model catalog;</p></li><li><p>Introduce Cloudflare integrations as a part of Hugging Face’s Inference solutions.</p></li></ol><p>Hosting over 500,000 models and serving over one million model downloads a day, Hugging Face is the go-to place for developers to add AI to their applications.</p><p>Meanwhile, over the past six years at Cloudflare, our goal has been to make it as easy as possible for developers to bring their ideas and applications to life on our developer platform.</p><p>As AI has become a critical part of every application, this partnership has felt like a natural match to put tools in the hands of developers to make deploying AI easy and affordable.</p><blockquote><p><i>“Hugging Face and Cloudflare both share a deep focus on making the latest AI innovations as accessible and affordable as possible for developers. We’re excited to offer serverless GPU services in partnership with Cloudflare to help developers scale their AI apps from zero to global, with no need to wrangle infrastructure or predict the future needs of your application — just pick your model and deploy.”— </i><b><i>Clem Delangue</i></b><i>, CEO of Hugging Face.</i></p></blockquote><p>We’re excited to share what’s to come, so we wanted to give you a sneak peek into what’s ahead.</p>
    <div>
      <h3>Hugging Face models at your fingertips</h3>
      <a href="#hugging-face-models-at-your-fingertips">
        
      </a>
    </div>
    <p>As a developer, when you have an idea, you want to be able to act on it as quickly as possible. Through our partnership, we’re excited to provide you with familiar models, regardless of where you’re getting started.</p><p>If you’re using Cloudflare’s developer platform to build applications, we’re excited to bring Hugging Face models into the flow as a native part of the experience. You will soon be able to deploy Hugging Face models, optimized for performance and speed, right from Cloudflare’s dashboard.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2mEgdjHHJIHIBOeXIqTABX/9f97e52ae77ca34d408aa038f97c0505/image1-24.png" />
            
            </figure><p>Alternatively, if you’re used to perusing and finding your models on Hugging Face, you will soon be able to deploy them directly from the Hugging Face UI directly to Workers AI.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2cA45b5Q7oWeU8MiHYcsEx/90b06d9e767e87610d9fc0371f3f542c/group_4.png" />
            
            </figure><p>Both of our teams are committed to building the best developer experiences possible, so we look forward to continuing to file away any friction that gets in developers’ ways of building the next big AI idea.</p>
    <div>
      <h3>Bringing serverless GPU inference to Hugging Face users</h3>
      <a href="#bringing-serverless-gpu-inference-to-hugging-face-users">
        
      </a>
    </div>
    <p>Hugging Face offers multiple inference solutions to serve predictions from the 500,000 models hosted on the platform without managing infrastructure, from the free and rate-limited <a href="https://huggingface.co/docs/api-inference/index">Inference API</a>, to dedicated infrastructure deployments with <a href="https://huggingface.co/inference-endpoints">Inference Endpoints</a>, and even in-browser edge inference with <a href="https://huggingface.co/docs/transformers.js/index">Transformers.js</a>.</p><p>We look forward to working closely with the teams at Hugging Face to enable new experiences powered by Cloudflare: from new serverless GPU inference solutions, to new edge use cases - stay tuned!</p>
    <div>
      <h3>See you soon!</h3>
      <a href="#see-you-soon">
        
      </a>
    </div>
    <p>We couldn’t wait to share the news with our developers about our partnership, and can’t wait to put these experiences in the hands of developers over the coming months.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <guid isPermaLink="false">K5Ff56lIvJBo6kOVLPrlW</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Philipp Schmid (Guest Author)</dc:creator>
            <dc:creator>Jeff Boudier (Guest Author)</dc:creator>
        </item>
        <item>
            <title><![CDATA[Globally distributed AI and a Constellation update]]></title>
            <link>https://blog.cloudflare.com/globally-distributed-ai-and-a-constellation-update/</link>
            <pubDate>Thu, 22 Jun 2023 13:00:05 GMT</pubDate>
            <description><![CDATA[ Today we’re announcing new Constellation features, explain why it’s the first globally distributed AI platform and why deploying your machine learning tasks in our global network is advantageous. ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/d7mzaMT9WUUuX6PKMqP0o/f33c7430024dca3b9eeb0b65b8ee4d21/image2-27.png" />
            
            </figure><p>During Cloudflare's 2023 Developer Week, we announced <a href="/introducing-constellation/">Constellation</a>, a set of APIs that allow everyone to run fast, low-latency inference tasks using pre-trained machine learning/AI models, directly on Cloudflare’s network.</p>
    <div>
      <h3>Constellation update</h3>
      <a href="#constellation-update">
        
      </a>
    </div>
    <p>We now have a few thousand accounts onboarded in the Constellation private beta and have been listening to our customer's feedback to evolve and improve the platform. Today, one month after the announcement, we are upgrading Constellation with three new features:</p><p><b>Bigger models</b>We are increasing the size limit of your models from 10 MB to 50 MB. While still somewhat conservative during the private beta, this new limit opens doors to more pre-trained and optimized models you can use with Constellation.</p><p><b>Tensor caching</b>When you run a Constellation inference task, you pass multiple tensor objects as inputs, sometimes creating big data payloads. These inputs travel through the wire protocol back and forth when you repeat the same task, even when the input changes from multiple runs are minimal, creating unnecessary network and data parsing overhead.</p><p>The client API now supports caching input tensors resulting in even better network latency and faster inference times.</p><p><b>XGBoost runtime</b>Constellation started with the ONNX runtime, but our vision is to support multiple runtimes under a common API. Today we're adding the XGBoost runtime to the list.</p><p><a href="https://xgboost.ai/">XGBoost</a> is an optimized distributed gradient boosting library designed to be highly efficient, flexible, and portable, and it's known for its performance in structured and tabular data tasks.</p><p>You can start uploading and using XGBoost models today.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1KCtc0U75hfGd2cztvKt2H/89eda58cb5e59d749cfe84549fde59af/SRYFZbgQfXB60T7k7-Fj0PAP3cWbivZm6oU_jQFzoDbQQSF4IHkCmfugCHSHLwL4_pfE6-tlYfgHrsNg7Z5z5JLvjlUp8aPOiXPVHqGOT_mfAVgB70rn8_QxvekK.png" />
            
            </figure><p>You can find the updated documentation with these new features and an example on how to use the XGBoost runtime with Constellation in our <a href="https://developers.cloudflare.com/constellation">Developers Documentation</a>.</p>
    <div>
      <h3>An era of globally distributed AI</h3>
      <a href="#an-era-of-globally-distributed-ai">
        
      </a>
    </div>
    <p>Since Cloudflare’s network is globally distributed, Constellation is our first public release of globally distributed machine learning.</p><p>But what does this mean? You may not think of a global network as the place to deploy your machine learning tasks, but machine learning has been a core part of what’s enabled much of Cloudflare’s core functionality for many years. And we run it across our <a href="https://www.cloudflare.com/network/">global network in 300 cities</a>.</p><p>Is this large spike in traffic an attack or a Black Friday sale? What’s going to be the best way to route this request based on current traffic patterns? Is this request coming from a human or a bot? Is this HTTP traffic a zero-day? Being able to answer these questions using automated <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">machine learning</a> and <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a>, rather than human intervention, is one of the things that’s enabled Cloudflare to scale.</p><p>But this is just a small sample of what globally distributed machine learning enables. The reason this was so helpful for us was because we were able to run this machine learning as an integrated part of our stack, which is why we’re now in the process of opening it up to more and more developers with Constellation.</p><p>As Michelle Zatlyn, our co-founder likes to say, we’re just getting started (in this space) — every day we’re adding hundreds of new users to our <a href="/introducing-constellation/">Constellation beta</a>, testing out and globally deploying new models, and beyond that, deploying new hardware to support the new types of workloads that <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> will bring to the our global network.</p><p>With that, we wanted to share a few announcements and some use cases that help illustrate why we’re so excited about globally distributed AI. And since it’s Speed Week, it should be no surprise that, well, speed is at the crux of it all.</p>
    <div>
      <h3>Custom tailored web experiences, powered by AI</h3>
      <a href="#custom-tailored-web-experiences-powered-by-ai">
        
      </a>
    </div>
    <p>We’ve long known about the importance of performance when it comes to web experiences — in e-commerce, every second of page load time can have as much as a 7% drop off effect on conversion. But being fast is not enough. It’s necessary, but not sufficient. You also have to be accurate.</p><p>That is, rather than serving one-size-fits-all experiences, users have come to expect that you know what they want before they do.</p><p>So you have to serve personalized experiences, and you have to do it fast. That’s where Constellation can come into play. With Constellation, as a part of your e-commerce application that may already be served from Cloudflare’s network through Workers or Pages, or even store data in <a href="https://developers.cloudflare.com/d1/">D1</a>, you can now perform tasks such as categorization (what demographic is this customer most likely in?) and personalization (if you bought this, you may also like that).</p>
    <div>
      <h3>Making devices smarter wherever they are</h3>
      <a href="#making-devices-smarter-wherever-they-are">
        
      </a>
    </div>
    <p>Another use case where performance is critical is in interacting with the real world. Imagine a face recognition system that detects whether you’re human or not every time you go into your house. Every second of latency makes a difference (especially if you’re holding heavy groceries).</p><p>Running inference on Cloudflare’s network, means that within 95% of the world’s population, compute, and thus a decision, is never going to be more than 50ms away. This is in huge contrast to centralized compute, where if you live in Europe, but bought a doorbell system from a US-based company, may be up to hundreds of milliseconds round trip away.</p><p>You may be thinking, why not just run the compute on the device then?</p><p>For starters, running inference on the device doesn’t guarantee fast performance. Most devices with built in intelligence are run on microcontrollers, often with limited computational abilities (not a high-end GPU or server-grade CPU). Milliseconds become seconds; depending on the volume of workloads you need to process, the local inference might not be suitable. The compute that can be fit on devices is simply not powerful enough for high-volume complex operations, certainly not for operating at low-latency.</p><p>But even user experience aside (some devices don’t interface with a user directly), there are other downsides to running compute directly on devices.</p><p>The first is battery life — the longer the compute, the shorter the battery life. There's always a power consumption hit, even if you have a custom <a href="https://en.wikipedia.org/wiki/Application-specific_integrated_circuit">ASIC chip</a> or a Tensor Processing Unit (<a href="https://en.wikipedia.org/wiki/Tensor_Processing_Unit">TPU</a>), meaning shorter battery life if that's one of your constraints. For consumer products, this means having to switch out your doorbell battery (lest you get locked out). For operating fleets of devices at scale (imagine watering devices in a field) this means costs of keeping up with, and swapping out batteries.</p><p>Lastly, device hardware, and even software, is harder to update. As new technologies or more efficient chips become available, upgrading fleets of hundreds or thousands of devices is challenging. And while software updates may be easier to manage, they’ll never be as easy as updating on-cloud software, where you can effortlessly ship updates multiple times a day!</p><p>Speaking of shipping software…</p>
    <div>
      <h3>AI applications, easier than ever with Constellation</h3>
      <a href="#ai-applications-easier-than-ever-with-constellation">
        
      </a>
    </div>
    <p>Speed Week is not just about making your applications or devices faster, but also your team!</p><p>For the past six years, our developer platform has been making it easy for developers to ship new code with Cloudflare Workers. With Constellation, it’s now just as easy to add Machine Learning to your existing application, with just a few commands.</p><p>And if you don’t believe us, don’t just take our word for it. We’re now in the process of opening up the beta to more and more customers. To request access, head on over to the Cloudflare Dashboard where you’ll see a new tab for Constellation. We encourage you to check out <a href="https://developers.cloudflare.com/constellation/get-started/first-constellation-worker/">our tutorial</a> for getting started with Constellation — this AI thing may be even easier than you expected it to be!</p>
    <div>
      <h3>We’re just getting started</h3>
      <a href="#were-just-getting-started">
        
      </a>
    </div>
    <p>This is just the beginning of our journey for helping developers build AI driven applications, and we’re already thinking about what’s next.</p><p>We look forward to seeing what you build, and hearing your feedback.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Machine Learning]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">38XFu6bOuh2W9Z5jgDbZis</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Celso Martinho</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Constellation, bringing AI to the Cloudflare stack]]></title>
            <link>https://blog.cloudflare.com/introducing-constellation/</link>
            <pubDate>Mon, 15 May 2023 13:05:00 GMT</pubDate>
            <description><![CDATA[ Today, we're excited to welcome Constellation to the Cloudflare stack. Constellation allows you to run fast, low-latency inference tasks on pre-trained machine learning models natively on Workers ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3R4RgKJy7bJgVYTAAfaVHG/f3f2ef323f76c75d0da732f003a25863/image4-6.png" />
            
            </figure><p>The Cloudflare Workers' ecosystem now features products and features ranging from compute, hosting, storage, databases, streaming, networking, security, and <a href="https://developers.cloudflare.com/">much more</a>. Over time, we've been trying to inspire others to switch from traditional software architectures, <a href="/welcome-to-wildebeest-the-fediverse-on-cloudflare/">proving</a> and <a href="/technology-behind-radar2/">documenting</a> how it's possible to build complex applications that scale globally on top of our stack.</p><p>Today, we're excited to welcome Constellation to the Cloudflare stack, enabling developers to run pre-trained machine learning models and inference tasks on Cloudflare's network.</p>
    <div>
      <h2>One more building block in our Supercloud</h2>
      <a href="#one-more-building-block-in-our-supercloud">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">Machine learning</a> and <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> have been hot topics lately, but the reality is that we have been using these technologies in our daily lives for years now, even if we do not realize it. Our mobile phones, computers, cars, and home assistants, to name a few examples, all have AI. It's everywhere.</p><p>But it isn't a commodity to developers yet, though. They often need to understand the mathematics behind it, the software and tools are dispersed and complex, and the hardware or cloud services to run the frameworks and data are expensive.</p><p><b>Today we're introducing another feature to our stack, allowing everyone to run machine learning models and perform inference on top of Cloudflare Workers.</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xTzpRtAzAndPm92lizbSW/8915b8578353576900208e752426c8dc/image2-8.png" />
            
            </figure>
    <div>
      <h2>Introducing Constellation</h2>
      <a href="#introducing-constellation">
        
      </a>
    </div>
    <p>Constellation allows you to run fast, low-latency inference tasks using pre-trained machine learning models natively with Cloudflare Workers scripts.</p><p>Some examples of applications that you can deploy leveraging Constellation are:</p><ul><li><p>Image or audio classification or object detection</p></li><li><p>Anomaly Detection in Data</p></li><li><p>Text translation, summarization, or similarity analysis</p></li><li><p>Natural Language Processing</p></li><li><p>Sentiment analysis</p></li><li><p>Speech recognition or text-to-speech</p></li><li><p>Question answering</p></li></ul><p>Developers can upload any supported model to Constellation. They can train them independently or download pre-trained models from machine learning hubs like <a href="https://huggingface.co/models?library=onnx&amp;sort=downloads">HuggingFace</a> or <a href="https://github.com/onnx/models">ONNX Zoo</a>.</p><p>However, not everyone will want to train models or browse the Internet for models they didn't test yet. For that reason, Cloudflare will also maintain a catalog of verified and ready-to-use models.</p><p>We built Constellation with a great developer experience and simple-to-use APIs in mind. Here's an example to get you started.</p>
    <div>
      <h2>Image classification application</h2>
      <a href="#image-classification-application">
        
      </a>
    </div>
    <p>In this example, we will build an image classification app powered by the Constellation inference API and the <a href="https://github.com/onnx/models/blob/main/vision/classification/squeezenet/README.md">SqueezeNet</a> model, a convolutional neural network (CNN) that was pre-trained on more than one million images from the open-source <a href="https://www.image-net.org/">ImageNet</a> database and can classify images into no more than 1,000 categories.</p><p>SqueezeNet compares to <a href="https://en.wikipedia.org/wiki/AlexNet">AlexNet</a>, one of the original CNNs and benchmarks for image classification, by being much faster (~3x) and much smaller (~500x) while still achieving similar levels of accuracy. Its small footprint makes it ideal for running on portable devices with limited resources or custom hardware.</p><p>First, let's create a new Constellation project using the ONNX runtime. <a href="https://developers.cloudflare.com/workers/wrangler/">Wrangler</a> now has functionality for Constellation built-in with the <code>constellation</code> keyword.</p>
            <pre><code>$ npx wrangler constellation project create "image-classifier" ONNX</code></pre>
            <p>Now let’s create the <code>wrangler.toml</code> configuration file with the project binding:</p>
            <pre><code># Top-level configuration
name = "image-classifier-worker"
main = "src/index.ts"
compatibility_date = "2022-07-12"

constellation = [
    {
      binding = 'CLASSIFIER',
      project_id = '2193053a-af0a-40a6-b757-00fa73908ef6'
    },
]</code></pre>
            <p>Installing the Constellation client API library:</p>
            <pre><code>$ npm install @cloudflare/constellation --save-dev</code></pre>
            <p>Upload the pre-trained SqueezeNet 1.1 ONNX model to the project.</p>
            <pre><code>$ wget https://github.com/microsoft/onnxjs-demo/raw/master/docs/squeezenet1_1.onnx
$ npx wrangler constellation model upload "image-classifier" "squeezenet11" squeezenet1_1.onnx</code></pre>
            <p>As we said above, SqueezeNet classifies images into no more than 1,000 object classes. These classes are actually in the form of a list of synonym rings or synsets. A <a href="http://wordnet-rdf.princeton.edu/pwn30/01440764-n">synset</a> has an id and a label; it derives from Princeton's <a href="https://wordnet.princeton.edu/">WordNet</a> database <a href="https://wordnet.princeton.edu/documentation/">terminology</a>, the same used to label the <a href="https://www.image-net.org/about.php">ImageNet</a> image database.</p><p>To translate SqueezeNet's results into human-readable image classes, we need a file that maps the synset ids (what we get from the model) to their corresponding labels.</p>
            <pre><code>$ mkdir src; cd src
$ wget https://raw.githubusercontent.com/microsoft/onnxjs-demo/master/src/data/imagenet.ts</code></pre>
            <p>And finally, let’s code and deploy our image classification script:</p>
            <pre><code>import { imagenetClasses } from './imagenet';
import { Tensor, run } from '@cloudflare/constellation';

export interface Env {
    CLASSIFIER: any,
}

export default {
    async fetch(request: Request, env: Env, ctx: ExecutionContext) {
        const formData = await request.formData();
        const file = formData.get("file");
        const data = await file.arrayBuffer();
        const result = await processImage(env, data);
        return new Response(JSON.stringify(result));
    },
};

async function processImage(env: Env, data: ArrayBuffer) {
    const input = await decodeImage(data)

    const tensorInput = new Tensor("float32", [1, 3, 224, 224], input)

    const output = await run(env.CLASSIFIER, "MODEL-UUID", tensorInput);

    const probs = output.squeezenet0_flatten0_reshape0.value
    const softmaxResult = softmax(probs)
    const results = imagenetClasses(softmaxResult, 5);
    const topResult = results[0];
    return topResult
}</code></pre>
            <p>This script reads an image from the request, decodes it into a multidimensional float32 tensor (right now we only decode PNGs, but we can add other formats), feeds it to the SqueezeNet model running in Constellation, gets the results, matches them with the ImageNet classes list, and returns the human-readable tags for the image.</p><p>Pretty simple, no? Let’s test it:</p>
            <pre><code>$ curl https://ai.cloudflare.com/demos/image-classifier -F file=@images/mountain.png | jq .name

alp

$ curl https://ai.cloudflare.com/demos/image-classifier -F file=@images/car.png | jq .name

convertible

$ curl https://ai.cloudflare.com/demos/image-classifier -F file=@images/dog.png | jq .name

Ibizan hound</code></pre>
            
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7xWxx9wYlUqkpVYUlOOeYL/ee44e25d82b6297eb048938e18384678/Screenshot-2023-05-15-at-12.55.21.png" />
            
            </figure><p>You can see the probabilities in action here. The model is quite sure about the Alp and the Convertible, but the Ibizan hound has a lower probability. Indeed, the dog in the picture is from another breed.</p><p>This small app demonstrates how easy and fast you can start using machine learning models and Constellation when building applications on top of Workers. Check the full source code <a href="https://developers.cloudflare.com/constellation/get-started/first-constellation-worker/">here</a> and deploy it yourself.</p>
    <div>
      <h2>Transformers</h2>
      <a href="#transformers">
        
      </a>
    </div>
    <p><a href="https://en.wikipedia.org/wiki/Transformer_(machine_learning_model)">Transformers</a> were introduced by Google; they are deep-learning models designed to process sequential input data and are commonly used for natural language processing (NLP), like translations, summarizations, or sentiment analysis, and computer vision (CV) tasks, like image classification.</p><p><a href="https://github.com/xenova/transformers.js">Transformers.js</a> is a popular demo that loads transformer models from HuggingFace and runs them inside your browser using the ONNX Runtime compiled to <a href="https://developers.cloudflare.com/workers/platform/web-assembly/">WebAssembly</a>. We ported this demo to use Constellation APIs instead.</p><p>Here's the link to our version: <a href="https://transformers-js.pages.dev/">https://transformers-js.pages.dev/</a></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/75BazjDxuRzLywP7ZwjeMz/d9ebaebfffd4b4d79954fbb2d77bc6c2/image3-5.png" />
            
            </figure>
    <div>
      <h2>Interoperability with Workers</h2>
      <a href="#interoperability-with-workers">
        
      </a>
    </div>
    <p>The other interesting element of Constellation is that because it runs natively in Workers, you can orchestrate it with other products and APIs in our stack. You can use KV, R2, D1, Queues, anything, even Email.</p><p>Here's an example of a Worker that <a href="https://developers.cloudflare.com/email-routing/email-workers/">receives</a> Emails for your domain on Cloudflare using <a href="https://developers.cloudflare.com/email-routing/">Email Routing</a>, runs Constellation using the <a href="https://huggingface.co/Xenova/t5-small/tree/main/onnx">t5-small</a> sentiment analysis model, adds a header with the resulting score, and forwards it to the destination address.</p>
            <pre><code>import { Tensor, run } from '@cloudflare/constellation';
import * as PostalMime from 'postal-mime';

export interface Env {
    SENTIMENT: any,
}

export default {
  async email(message, env, ctx) {
    const rawEmail = await streamToArrayBuffer(event.raw, event.rawSize);
    const parser = new PostalMime.default();
    const parsedEmail = await parser.parse(rawEmail);

    const input = tokenize(parsedEmail.text)
    const output = await run( env.SENTIMENT, "MODEL-UUID", input);


    var headers = new Headers();
    headers.set("X-Sentiment", idToLabel[output.label]);
    await message.forward("gooddestination@example.com", headers);
  }
}</code></pre>
            <p>Now you can use Gmail or any email client to apply a rule to your messages based on the 'X-Sentiment' header. For example, you might want to move all the angry emails outside your Inbox to a different folder on arrival.</p>
    <div>
      <h2>Start using Constellation</h2>
      <a href="#start-using-constellation">
        
      </a>
    </div>
    <p>Constellation starts today in private beta. To join the waitlist, please head to the dashboard, click the Workers tab under your account, and click the "Request access" button under the <a href="https://dash.cloudflare.com/?to=/:account/workers/constellation">Constellation entry</a>. The team will be onboarding accounts in batches; you'll get an email when your account is enabled.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Gn2kLFDXOMHjK2x0biPlS/9a1af77c70a2ea36f472f0643e13d396/image1-25.png" />
            
            </figure><p>In the meantime, you can read our <a href="https://developers.cloudflare.com/constellation/">Constellation Developer Documentation</a> and learn more about how it works and the APIs. Constellation can be used from Wrangler, our command-line tool for configuring, building, and deploying applications with Cloudflare developer products, or managed directly in the Dashboard UI.</p><p>We are eager to learn how you want to use ML/AI with your applications. Constellation will keep improving with higher limits, more supported runtimes, and larger models, but we want to hear from you. Your feedback will certainly influence our roadmap decisions.</p><p>One last thing: today, we've been talking about how you can write Workers that use Constellation, but here's an inception fact: Constellation itself was built using the power of WebAssembly, Workers, R2, and our APIs. We'll make sure to write a follow-up blog soon about how we built it; stay tuned.</p><p>As usual, you can talk to us on our <a href="https://discord.cloudflare.com">Developers Discord</a> (join the #constellation channel) or the <a href="https://community.cloudflare.com/c/developers/constellation/97">Community forum</a>; the team will be listening.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">7gPZqgjeqOZXqiC7XdNp8p</guid>
            <dc:creator>Celso Martinho</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Cursor: the Cloudflare AI Assistant]]></title>
            <link>https://blog.cloudflare.com/introducing-cursor-the-ai-assistant-for-docs/</link>
            <pubDate>Mon, 15 May 2023 13:00:42 GMT</pubDate>
            <description><![CDATA[ Check out Cursor - our experimental AI assistant trained to answer questions about Cloudflare’s Developer Platform! ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VAjf7x1mfBG0W9mVTgOGV/06ecaa94b96579f3b5c9afc5fdf1fa3f/cursor-OG.png" />
            
            </figure><p>Today we’re excited to be launching Cursor – <a href="https://developers.cloudflare.com/workers/ai/">our experimental AI assistant</a>, trained to answer questions about Cloudflare’s Developer Platform. This is just the first step in our journey to help developers build in the fastest way possible using AI, so we wanted to take the opportunity to share our vision for a generative developer experience.</p><p>Whenever a new, disruptive technology comes along, it’s not instantly clear what the native way to interact with that technology will be.</p><p>However, if you’ve played around with Large Language Models (LLMs) such as ChatGPT, it’s easy to get the feeling that this is something that’s going to change the way we work. The question is: how? While this technology already feels super powerful, today, we’re still in the relatively early days of it.</p><p>While Developer Week is all about meeting developers where they are, this is one of the things that’s going to change just that — where developers are, and how they build code. We’re already seeing the beginnings of how the way developers write code is changing, and adapting to them. We wanted to share with you how we’re thinking about it, what’s on the horizon, and some of the large bets to come.</p>
    <div>
      <h2>How is AI changing developer experience?</h2>
      <a href="#how-is-ai-changing-developer-experience">
        
      </a>
    </div>
    <p>If there’s one big thing we can learn from the exploding success of ChatGPT, it’s the importance of pairing technology with the right interface. GPT-3 — the technology powering ChatGPT has been around for some years now, but the masses didn’t come until ChatGPT made it accessible to the masses.</p><p>Since the primary customers of our platform are developers, it’s on us to find the right interfaces to help developers move fast on our platform, and we believe AI can unlock unprecedented developer productivity. And we’re still in the beginning of that journey.</p>
    <div>
      <h3>Wave 1: AI generated content</h3>
      <a href="#wave-1-ai-generated-content">
        
      </a>
    </div>
    <p>One of the things ChatGPT is exceptionally good at is generating new content and articles. If you’re a bootstrapped developer relations team, the first day playing around with ChatGPT may have felt like you struck the jackpot of productivity. With a simple inquiry, ChatGPT can generate in a few seconds a tutorial that would have otherwise taken hours if not days to write out.</p><p>This content still needs to be tested — do the code examples work? Does the order make sense? While it might not get everything right, it’s a massive productivity boost, allowing a small team to multiply their content output.</p><p>In terms of developer experience, examples and tutorials are crucial for developers, especially as they start out with a new technology, or seek validation on a path they’re exploring.</p><p>However, with <a href="https://www.cloudflare.com/learning/ai/what-is-generative-ai/">AI generated</a> content, it’s always going to be limited to well, how much of it you generated. To compare it to the newspaper, this content is still one size fits all. If as a developer you stray ever so slightly off the beaten path (choose a different framework than the one tutorial suggests, or a different database), you’re still left to put the pieces together, navigating tens of open tabs in order to stitch together your application.</p><p>If this content is already being generated by AI, however, why not just go straight to the source, and allow developers to generate their own, personal guides?</p>
    <div>
      <h3>Wave 2: Q&amp;A assistants</h3>
      <a href="#wave-2-q-a-assistants">
        
      </a>
    </div>
    <p>Since developers love to try out new technologies, it’s no surprise that developers are going to be some of the early adopters for technology such as ChatGPT. Many developers are already starting to build applications alongside their trusted bard, ChatGPT.</p><p>Rather than using generated content, why not just go straight to the source, and ask ChatGPT to generate something that’s tailored specifically for you?</p><p>There’s one tiny problem: the information is not always up to date. Which is why plugins are going to become a super important way to interact.</p><p>But what about someone who’s already on Cloudflare’s docs? Here, you want a native experience where someone can ask questions and receive answers. Similarly, if you have a question, why spend time searching the docs, if you can just ask and receive an answer?</p>
    <div>
      <h3>Wave 3: generative experiences</h3>
      <a href="#wave-3-generative-experiences">
        
      </a>
    </div>
    <p>In the examples above, you were still relying on switching back and forth between a dedicated AI interface and the problem at hand. In one tab you’re asking questions, while in another, you’re implementing the answers.</p><p>But taking things another step further, what if AI just met you where you were? In terms of developer experience, we’re already starting to see this in the authoring phase. Tools like GitHub Copilot help developers generate boilerplate code and tests, allowing developers to focus on more complex tasks like designing architecture and algorithms.</p><p>Sometimes, however, the first iteration AI comes up with might not match what you, the developer had in mind, which is why we’re starting to experiment with a flow-based generative approach, where you can ask AI to generate several versions, and build out your design with the one that matches your expectations the most.</p><p>The possibilities are endless, enabling developers to start applications from prompts rather than pre-generated templates.</p><p>We’re excited for all the possibilities AI will unlock to make developers more productive than ever, and we’d love to hear from you how AI is changing the way you change applications.</p><p>We’re also excited to share our first steps into the realm of AI driven developer experience with the release of our first two ChatGPT plugins, and by welcoming a new member of our team —Cursor, our docs AI assistant.</p>
    <div>
      <h2>Our first milestone to AI driven UX: AI Assisted Docs</h2>
      <a href="#our-first-milestone-to-ai-driven-ux-ai-assisted-docs">
        
      </a>
    </div>
    <p>As the first step towards using AI to streamline our developer experience, we’re excited to introduce a new addition to our documentation to help you get answers as quickly as possible.</p>
    <div>
      <h3>How to use Cursor</h3>
      <a href="#how-to-use-cursor">
        
      </a>
    </div>
    <p>Here’s a sample exchange with Cursor:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2KTPs50lW0D4CjAheccUCL/6e7e2956d835574681a72a6487bca28c/image2-7.png" />
            
            </figure><p>You’ll notice that when you ask a question, it will respond with two pieces of information: a text based response answering your questions, and links to relevant pages in our documentation that can help you go further.</p><p>Here’s what happens when we ask “What video formats does Stream support?”.</p><div></div>
<p></p><p>If you were looking through our examples you may not immediately realize that this specific example uses both Workers and R2.</p><p>In its current state, you can think of it as your assistant to help you learn about our products and navigate our documentation in a conversational way. We’re labeling Cursor as experimental because this is the very beginning stages of what we feel like a Cloudflare AI assistant could do to help developers. It is helpful, but not perfect. To deal with its lack of perfection, we took an approach of having it do fewer things better. You’ll find there are many things it isn’t good at today.</p>
    <div>
      <h3>How we built Cursor</h3>
      <a href="#how-we-built-cursor">
        
      </a>
    </div>
    <p>Under the hood, Cursor is powered by Workers, Durable Objects, OpenAI, and the Cloudflare developer docs. It uses the same backend that we’re using to power our ChatGPT Docs plugin, and you can read about that <a href="/cloudflare-chatgpt-plugins/">here</a>.</p><p>It uses the <a href="https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb">“Search-Ask” method</a>, stay tuned for more details on how you can build your own.</p>
    <div>
      <h2>A sneak peek into the future</h2>
      <a href="#a-sneak-peek-into-the-future">
        
      </a>
    </div>
    <p>We’re already thinking about the future, we wanted to give you a small preview of what we think this might look like here:</p><div></div>
<p></p><p>With this type of interface, developers could use a UI to have an AI generate code and developers then link that code together visually. Whether that’s with other code generated by the AI or code they’ve written themselves. We’ll be continuing to explore interfaces that we hope to help you all build more efficiently and can’t wait to get these new interfaces in your hands.</p>
    <div>
      <h2>We need your help</h2>
      <a href="#we-need-your-help">
        
      </a>
    </div>
    <p>Our hope is to quickly update and iterate on how Cursor works as developers around the world use it. As you’re using it to explore our documentation, <a href="http://discord.cloudflare.com/">join us on Discord</a> to let us know your experience.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[ChatGPT]]></category>
            <category><![CDATA[OpenAI]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">3ddhB1ezlTOGPv7Dd6uOsR</guid>
            <dc:creator>Ricky Robinett</dc:creator>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing D1: our first SQL database]]></title>
            <link>https://blog.cloudflare.com/introducing-d1/</link>
            <pubDate>Wed, 11 May 2022 13:02:00 GMT</pubDate>
            <description><![CDATA[ Today, we’re excited to announce D1, Cloudflare’s first SQL database, designed for Cloudflare Workers ]]></description>
            <content:encoded><![CDATA[ <p></p><p>We <a href="/introducing-cloudflare-workers/">announced</a> Cloudflare Workers in 2017, giving developers access to compute on our network. We were excited about the possibilities this unlocked, but we quickly realized — most real world applications are stateful. Since then, we’ve delivered <a href="https://www.cloudflare.com/developer-platform/workers-kv/">KV</a>, <a href="https://www.cloudflare.com/developer-platform/durable-objects/">Durable Objects</a>, and <a href="https://www.cloudflare.com/developer-platform/r2/">R2</a>, giving developers access to various types of storage.</p><p>Today, we're excited to announce D1, our first SQL database.</p><p>While the wait on beta access shouldn’t be long — we’ll start letting folks in as early as June (<a href="https://www.cloudflare.com/lp/d1/">sign up here</a>), we’re excited to share some details of what’s to come.</p>
    <div>
      <h2>Meet D1, the database designed for Cloudflare Workers</h2>
      <a href="#meet-d1-the-database-designed-for-cloudflare-workers">
        
      </a>
    </div>
    <p>D1 is built on SQLite. Not only is SQLite the most ubiquitous database in the world, used by billions of devices a day, it’s also the <a href="https://www.cloudflare.com/developer-platform/products/d1/">first ever serverless database</a>. Surprised? SQLite was so ahead of its time, it dubbed itself “<a href="https://www.cloudflare.com/learning/serverless/what-is-serverless/">serverless</a>” before the term gained connotation with cloud services, and originally meant literally “not involving a server”.</p><p>Since Workers itself runs between the server and the client, and was inspired by technology built for the client, SQLite seemed like the perfect fit for our first entry into databases.</p><p>So what can you build with D1? The true answer is “almost anything!”, that might not be very helpful in triggering the imagination, so how about a live demo?</p>
    <div>
      <h2>D1 Demo: Northwind Traders</h2>
      <a href="#d1-demo-northwind-traders">
        
      </a>
    </div>
    <p>You can check out an example of D1 in action by trying out our demo running here: <a href="https://northwind.d1sql.com/">northwind.d1sql.com</a>.</p><p>If you’re wondering “Who are Northwind Traders?”, Northwind Traders is the “Hello, World!” of databases, if you will. A sample database that Microsoft would provide alongside Microsoft Access to use as their own tutorial. It first appeared 25 years ago in 1997, and you’ll find many examples of its use on the Internet.</p><p>It’s a typical business application, with a realistic schema, with many foreign keys, across many different tables — a truly timeless representation of data.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6rze39GwPcbi7rkFaoKTi4/e189b105a6ba5088fb3fb062e86c45e5/image3-13.png" />
            
            </figure><p>When was the recent order of Queso Cabrales shipped, and what ship was it on? You can quickly find out. Someone calling in about ordering some Chai? Good thing Exotic Liquids still has 39 units in stock, for just \$18 each.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ytvt3wgKWXkTkp8aMDMDx/851f1b0333a820328663807c418e5f33/image2-14.png" />
            
            </figure><p>We welcome you to play and poke around, and answer any questions you have about Northwind Trading’s business.</p><p>The Northwind Traders demo also features a dashboard where you can find details and metrics about the D1 SQL queries happening behind the scenes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7r5YpPnZLYMbqwJDW5v38Y/d1714df833387bfc5cacd3e6caa97913/image5-5.png" />
            
            </figure>
    <div>
      <h2>What can you build with D1?</h2>
      <a href="#what-can-you-build-with-d1">
        
      </a>
    </div>
    <p>Going back to our original question before the demo, however, what can you build with D1?</p><p>While you may not be running Northwind Traders yourself, you’re likely running a very similar piece of software somewhere. Even at the very core of Cloudflare’s service is a database. A SQL database filled with tables, materialized views and a plethora of stored procedures. Every time a customer interacts with our dashboard they end up changing state in that database.</p><p>The reality is that databases are everywhere. They are inside the web browser you’re reading this on, inside every app on your phone, and the storage for your bank transaction, travel reservations, business applications, and on and on. Our goal with D1 is to help you build anything from APIs to rich and powerful applications, including <a href="https://www.cloudflare.com/ecommerce/">eCommerce sites</a>, accounting software, <a href="https://www.cloudflare.com/saas/">SaaS solutions</a>, and CRMs.</p><p>You can even combine D1 with <a href="https://www.cloudflare.com/zero-trust/products/access/">Cloudflare Access</a> and create internal dashboards and admin tools that are securely locked to only the people in your organization. The world, truly, is your oyster.</p>
    <div>
      <h2>The D1 developer experience</h2>
      <a href="#the-d1-developer-experience">
        
      </a>
    </div>
    <p>We’ll talk about the capabilities, and upcoming features further down in the post, but at the core of it, the strength of D1 is the developer experience: allowing you to go from nothing to a full stack application in an instant. Think back to a tool you’ve used that made development feel magical — that’s exactly what we want developing with Workers and D1 to feel like.</p><p>To give you a sense of it, here’s what getting started with D1 will look like.</p>
    <div>
      <h3>Creating your first D1 database</h3>
      <a href="#creating-your-first-d1-database">
        
      </a>
    </div>
    <p>With D1, you will be able to create a database, in just a few clicks — define the tables, insert or upload some data, no need to memorize any commands unless you need to.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2T8rfy6OTt9UbegCxnLFWD/999f52d4fe1c0e4765acf72e62dc9390/image4-10.png" />
            
            </figure><p>Of course, if the command-line is your jam, earlier this week, we announced <a href="/10-things-i-love-about-wrangler/">the new and improved Wrangler 2</a>, the best tool for wrangling and deploying your Workers, and soon also your tool for deploying D1. Wrangler will also come with native D1 support, so you can create &amp; manage databases with a few simple commands:</p><div></div>
<p></p>
    <div>
      <h3>Accessing D1 from your Worker</h3>
      <a href="#accessing-d1-from-your-worker">
        
      </a>
    </div>
    <p>Attaching D1 to your Worker is as easy as creating a new binding. Each D1 database that you attach to your Worker gets attached with its own binding on the <code>env</code> parameter:</p>
            <pre><code>export default {
  async fetch(request, env, ctx) {
    const { pathname } = new URL(request.url)
    if (pathname === '/num-products') {
      const { result } = await env.DB.get(`SELECT count(*) AS num_products FROM Product;`)
      return new Response(`There are ${result.num_products} products in the D1 database!`)
    }
  }
}</code></pre>
            <p>Or, for a slightly more complex example, you can safely pass parameters from the URL to the database using a Router and parameterised queries:</p>
            <pre><code>import { Router } from 'itty-router';
const router = Router();

router.get('/product/:id', async ({ params }, env) =&gt; {
  const { result } = await env.DB.get(
    `SELECT * FROM Product WHERE ID = $id;`,
    { $id: params.id }
  )
  return new Response(JSON.stringify(result), {
    headers: {
      'content-type': 'application/json'
    }
  })
})

export default {
  fetch: router.handle,
}</code></pre>
            
    <div>
      <h2>So what can you expect from D1?</h2>
      <a href="#so-what-can-you-expect-from-d1">
        
      </a>
    </div>
    <p>First and foremost, we want you to be able to develop with D1, without having to worry about cost.</p><p>At Cloudflare, we don’t believe in keeping your data hostage, so D1, like R2, will be free of egress charges. Our plan is to price D1 like we price our storage products by charging for the base storage plus database operations performed.</p><p>But, again, we don’t want our customers worrying about the cost or what happens if their business takes off, and they need more storage or have more activity. We want you to be able to build applications as simple or complex as you can dream up. We will ensure that D1 costs less and performs better than comparable centralized solutions. The promise of serverless and a global network like Cloudflare’s is <a href="https://www.cloudflare.com/learning/performance/speed-up-a-website/">performance</a> and <a href="https://www.cloudflare.com/plans/">lower cost</a> driven by our architecture.</p><p>Here’s a small preview of the features in D1.</p>
    <div>
      <h3>Read replication</h3>
      <a href="#read-replication">
        
      </a>
    </div>
    <p>With D1, we want to make it easy to store your whole application's state in the one place, so you can perform arbitrary queries across the full data set. That’s what makes relational databases so powerful.</p><p>However, we don’t think powerful should be synonymous with cumbersome. Most relational databases are huge, monolithic things and configuring replication isn't trivial, so in general, most systems are designed so that all reads and writes flow back to a single instance. D1 takes a different approach.</p><p>With D1, we want to take configuration off your hands, and take advantage of Cloudflare's global network. D1 will create read-only clones of your data, close to where your users are, and constantly keep them up-to-date with changes.</p>
    <div>
      <h3>Batching</h3>
      <a href="#batching">
        
      </a>
    </div>
    <p>Many operations in an application don't just generate a single query. If your logic is running in a Worker near your user, but each of these queries needs to execute on the database, then sending them across the wire one-by-one is extremely inefficient.</p><p>D1’s API includes batching: anywhere you can send a single SQL statement you can also provide an array of them, meaning you only need a single HTTP round-trip to perform multiple operations. This is perfect for transactions that need to execute and commit atomically:</p>
            <pre><code>async function recordPurchase(userId, productId, amount) { 
  const result = await env.DB.exec([
    [
      `UPDATE users SET balance = balance - $amount WHERE user_id = $user_id`,
      { $amount: amount, $user_id: userId },
    ],
    [
      'UPDATE product SET total_sales = total_sales + $amount WHERE product_id = $product_id',
      { $amount: amount, $product_id: productId },
    ],
  ])
  return result
}</code></pre>
            
    <div>
      <h3>Embedded compute</h3>
      <a href="#embedded-compute">
        
      </a>
    </div>
    <p>But we're going further. With D1, it will be possible to define a chunk of your Worker code that runs directly next to the database, giving you total control and maximum performance—each request first hits your Worker near your users, but depending on the operation, can hand off to another Worker deployed alongside a replica or your primary D1 instance to complete its work.</p>
    <div>
      <h3>Backups and redundancy</h3>
      <a href="#backups-and-redundancy">
        
      </a>
    </div>
    <p>There are few things as critical as the data stored in your main application's database, so D1 will automatically save snapshots of your database to Cloudflare's cloud storage service, R2, at regular intervals, with a one-click restoration process. And, since we're building on the redundant storage of Durable Objects, your database can physically move locations as needed, resulting in self-healing from even the most catastrophic problems in seconds.</p>
    <div>
      <h3>Importing and exporting data</h3>
      <a href="#importing-and-exporting-data">
        
      </a>
    </div>
    <p>While D1 already supports the SQLite API, making it easy for you to write your queries, you might also need data to run them on. If you’re not creating a brand-new application, you may want to import an existing dataset from another source or database, which is why we’ll be working on allowing you to bring your own data to D1.</p><p>Likewise, one of SQLite’s advantages is its portability. If your application has a dedicated staging environment, say, you’ll be able to clone a snapshot of that data down to your local machine to develop against. And we’ll be adding more flexibility, such as the ability to create a new database with a set of test data for each new pull request on your Pages project.</p>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>This wouldn’t be a Cloudflare announcement if we didn’t conclude on “we’re just getting started!” — and it’s true! We are really excited about all the powerful possibilities our database on our global network opens up.</p><p>Are you already thinking about what you’re going to build with D1 and Workers? Same. <a href="https://www.cloudflare.com/lp/d1/">Give us your details</a>, and we’ll give you access as soon as we can — look out for a beta invite from us starting as early as June 2022!</p><p>If you want to read more, refer to our <a href="https://developers.cloudflare.com/d1/">documentation</a>.</p><p>
</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developers]]></category>
            <guid isPermaLink="false">354OnvEDxBcSZ40eSlALjt</guid>
            <dc:creator>Rita Kozlov</dc:creator>
            <dc:creator>Glen Maddern</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing Workers for Platforms: making every application on the Internet more programmable]]></title>
            <link>https://blog.cloudflare.com/workers-for-platforms/</link>
            <pubDate>Tue, 10 May 2022 13:01:20 GMT</pubDate>
            <description><![CDATA[ Announcing Workers for Platforms, our tool suite to help make any product programmable, and help our customers deliver value to their customers and developers instantaneously ]]></description>
            <content:encoded><![CDATA[ <p></p><p>As a business, whether a startup or Fortune 500 company, your number one priority is to make your customers happy and successful with your product. To your customers, however, success and happiness sometimes seems to be just one feature away.</p><p>“<i>If only you could customize X, we’ll be able to use your product” -</i> the largest prospect in your pipeline. <i>“If you just let us do Y,  we’ll expand our usage of your product by 10x”</i> - your most strategic existing customer.</p><p>You want your product to be everything to everybody, but engineering can only keep up so quickly, so, what gives?</p><p>Today, we’re announcing Workers for Platforms, our tool suite to help make any product programmable, and help our customers deliver value to their customers and developers instantaneously.</p>
    <div>
      <h2>A more programmable interface</h2>
      <a href="#a-more-programmable-interface">
        
      </a>
    </div>
    <p>One way to give your customers the ability to programmatically interact with your product is by providing them with <a href="https://www.cloudflare.com/learning/security/api/what-is-an-api/">APIs</a>. That is a big part of why APIs are so prolific today — enabling code (whether your own, or that of a 3rd party) to engage with your applications is nothing short of revolutionary.</p><p>But there’s still a problem. While APIs can give developers the ability to interact with your application programmatically, developers are ultimately always limited by the abstractions exposed to them by the API. You, an application owner, have to have predicted how the customer would use your product, and then built out the API to support the use case. If there’s one thing I have learned as a product manager, it’s almost impossible to predict how customers will use a product. And if there’s a second thing I’ve learned, it’s that even with plentiful engineering resources, it’s also almost impossible to build all the functionality required to keep said customers happy.</p><p>There is another way, however.</p><p>Functions, in contrast to APIs, provide the lowest level primitives (rather than abstractions on top of them). This lets the developer define the right behavior from there — and they can even define their own APIs on top.</p><p>In this sense, functions and APIs are actually complementary to each other — you may even choose to call another API directly from your function. For example, if you’re handling an event in a messaging system, you could implement your own feature to send an email by calling an email API, or create a ticket in your ticketing system, etc.</p><p>This gets at why we’re so excited about Workers for Platforms: it enables you to expose a direct way for your customers’ developers to bring their own logic to any application. We think it’s going to unlock a wave of customer-led innovation on top of companies that adopt it, and has the potential to be as impactful to building applications on the web as the API has been.</p>
    <div>
      <h2>A better experience for developers</h2>
      <a href="#a-better-experience-for-developers">
        
      </a>
    </div>
    <p>While Workers for Platforms expose a more powerful paradigm for making product programmable, they also result in a better experience for you as a developer.</p><p>Today, as a developer, before you can even get started using APIs or webhooks, there’s a list of tedious tasks you have to deal with first. First, you have to set up somewhere to <a href="https://www.cloudflare.com/developer-platform/solutions/hosting/">host your code</a>, whether a server (or serverless function), and expose it via an external endpoint to be able. You have to deal with ops, custom tokens, figuring out the new authentication schema, all before you get started. Then you have to maintain that service, and make sure that it stays up to ensure that events are always processed properly.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1cMmVDyn9JeB7YExynaLUG/7b07d87d868c630f9aaacf027235f616/image3-6.png" />
            
            </figure><p>With functions embedded directly into the products you’re using, you can <i>just start writing the code</i>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/47rMDpKoKsLR9r63MT0Yuu/e82ef46b8331fe346d0ee0d56fc8898d/image1-14.png" />
            
            </figure>
    <div>
      <h2>Why hasn’t this model been embraced until now?</h2>
      <a href="#why-hasnt-this-model-been-embraced-until-now">
        
      </a>
    </div>
    <p>Allowing developers to program how events work seems obvious, but just because it’s obvious doesn’t mean it’s easy.</p><p>At Cloudflare, we encountered this very problem five years ago — we were onboarding larger and larger customers onto our network, each needing to dictate the fate of a request in their own way. While <a href="https://www.cloudflare.com/features-page-rules/">Page Rules</a> offered a way to modify behavior by URL, customers wanted to control behavior based on cookie, header, geolocation, and more!</p><p>We realized our engineering team couldn’t keep up with every request, so we decided to allow customers to bend our product to their own needs.</p><p>As we looked for an approach to this problem, we looked for a solution that would meet the two following requirements:</p><ol><li><p>Performance requirement: it’s unacceptable for a CDN, which should make your site faster to introduce latency. How do we make this so fast you don’t even notice it’s there?</p></li><li><p>Security requirement: how do we run untrusted code securely?</p></li></ol><p>While these requirements are especially critical when you offer performance and security products, solving these challenges is critical when giving your customers the ability to program your product. If the function needs to run on the critical path to your user, introducing latency is equally unacceptable. And of course, no one wants to get breached just to have their users be able to program.</p><p>Creating a really fast and secure multi-tenant environment is no easy feat.</p><p>When we evaluated our options for solving this problem, we first turned to technologies that existed for solving this problem on the server — serverless functions already existed at time, but were powered by containers, which would introduce cold-start, which was, well, a non-starter. So we <a href="/workers-open-source-announcement/">turned to the browser</a>, or specifically Chrome, which was powered by V8, and decided to take the same approach, and run it on our servers.</p><p>And while the approach sounds simple (and perhaps in retrospect obvious, as these things tend to seem), running a large multi-tenant development platform at scale is no small effort. If a part of the purpose of allowing customers to program your offering is to free up engineering efforts to focus on building new features, the effort it takes to maintain and scale such a development platform may defeat the purpose.</p><p>What we realized recently was that we weren’t alone in trying to solve this problem.</p><p>Companies like Shopify, building their next generation programmable storefront, Oxygen, were trying to solve the same thing. They wanted to enable their customers to run custom storefronts, and be able to offer the <a href="https://www.cloudflare.com/solutions/ecommerce/optimization/">best performance possible</a>, while maintaining a secure, multi-tenant environment.</p><blockquote><p>“Shopify is the Internet’s commerce infrastructure, with millions of merchants using the platform,” said Zach Koch, product director, custom storefronts, at Shopify. “Partnering with Cloudflare, we’re able to give developers the tools they need to build unique and performant storefronts. We are excited to work with Cloudflare to alleviate some complexities of building commerce experiences – like scalability and global availability – so that developers can instead focus on what makes their brand distinct.”</p></blockquote>
    <div>
      <h2>How can you build your next platform on Workers for Platforms?</h2>
      <a href="#how-can-you-build-your-next-platform-on-workers-for-platforms">
        
      </a>
    </div>
    <p>Working with platforms like Shopify to help them address their developers’ needs, helped us realize another thing — developer experience is not one-size-fits-all. That is, while we’re building our platform for a broad set of developers, <a href="https://www.cloudflare.com/ecommerce/">eCommerce developers</a> might have a much more specialized set of needs, best solved by a tailored developer experience. And, while the underlying technology is the same, making platforms their experiences using the same high level concepts as our direct customers need doesn’t make sense.</p><p>Since no one knows your customers better than you, we want you, the platform provider,  to design the best experience for your users. Workers for Platforms exposes a new set of tools and APIs to integrate directly into the deployment flow you want to design (see what we did there?).</p>
    <div>
      <h3>Tags API to manage your functions at scale</h3>
      <a href="#tags-api-to-manage-your-functions-at-scale">
        
      </a>
    </div>
    <p>Using our APIs, whenever a developer wants to deploy a script on your platform, you can call our APIs to deploy a new Worker in the background. Unlike our traditional Workers offering, Workers for Platforms is designed to be used at scale, to manage hundreds of thousands to millions of Cloudflare Workers.</p><p>Depending on how you manage your deployment services, or users, we now also provide the option to use tags to manage groupings of scripts. For example, if a user deletes their account, and you would like to make sure all their Workers are cleaned up. With tags, you can now add any arbitrary tags (such as user ID) per script, to enable bulk actions.</p>
    <div>
      <h3>Trace Workers</h3>
      <a href="#trace-workers">
        
      </a>
    </div>
    <p>Where there’s smoke, there’s fire, and where there’s code, well, bugs are also bound to be. When giving developers the tools to write and deploy code, you must also give them the means to debug it.</p><p>Trace Workers allow you to collect any information about a request that was handled by a Worker, including any logs or exceptions, and pass them onto your customer. A Trace Worker is a Worker that will receive information about the execution of other Workers, and can forward it to a destination of your choosing, enabling use cases such as live logging or long term storage.</p><p>Here is a simple trace Worker that sends its trace data to an HTTP endpoint:</p>
            <pre><code>addEventListener("trace", event =&gt; {
  event.waitUntil(fetch("http://example.com/trace", {
    method: "POST",
    body: JSON.stringify(event.traces),
  }))
})</code></pre>
            <p>Here is an example of what the data in <code>event.traces</code> might look like:</p>
            <pre><code>[
  {
    "scriptName": "Example script",
    "outcome": "exception",
    "eventTimestamp": 1587058642005,
    "event": {
      "request": {
        "url": "https://example.com/some/requested/url",
        "method": "GET",
        "headers": [
          "cf-ray": "57d55f210d7b95f3",
          "x-custom-header-name": "my-header-value"
        ],
        "cf": {
          "colo": "SJC"
        }
      },
    },
    "logs": [
      {
        "message": ["string passed to console.log()"],
        "level": "log",
        "timestamp": 1587058642005
      }
    ],
    "exceptions": [
      {
        "name": "Error",
        "message": "Threw a sample exception",
        "timestamp": 1587058642005
      }
    ]
  }
]</code></pre>
            
    <div>
      <h3>Chaining multiple Workers together using Dynamic Dispatch</h3>
      <a href="#chaining-multiple-workers-together-using-dynamic-dispatch">
        
      </a>
    </div>
    <p>From working with a few of our early customers, another need we were hearing about often was the ability to run your own code, before running your customer’s code. Perhaps you want to run a layer of authentication, sanitize input or output, or even provide useful information downstream (like user or account IDs).</p><p>For this you may want to maintain your own Worker. However, when it’s done executing, you want to be able to call the next Worker, with your <i>customer’s</i> code.</p><p>Example:</p>
            <pre><code>let user_worker = dispatcher.get('customer-worker-123');
let response = await user_worker.fetch(request);</code></pre>
            
    <div>
      <h3>Custom domains, and more!</h3>
      <a href="#custom-domains-and-more">
        
      </a>
    </div>
    <p>The features above are only the new Workers features we enabled for our customers as of this week, but our goal is to provide all the tools you need to build your platform. For example, you can use Workers for Platforms with <a href="https://developers.cloudflare.com/ssl/ssl-for-saas/">Cloudflare for SaaS to create custom domains</a>. (And stay tuned for the “and more!”).</p>
    <div>
      <h2>How do I get access?</h2>
      <a href="#how-do-i-get-access">
        
      </a>
    </div>
    <p>As is the case with any new product we release, we have no doubt we have so much to learn from our customers and their use cases. Since we want to support you, and make sure you’re set up for success, if you’re interested, we’d love to get to know you and your use case, and get you set up with all the tools you need. To get started, we ask that you <a href="https://www.cloudflare.com/lp/workers-for-platforms">fill out our form</a>, and we’ll  get in touch with you.</p><p>In the meantime, you’re welcome to get started checking out our developer docs, or saying hi in our Discord.</p>
    <div>
      <h2>Just getting started</h2>
      <a href="#just-getting-started">
        
      </a>
    </div>
    <p>We faced this problem ourselves five years ago — we needed to give our customers the ability to augment our offering in a way that worked for them, so we did just that when we launched <a href="https://workers.cloudflare.com/">Cloudflare Workers</a>. Allowing our customers to program our global network to meet their needs has enabled us to support more customers on our development platform, while enabling our engineering team to focus on turning the most requested customizations into features.</p><p>We look forward to seeing both what your developers build on your platform (and we believe you, yourself will be surprised with the use cases developers come up with that you could never dream up yourself), and what your engineering team is able to tackle in parallel!</p> ]]></content:encoded>
            <category><![CDATA[Platform Week]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">IldPuoujYfAYTbegJAJGJ</guid>
            <dc:creator>Rita Kozlov</dc:creator>
        </item>
    </channel>
</rss>