# cloudflare/agents

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cloudflare-agents).**

3,466 stars · 389 forks · TypeScript · mit

## Links

- GitHub: https://github.com/cloudflare/agents
- Homepage: https://developers.cloudflare.com/agents/
- awesome-repositories: https://awesome-repositories.com/repository/cloudflare-agents.md

## Topics

`agents` `ai` `cloudflare` `durable-objects` `workflows`

## Description

This is an open-source framework for building stateful, durable AI agents that run on Cloudflare Workers. It provides a runtime for long-lived agents that maintain a persistent identity, local SQL storage, and real-time connections, utilizing a lifecycle where agents hibernate when idle and wake on demand.

The project distinguishes itself through its multi-channel orchestration, allowing a single agent to be deployed across voice, email, and chat interfaces with unified state. It implements the Model Context Protocol for standardized tool and data exchange and includes a dedicated framework for monetizing agent tools via the x402 micropayment protocol.

The system covers a broad range of capabilities, including browser automation for web page inspection, event-driven durable workflows with human-in-the-loop approvals, and bidirectional WebSocket communication for real-time state synchronization. It also features a secure TypeScript sandbox for executing generated code and distributed tracing for monitoring agent performance.

## Tags

### Artificial Intelligence & ML

- [Agentic AI Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-ai-frameworks.md) — An open-source framework for building stateful, durable AI agents on Cloudflare Workers with built-in storage and communication.
- [Stateful Agent Runtimes](https://awesome-repositories.com/f/artificial-intelligence-ml/stateful-agent-runtimes.md) — Provides a runtime for long-lived agents with persistent identity, local SQL storage, and efficient hibernation.
- [Agent State Persistence](https://awesome-repositories.com/f/artificial-intelligence-ml/agent-state-persistence.md) — Provides mechanisms to store and recover session data and SQL storage to ensure continuity across restarts. ([source](https://developers.cloudflare.com/agents/))
- [Durable Execution Runtimes](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/agent-runtimes/agent-execution-runtimes/durable-execution-runtimes.md) — Provides a runtime environment with durable identity and local state for recoverable execution. ([source](https://developers.cloudflare.com/agents/))
- [Model Context Protocol](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/model-context-protocol.md) — Implements the Model Context Protocol to connect AI models to local data sources and external tools. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [AI Agent State Coordination](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-state-coordination.md) — Builds AI agents that maintain long-term memory, persistent identity, and durable sessions.
- [Chat History APIs](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-history-apis.md) — Manages persistent conversational message logs and history to support resumable streaming sessions. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Model Context Protocol Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-context-protocol-implementations.md) — Implements the Model Context Protocol for standardized exchange of tools and data between agents and servers.
- [Durable Multi-Step Orchestrators](https://awesome-repositories.com/f/artificial-intelligence-ml/workflow-as-a-tool-exposure/durable-multi-step-orchestrators.md) — Orchestrates durable multi-step pipelines that persist state and pause for human approval.
- [Voice Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/conversational-voice-interaction/voice-agents.md) — Manages real-time voice interactions by integrating speech-to-text and text-to-speech capabilities into the agent. ([source](https://developers.cloudflare.com/agents/))
- [Browser Tooling](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/model-context-protocol/browser-tooling.md) — Makes browser APIs and DOM elements available as tools to AI agents via WebSocket. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Streaming Chat Responses](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-chat-clients/streaming-chat-responses.md) — Ships a streaming chat interface that delivers AI-generated text incrementally and supports human-in-the-loop approvals. ([source](https://developers.cloudflare.com/agents/))
- [AI-Powered Search](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-powered-search.md) — Provides AI-powered search tools to retrieve relevant information and improve agent responses. ([source](https://developers.cloudflare.com/agents/))
- [AI Tool Monetization](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-tool-monetization.md) — Implements a dedicated framework for monetizing agent tools via the x402 micropayment protocol.
- [Browser Automation Agents](https://awesome-repositories.com/f/artificial-intelligence-ml/browser-automation-agents.md) — Enables agents to inspect web pages and capture screenshots to perform automated actions. ([source](https://developers.cloudflare.com/agents/))
- [Conversational Voice Processing](https://awesome-repositories.com/f/artificial-intelligence-ml/conversational-voice-processing.md) — Captures speech and manages real-time transcription, synthesis, and conversational interruption handling. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Server-Side Execution Loops](https://awesome-repositories.com/f/artificial-intelligence-ml/tool-execution-loops/server-side-execution-loops.md) — Executes tool calls on the server side within a loop to maintain conversational flow. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### Data & Databases

- [Stateful Durable Objects](https://awesome-repositories.com/f/data-databases/object-storage/stateful-durable-objects.md) — Provides strongly consistent, serializable state using durable objects that hibernate when idle.
- [Strong Consistency Guarantees](https://awesome-repositories.com/f/data-databases/strong-consistency-guarantees.md) — Maintains strongly consistent and serializable data that persists across requests. ([source](https://developers.cloudflare.com/durable-objects/))
- [Durable Local Storage](https://awesome-repositories.com/f/data-databases/distributed-storage/sql-query-interfaces/durable-local-storage.md) — Runs SQL queries against durable storage for custom data retrieval and state access. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### Part of an Awesome List

- [Agent Planning and Coordination](https://awesome-repositories.com/f/awesome-lists/ai/agent-planning-and-coordination.md) — Manages the agent planning loop, including model calls, tool selection, and decision-making flows. ([source](https://developers.cloudflare.com/agents/))
- [Bidirectional Agent Streams](https://awesome-repositories.com/f/awesome-lists/devtools/websockets-and-real-time/bidirectional-agent-streams.md) — Establishes bidirectional WebSocket communication to stream agent output and state between clients and servers. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### DevOps & Infrastructure

- [Hibernation Cycles](https://awesome-repositories.com/f/devops-infrastructure/agent-lifecycle-management/hibernation-cycles.md) — Implements a lifecycle where agents hibernate when idle and wake on demand to support high workloads. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Durable Task Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/automation-orchestration/task-execution-frameworks/workflow-engines/durable-task-orchestrators.md) — Implements orchestration for multi-step tasks that persist state and support human-in-the-loop approvals. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Stateful Agent Hosting](https://awesome-repositories.com/f/devops-infrastructure/stateful-agent-hosting.md) — Provides infrastructure for hosting long-running AI agents that maintain their state across operations. ([source](https://developers.cloudflare.com/agents/))
- [Code Execution Sandboxes](https://awesome-repositories.com/f/devops-infrastructure/execution-environments/code-execution-runtimes/code-execution-sandboxes.md) — Runs generated TypeScript code inside an isolated sandbox with a virtual filesystem to prevent host side effects. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### Networking & Communication

- [Multi-Channel AI Deployments](https://awesome-repositories.com/f/networking-communication/conversational-channel-integrations/multi-channel-ai-deployments.md) — Deploys a single agent across web chat, voice, email, and messaging platforms with unified state.
- [Hibernating Connection Managers](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers/hibernating-connection-managers.md) — Hibernates inactive WebSocket connections to save resources and wakes them automatically when messages arrive. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Hierarchical Agent Routing](https://awesome-repositories.com/f/networking-communication/hierarchical-agent-routing.md) — Implements hierarchical agent routing to distribute tasks across agent teams using nested parent-child relationships. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Typed RPC Bridges](https://awesome-repositories.com/f/networking-communication/json-rpc-implementations/typed-rpc-bridges.md) — Provides a type-safe RPC bridge allowing clients to invoke agent logic as if it were local.
- [Real-Time Synchronization](https://awesome-repositories.com/f/networking-communication/real-time-synchronization.md) — Synchronizes state and events across multiple simultaneous client connections using persistent sockets. ([source](https://developers.cloudflare.com/durable-objects/))
- [Resumable Chat Sessions](https://awesome-repositories.com/f/networking-communication/sse-session-management/resumable-chat-sessions.md) — Restores streaming chat sessions with persistent history after a disconnection. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### Business & Productivity Software

- [AI Capability Monetization](https://awesome-repositories.com/f/business-productivity-software/ai-capability-monetization.md) — Provides a system for charging users per request for accessing specific AI agent tools and endpoints.
- [Micropayment Protocols](https://awesome-repositories.com/f/business-productivity-software/micropayment-protocols.md) — Implements a dedicated framework for monetizing agent tools via the x402 micropayment protocol. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Micropayment Protocol Implementations](https://awesome-repositories.com/f/business-productivity-software/online-payment-processing/request-based-payment-gating/micropayment-protocol-implementations.md) — Implements the x402 micropayment protocol to charge per-request fees for tool and endpoint invocation.

### Development Tools & Productivity

- [Cron Scheduling](https://awesome-repositories.com/f/development-tools-productivity/cron-scheduling.md) — Provides the ability to execute background tasks on a cron schedule. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Task Scheduling](https://awesome-repositories.com/f/development-tools-productivity/task-scheduling.md) — Enables triggering compute operations at specific times or recurring intervals using programmable alarms. ([source](https://developers.cloudflare.com/durable-objects/))

### Security & Cryptography

- [Code Sandboxing Environments](https://awesome-repositories.com/f/security-cryptography/application-and-system-security/sandbox-and-isolation/code-sandboxing-environments.md) — Executes generated TypeScript code within a secure, isolated sandbox featuring a virtual filesystem.

### Software Engineering & Architecture

- [State Change Broadcasting](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/reactive-subscription-systems/state-change-subscriptions/state-change-broadcasting.md) — Broadcasts state changes to all connected clients to maintain real-time consistency across the user interface. ([source](https://developers.cloudflare.com/durable-objects/))
- [Activity Tracing](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures/activity-tracing.md) — Emits structured logs and metrics to monitor and debug complex, multi-step agent activity. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [Remote Function Invocation](https://awesome-repositories.com/f/software-engineering-architecture/remote-function-invocation.md) — Exposes agent functions via a type-safe interface for remote execution across a network. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### System Administration & Monitoring

- [Agent Observability](https://awesome-repositories.com/f/system-administration-monitoring/agent-observability.md) — Uses distributed tracing and metrics to provide deep observability into autonomous agent decision-making and behavior. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))
- [AI Agent Execution Monitors](https://awesome-repositories.com/f/system-administration-monitoring/agent-performance-monitoring/ai-agent-execution-monitors.md) — Collects tracing, metrics, and structured logs to diagnose and monitor real-time agent activity. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### User Interface & Experience

- [UI State Synchronization](https://awesome-repositories.com/f/user-interface-experience/ui-state-synchronization.md) — Binds frontend components to agent state via hooks to ensure the UI stays current in real-time. ([source](https://cdn.jsdelivr.net/gh/cloudflare/agents@main/README.md))

### Web Development

- [WebSocket State Synchronization](https://awesome-repositories.com/f/web-development/state-syncing-reactivity/websocket-state-synchronization.md) — Broadcasts real-time state updates via WebSockets to maintain UI consistency across sessions.
