Latent Space
March 19, 2025

npm install Agents — with Sunil Pai and Rita Kozlov (VP AI) of Cloudflare

Sunil Pai, Developer Products Lead at Cloudflare, and Rita Kozlov, VP of AI at Cloudflare, join Latent Space to discuss Cloudflare's new Agents product, built on their Durable Objects technology. This platform aims to empower developers to easily build and deploy AI agents at scale.

Cloudflare Agents and Durable Objects

  • "Durable objects have been around in Cloudflare for about 4 years now, and I think they are the world’s first implementation of the actor model in infrastructure. These little instances of compute…that scales horizontally across the planet is the perfect little container for running your agents in."
  • "The moment we figured it out last year was like a lightning bolt for us. It’s not really locked out, but like we have magically created the perfect infrastructure for running these things."
  • Cloudflare Agents leverages Durable Objects, a serverless platform based on the actor model, to offer a scalable and efficient environment for running AI agents.
  • Durable Objects provide isolated containers for agents, allowing for stateful, long-running processes and horizontal scaling.
  • The platform offers integrations with various communication channels, including HTTP, WebSockets, and email, with plans to incorporate audio and video.

The Rise of AI Agents and Their Challenges

  • "I feel like the hello world of LLMs is RAG, right? Like everyone has built a RAG at this point. And we're at this interesting kind of uncanny valley with agents where we don’t…trust it enough to do…‘I’ll give it the keys to the car and I’m fine with it running off and doing'."
  • "How do we get this into the hands of normies…like how do we get the hospitality industry to use this…and not in 10 years but in like within the next 6 to 9 months? Because that's where the real application…starts affecting the economy."
  • While Large Language Models (LLMs) have become commonplace, AI agents present new challenges, particularly regarding trust and practical applications.
  • The podcast emphasizes the need for agents to move beyond simple tasks and into real-world scenarios, like business process automation.
  • A focus is placed on making agents accessible to non-technical users and integrating them into existing industries.

Key Features and Future Directions

  • "Every time a chat message comes in…it takes tool calls, does stream text…and returns it."
  • "We have scheduling support built into all our agents…you can even give it…patterns…‘every Friday evening remind me to call my mom'."
  • Cloudflare Agents provides built-in features like tool calling, streaming text generation, and scheduling capabilities.
  • The platform supports human-in-the-loop interactions for tasks requiring confirmation or oversight.
  • Future development will focus on observability for tracking agent states, multi-agent communication, and enhanced workflow capabilities.

Key Takeaways:

  • Cloudflare is leveraging its existing Durable Objects technology to create a compelling platform for developing and deploying AI agents.
  • The future of AI agents hinges on solving challenges related to trust, practical applications, and accessibility for non-technical users.
  • Cloudflare Agents is poised to address these challenges by offering a robust, scalable platform with features like human-in-the-loop, scheduling, and future support for multi-agent communication and enhanced workflows.

For further insights, watch the podcast here: Link

This episode explores Cloudflare's new AI Agents platform, revealing how durable objects provide a uniquely powerful infrastructure for running agents at scale, and what this means for the future of AI-driven applications.

Cloudflare's AI Agents: Leveraging Durable Objects

  • Rita, leading developer products, and Nevil, with a background in startups and deep Cloudflare experience, discuss the launch of Cloudflare's AI Agents. Nevil highlights his early engagement with Cloudflare, sparked by his interest in durable objects, which eventually led him to join the company.
  • The core concept revolves around using Cloudflare's Durable Objects, the world's first infrastructure implementation of the actor model, as the foundation for running AI agents. Durable Objects, introduced four years ago, are described as small, rapidly deployable instances of compute that scale horizontally, making them ideal containers for agents.
  • Nevil emphasizes that this approach allows developers to bring their own code (from frameworks like LangChain or aisk) and run millions of coordinated agents, accessible via HTTP, websockets, email, and soon, audio/video.
  • Rita adds that agents are essentially LLMs combined with workflows, coordination, and external services. Durable Objects provide the tight coupling of compute and state needed for agents to execute plans and communicate effectively, even in case of failures.
  • “The moment we figured it out last year was like a lightening bolt for us...we have magically created the perfect infrastructure for running these things.” - Rita, on the realization of Durable Objects' potential for agents.

Origin Story and Development Approach

  • The initiative to create a dedicated Agents SDK stemmed from recognizing that people were already building agent platforms on Cloudflare. Nevil, a long-time advocate for Durable Objects, had envisioned agent applications years ago.
  • The team considered various approaches, including a no-code platform or a competing library, but ultimately decided to build in public, starting with a basic version developed by Nevil. This approach aligns with Cloudflare's culture of early shipping and gathering feedback.
  • Rita explains that they aimed to avoid cluttering the ecosystem with another heavy-handed framework, focusing instead on leveraging the existing "right underlying primitives" of Durable Objects.

Code Demonstration and Agent Functionality

  • Nevil provides a code walkthrough, showcasing the Cloudflare Agents starter kit, which includes a React-based frontend and a sample chat agent. The starter kit simplifies setup with a single command-line execution.
  • The demonstration highlights key features:
    • Tool Calls: Agents can interact with external tools (e.g., fetching the date).
    • Human-in-the-Loop: Agents can request human confirmation for actions (e.g., weather queries), with persistent state even if the user closes the browser.
    • Scheduling: Agents can schedule tasks using natural language or cron patterns (e.g., "remind me to call my mom every Friday evening").
    • Multimodal Potential: Future plans include email support, allowing agents to interact with users even when they're offline.
  • The demo emphasizes the advantage of Durable Objects: agents run in the background, independent of any open requests, ensuring persistence and responsiveness.

Agent Abstractions and the "Hello World" Challenge

  • Rita and the hosts discuss the lack of a universally accepted "hello world" example for agents, unlike RAG (Retrieval-Augmented Generation) for LLMs. This reflects the current "uncanny valley" of agent development, where trust and control are key challenges.
  • The conversation touches on the need for escalating authority and deferring to authority in agent systems, as well as the ongoing exploration of ideal abstractions for agent development.
  • Nevil mentions his efforts to demystify the actor model and its application to AI agents through his blog, focusing on the "boring parts" often overlooked in high-level discussions.

Local-First Development and Cloudflare's Perspective

  • The discussion shifts to the "local-first" development movement, which prioritizes writing to a local database copy before syncing to the cloud.
  • Nevil argues that Cloudflare's infrastructure, particularly Durable Objects, somewhat mitigates the need for a strictly local-first approach. Durable Objects can act as local-first clients, syncing data from multiple sources and providing near-instant updates, even when the user is offline.
  • Rita adds that Cloudflare's model offers a "best of both worlds" approach, bringing data and compute close to the user, simplifying the development of local-first applications.

Future Focus: Observability and "Normie" Adoption

  • Rita highlights observability as a critical next challenge for agent platforms. Tracking the state and performance of thousands or millions of agents is a complex problem that Cloudflare is actively addressing.
  • Nevil emphasizes the goal of making agent technology accessible to "normies," particularly in industries like hospitality and government services. This involves simplifying the development process and focusing on practical business automation use cases.
  • The conversation touches on the potential of MCP (presumably "Model-Chain-Prompt," though not explicitly defined) to make agents more accessible, despite the technical-sounding name.

Customer Feedback and Agent Maturity

  • The hosts express interest in hearing how Cloudflare customers are using the new Agents platform.
  • The discussion acknowledges that agent technology is still in its early stages, with a spectrum of agent capabilities rather than a binary definition.
  • The hosts and guests agree that making agent development easier is crucial, and Cloudflare's infrastructure provides a strong foundation for this.

Event Bus, Orchestration, and Multi-Agent Systems

  • Nevil mentions the concept of an "event bus" as a central element for building reactive agent systems, going beyond simple cron-based scheduling.
  • The conversation touches on orchestration (fan-in/fan-out patterns) and the desire to implement the six patterns of multi-agent systems recently outlined in a LangChain paper.
  • The potential for agent-to-agent communication is also discussed, aligning with ongoing research in multi-agent systems.

Cloudflare's Developer Week and Future Announcements

  • Rita announces Cloudflare's upcoming Developer Week (in five weeks), a major event for product announcements.
  • Recent announcements are highlighted, including:
    • Agents framework
    • Guardrails for AI Gateway (similar to LGuard)
    • A direct REST API for browser rendering (previously available only through Workers)
  • The browser rendering API is particularly relevant to agent development, allowing agents to interact with websites in a way that mimics human users.

Bot Detection, Agent Authentication, and the Future of Containers

  • The discussion turns to the challenge of bot detection and agent authentication. Cloudflare is actively researching how to authorize agents to act on behalf of humans while maintaining security and preventing abuse.
  • The hosts and guests debate whether this problem is fundamentally solvable, given the ability to spoof user agents and IP addresses.
  • The concept of "agent shadow" API keys is introduced, suggesting a way to manage agent access with specific restrictions and rate limits.
  • The conversation concludes with a teaser about Durable Objects enabling containers, hinting at a future where long-running and CPU-intensive workloads can be handled more effectively within the Cloudflare ecosystem.

Cloudflare's AI Agents platform, built on Durable Objects, offers a compelling vision for the future of agent development. The ability to run agents at scale, close to the user, with built-in persistence and scheduling, opens up new possibilities for Crypto AI investors and researchers. The key takeaway is to closely monitor Cloudflare's evolving agent ecosystem, particularly the developments in observability, multi-agent systems, and the integration of containers, as these will shape the next wave of AI-powered applications.

Others You May Like