$npx skillfedfor your agent

building-ai-agent-on-cloudflare

This skill generates production-ready AI agents deployed to Cloudflare Workers using the Agents SDK. It handles persistent state management, real-time WebSocket communication, scheduled background tasks, and tool calling—everything needed for stateful, scalable agent applications.

Building AI Agent on Cloudflare lets you create stateful agents on Workers with persistent state and real-time communication.

AI-generated summary based on this skill's SKILL.md

0 0 Apache-2.0updated by null-shot

Decision gist · record as of 2026-01-18

Building AI Agent on Cloudflare lets you create stateful agents on Workers with persistent state and real-time communication. This skill generates production-ready AI agents deployed to Cloudflare Workers using the Agents SDK. It handles persistent state management, real-time WebSocket communication, scheduled background tasks, and tool calling—everything needed for stateful, scalable agent applications.

manual: git clone https://github.com/null-shot/cloudflare-skills → cp -r cloudflare-skills/building-ai-agent-on-cloudflare ~/.claude/skills/building-ai-agent-on-cloudflare
building-ai-agent-on-cloudflare/SKILL.md · version 7fa4865a

Use it when

  • The Cloudflare Agents SDK tutorial teaches best practices for building production agents on Workers.
  • Yes.

Verify before relying

Read SKILL.md below before installing (5 files). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

null-shot/cloudflare-skills/building-ai-agent-on-cloudflare · repository language: TypeScript

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I build an AI agent on Cloudflare?

Building AI agent on Cloudflare uses the Agents SDK to deploy stateful agents directly to Cloudflare Workers. The skill covers the full lifecycle: setting up your agent with the SDK, configuring persistent state via Durable Objects, integrating LLM calls, and deploying to production. You'll learn patterns for handling agent reasoning loops, managing tool calls, and scaling across Cloudflare's global network.

What does the Cloudflare Agents SDK tutorial cover?

The Cloudflare Agents SDK tutorial teaches best practices for building production agents on Workers. It includes SDK initialization, state persistence patterns, WebSocket setup for real-time communication, tool integration, scheduled task execution, and message history management. The tutorial emphasizes patterns that work at scale on Cloudflare's infrastructure.

Can I create a stateful chatbot with WebSocket support on Workers?

Yes. Building AI agent on Cloudflare supports creating real-time chat agents with WebSocket communication. The skill covers establishing persistent WebSocket connections, maintaining conversation state across messages, and routing tool calls asynchronously. Durable Objects provide the state layer, while Workers handle the compute and WebSocket protocol.

How does state management work for Cloudflare agents?

Building AI agent on Cloudflare uses Durable Objects for persistent state storage. Your agent maintains message history, conversation context, and tool execution state within a Durable Object instance. The skill teaches state initialization, updates during agent reasoning, and recovery patterns. This ensures your agent retains context across requests and client reconnections.

Can I schedule background tasks within an AI agent?

Yes. Building AI agent on Cloudflare includes patterns for scheduling background tasks and tool calls within your agent. You can queue long-running operations, retry failed tool calls, and execute scheduled maintenance tasks without blocking real-time interactions. The skill covers integration with Cloudflare's scheduling and queuing primitives.

What are the key patterns for deploying production agents on Workers?

Building AI agent on Cloudflare emphasizes production-ready patterns: error handling across tool calls, graceful state recovery, WebSocket reconnection logic, rate limiting, and observability. The skill teaches how to structure your agent code for reliability, scale message throughput, and monitor agent behavior in production environments.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

Building Cloudflare Agents

Creates AI-powered agents using Cloudflare's Agents SDK with persistent state, real-time communication, and tool integration.

When to Use

  • User wants to build an AI agent or chatbot
  • User needs stateful, real-time AI interactions
  • User asks about the Cloudflare Agents SDK
  • User wants scheduled tasks or background AI work
  • User needs WebSocket-based AI communication

Prerequisites

  • Cloudflare account with Workers enabled
  • Node.js 18+ and npm/pnpm/yarn
  • Wrangler CLI (npm install -g wrangler)

Quick Start

npm create cloudflare@latest -- my-agent --template=cloudflare/agents-starter
cd my-agent
npm start

Agent runs

(truncated - see the full file via the links below)

File tree — 5 files
building-ai-agent-on-cloudflare/SKILL.md
building-ai-agent-on-cloudflare/references/agent-patterns.md
building-ai-agent-on-cloudflare/references/examples.md
building-ai-agent-on-cloudflare/references/state-patterns.md
building-ai-agent-on-cloudflare/references/troubleshooting.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Build and deploy a stateful AI agent on Cloudflare Workers”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

agents-sdk
by cloudflare · cloudflare/skills

Agents SDK equips you to create intelligent agents on Cloudflare Workers with built-in state persistence, callable RPC methods, task scheduling, and durable workflows. It covers agent lifecycle management, WebSocket communication, chat integration, MCP server connectivity, and observability—all with comprehensive Cloudflare documentation as your primary reference.

Apache-2.0updated Jul 2026
★ 2,499repo stars
cloudflare-agents
by secondsky · secondsky/claude-skills

Deploy intelligent agents directly on Cloudflare Workers with built-in support for multiple LLM providers and the Model Context Protocol. Register custom tools, manage state across Cloudflare bindings, and handle real-time interactions via HTTP, WebSockets, or Server-Sent Events.

MITupdated Jul 2026
★ 196repo stars
Cloudflare Agentic Inbox
by Aradotso · Aradotso/ai-agent-skills

Cloudflare Agentic Inbox is a self-hosted email client powered by AI agents, built entirely on Cloudflare Workers. It combines Email Routing for receiving messages, Durable Objects with SQLite for per-mailbox storage, R2 for attachments, and Workers AI for intelligent email assistance.

no license declared → metadata onlyupdated Jul 2026
★ 0repo stars
cloudflare-expert
by personamanagmentlayer · personamanagmentlayer/pcl

Cloudflare Expert provides in-depth knowledge for building serverless applications on Cloudflare's edge platform. Learn to deploy code globally with Workers, optimize caching and CDN performance, implement security features like WAF and DDoS protection, and manage distributed state using Workers KV and Durable Objects.

Apache-2.0updated Mar 2026
★ 38repo stars
cloudflare-workers
by BagelHole · BagelHole/DevOps-Security-Agent-Skills

This skill equips you to build and deploy serverless functions directly on Cloudflare's global edge infrastructure using JavaScript or TypeScript. Execute compute workloads with minimal latency by leveraging Cloudflare's distributed network, ideal for APIs, middleware, and real-time request handling.

MITupdated May 2026
★ 44repo stars
bun-cloudflare-workers
by secondsky · secondsky/claude-skills

This skill enables developers to deploy and execute Bun applications directly on Cloudflare Workers, combining the speed of Bun's runtime with Cloudflare's global edge network. It provides production-grade tooling for serverless workloads, including support for modern frameworks and AI service integrations. Ideal for teams building high-performance, distributed applications that need minimal latency and automatic scaling.

MITupdated Jul 2026
★ 196repo stars

More skills Cloudflare (unlicensed)

Tags
edge-ai-deploymentserverless-agentspersistent-state-aireal-time-websocketagent-orchestrationdistributed-ai-servicestateful-backendproduction-ready-agentsai-task-schedulingmulti-client-sync