Skip to content

Cloudflare Agents

TrendingActive
cloudflare/agents

A framework for building intelligent, stateful AI agents that persist, think, and evolve at the edge of the network, leveraging Cloudflare's global infrastructure for real-time communication, memory persistence, and autonomous operation.

View on GitHub
Stars
5.8k
Forks
769
Watchers
5.8k
Open issues
149

Build and deploy intelligent AI agents at the edge of the network

Overview

Cloudflare Agents provides a comprehensive framework for developing AI agents that operate at the edge of the network. This framework enables building stateful agents that can maintain persistent memory, engage in real-time communication, and operate autonomously at global scale, all while efficiently hibernating when idle and awakening when needed.

Key Features

  • 🧩 Persistent State Management: Maintain agent memory and context across sessions
  • 🔄 Real-time WebSocket Communication: Enable fluid, stateful conversations
  • 🌐 Global Edge Deployment: Run agents close to users anywhere in the world
  • ⚡ Efficient Resource Usage: Hibernate when idle, wake instantly when needed
  • 🔌 Flexible Integration: HTTP endpoints, React hooks, and more
  • 🤖 AI-native Architecture: Built from the ground up for LLM-powered applications

Core Components

  • State Management: Persistent memory systems for agents
  • Communication Channels: WebSockets and HTTP endpoints
  • React Integration: Hooks for seamless frontend integration
  • Autonomous Processing: Independent agent execution
  • Global Distribution: Edge computing across Cloudflare’s network
  • Real-time Response: Instant reactions to user interactions

Usage Example

Create a new Cloudflare Agents project:

npm create cloudflare@latest -- --template cloudflare/agents-starter

Or add to an existing project:

npm install agents

Benefits for Developers

  1. Simplified Agent Development: Focus on agent logic, not infrastructure
  2. Enhanced User Experiences: Real-time, persistent interactions
  3. Global Performance: Edge deployment for minimal latency
  4. Scalable Architecture: Handles growth from prototype to production
  5. Flexible Deployment: Integrates with existing Cloudflare services

When to Use Cloudflare Agents

  • When building conversational AI applications that need memory
  • When deploying agents that require real-time communication
  • When creating autonomous AI systems that learn from interactions
  • When you need globally distributed agent deployment
  • When efficiency and hibernation capabilities are important

Development Status

The project is actively evolving, with core components like state management, WebSocket communication, and basic AI chat capabilities ready for use. Advanced features such as sophisticated memory systems, WebRTC for audio/video, email integration, and enhanced observability are in development.

Requirements

  • Basic understanding of JavaScript/TypeScript
  • Cloudflare account for deployment
  • Familiarity with AI concepts (for advanced usage)

License

MIT License

Similar open-source projects, ranked by shared categories and tags.

All AI projects →