agents-sdk

Build AI agents on Cloudflare Workers with state management and RPC.

3|Updated Jun 12, 2026
One-click install
npx skills add https://github.com/weebcoder101/dreamcode --skill agents-sdk-weebcoder101
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/weebcoder101/dreamcode/tree/main/packages/opencode/test/fixture/skills/agents-sdk
Command: npx skills add https://github.com/weebcoder101/dreamcode --skill agents-sdk-weebcoder101

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires cloudflare agents, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides the means to build and manage AI agents on Cloudflare Workers, streamlining the development of stateful agents, workflows, WebSocket apps, scheduled tasks, MCP servers, and chat applications.

Core Features & Use Cases

  • Agent Creation: Develop agents that maintain state, perform deterministic tasks, and communicate over RPC.
  • Workflows: Execute durable multi-step background tasks with AgentWorkflow.
  • Scheduling: Automate tasks with scheduling capabilities including one-time, recurring, and cron-based.
  • Email Handling: Integrate email processing and secure routing for responsive email communication.
  • Use Case: Imagine creating a chat application that requires stateful interaction with the user. The Agents SDK can facilitate this by handling state, routing, and scheduling in the background.

Quick Start

Install the agents SDK with npm and create your first agent with the Counter class as a starting point.

Frequently Asked Questions about agents-sdk

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

FAQPage Schema
How do I build stateful AI agents on Cloudflare Workers?

Build stateful AI agents on Cloudflare Workers by using the Agents SDK to create an Agent class that manages state, handles routing, and communicates over RPC for your application.

Can I execute durable multi-step workflows with Cloudflare Agents?

Yes, you can execute durable multi-step background tasks by integrating AgentWorkflow, which allows your Cloudflare agents to run reliable, stateful workflows without losing progress.

Does the Cloudflare Agents SDK support scheduled tasks and cron jobs?

Yes, the Cloudflare Agents SDK supports scheduling capabilities for automating tasks, including one-time, recurring, and cron-based triggers for your Workers applications.

What is the best way to handle real-time chat applications on Cloudflare Workers?

The best way to handle real-time chat applications on Cloudflare Workers is using the Agents SDK, which provides built-in state management, WebSocket support, and React hooks for seamless interaction.

Do I need the Agents SDK to run MCP servers on Cloudflare Workers?

Yes, you need the Agents SDK to build and run MCP servers on Cloudflare Workers, as it provides the necessary class structure, state management, and routing required for the protocol.