cloudflare-agents

Create stateful real-time agents on Cloudflare Workers with Durable Objects.

961|99|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-agents
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudflare-agents
Source: https://github.com/jezweb/claude-skills/tree/main/skills/cloudflare-agents
Command: npx skills add https://github.com/jezweb/claude-skills --skill cloudflare-agents

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agents, @modelcontextprotocol/sdk, @cloudflare/puppeteer, ai, @ai-sdk/openai, @ai-sdk/anthropic, and includes templates (resource) components.

What problem does it solve?

This Skill eliminates the complexity of building AI agents with persistent state, real-time communication, and scheduled tasks, letting you focus on your business logic.

Core Features & Use Cases

  • Stateful Agents: Create globally unique agent instances with built-in SQLite storage up to 1GB.
  • Real-time Communication: Enable bidirectional WebSocket connections for true real-time interaction.
  • Use Case: Imagine building a customer support chatbot that remembers each user's entire conversation history and can proactively notify them of updates.
  • Scheduled Tasks: Automate recurring jobs with cron expressions, delays, or specific dates.

Quick Start

Use the cloudflare-agents skill to create a basic AI agent with WebSocket support and persistent state management.

Frequently Asked Questions about cloudflare-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build stateful AI agents that persist data across requests?

Stateful AI agents use Cloudflare Durable Objects paired with SQLite storage to maintain agent state across requests. Each agent instance gets up to 1GB of persistent storage, enabling you to store conversation history, user context, and workflow state without external databases.

Can I use WebSockets and real-time communication with Cloudflare Workers?

Yes. Cloudflare Durable Objects support bidirectional WebSocket connections for real-time agent interaction. Combined with Server-Sent Events (SSE), you can build chat interfaces, live notifications, and event-driven workflows that communicate instantly with clients.

How do I schedule recurring tasks and delays in Cloudflare Workers?

Cloudflare's scheduling APIs let you set cron jobs, fixed delays, and specific date triggers directly on Durable Objects. This enables agents to execute background work like polling, cleanup, or proactive notifications without external task queues.

What's the best way to build multi-agent systems with coordination?

Cloudflare Agents SDK supports multi-agent coordination through Durable Objects that can communicate with each other. Use message passing and shared state patterns to orchestrate workflows, delegate tasks, and synchronize work across multiple agent instances.

Can I integrate Cloudflare agents with existing AI SDKs and MCP servers?

Yes. The SDK works with OpenAI, Anthropic, and Model Context Protocol servers. Bind these dependencies to your Worker to add language models and external tools, enabling agents to make decisions and take actions beyond local state management.

What are the limits when running agents on Cloudflare?

Per-agent SQLite storage maxes at 1GB, and Workers have CPU time limits per request. For long-running tasks, use scheduled APIs and delays. WebSocket connections rely on Cloudflare's infrastructure availability, so design agents to gracefully handle disconnects.