agents-sdk

Develop stateful agents on Cloudflare Workers using the Agents SDK.

1|3|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/goodnessibeh/ai-dev-boilerplate --skill agents-sdk-goodnessibeh
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/goodnessibeh/ai-dev-boilerplate/tree/main/.claude/skills/01-Software-Web-Development/cloudflare-agents-sdk
Command: npx skills add https://github.com/goodnessibeh/ai-dev-boilerplate --skill agents-sdk-goodnessibeh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of creating scalable and maintainable AI agents on Cloudflare Workers, enabling you to build complex, stateful applications with ease.

Core Features & Use Cases

  • Stateful Agents: Manage stateful connections and workflows.
  • Durable Workflows: Create durable multi-step tasks with AgentWorkflow.
  • WebSocket Apps: Real-time WebSocket applications with AIChatAgent.
  • Scheduled Tasks: Execute one-time and recurring tasks.
  • MCP Integration: Connect to or build your own MCP servers.
  • Email Handling: Send and receive emails with secure routing.
  • Use Case: Develop a chat application that maintains user sessions, handles real-time interactions, and manages persistent state across different user sessions.

Quick Start

Run the following command to initialize a new agent:

npm install agents

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?▼

You can build stateful AI agents on Cloudflare Workers by installing the `agents` SDK package. This enables you to manage persistent state and durable multi-step workflows directly within your serverless applications.

Can I create real-time WebSocket applications with the Agents SDK?▼

Yes, you can create real-time WebSocket applications with the Agents SDK using `AIChatAgent`. This feature allows you to build interactive chat interfaces that maintain active user sessions and handle real-time messaging.

Does Cloudflare Workers support durable multi-step workflows for agents?▼

Cloudflare Workers supports durable multi-step workflows for agents through the `AgentWorkflow` component. This allows you to execute reliable, stateful tasks that persist across different execution cycles without losing progress.

How do I schedule recurring tasks for stateful agents on Cloudflare?▼

You can schedule recurring and one-time tasks for stateful agents directly using the Agents SDK on Cloudflare Workers. This functionality supports the execution of autonomous workflows without requiring external scheduling infrastructure.

Can I connect my Cloudflare agents to an MCP server?▼

Yes, you can connect your Cloudflare agents to external Model Context Protocol (MCP) servers or build your own. This integration allows your agents to securely interact with external tools and data sources.

What is the best way to maintain user sessions in a Cloudflare chat application?▼

The best way to maintain user sessions in a Cloudflare chat application is using the `AIChatAgent` from the Agents SDK. It manages persistent state and handles real-time WebSocket interactions across different user sessions.