agents-sdk

Build AI agents on Cloudflare Workers with the Agents SDK.

2|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/ylxai/hafiportrait-saas --skill agents-sdk-ylxai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/ylxai/hafiportrait-saas/tree/main/.kiro/skills/agents-sdk
Command: npx skills add https://github.com/ylxai/hafiportrait-saas --skill agents-sdk-ylxai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables the creation of AI agents on Cloudflare Workers, addressing the need for stateful agents, real-time applications, and automated workflows.

Core Features & Use Cases

  • Stateful Agents: Create agents with persistent state and state synchronization.
  • Real-time WebSocket Apps: Build real-time applications with WebSocket support.
  • Durable Workflows: Implement durable workflows for multi-step processes.
  • Use Case: Develop a chatbot that interacts with users in real-time, manages state, and executes workflows to provide personalized responses.

Quick Start

Run the following command to set up and test the agents-sdk:

npm install agents

Then, create a new Cloudflare Worker and initialize an agent.

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 build stateful AI agents on Cloudflare Workers by using the Agents SDK to enable persistent state, state synchronization, and durable workflows for multi-step processes.

How do I create real-time WebSocket apps with AI agents?

You create real-time WebSocket apps by deploying the Agents SDK on Cloudflare Workers, which provides built-in WebSocket support for real-time user interaction and chat applications.

Do I need a Cloudflare Workers environment to use the Agents SDK?

Yes, you need a Cloudflare Workers environment along with the Agents SDK library to run the stateful agents, durable workflows, and scheduled tasks.

Can I automate browser tasks and build voice agents using Cloudflare Workers?

Yes, you can build voice agents and perform browser automation on Cloudflare Workers by utilizing the Agents SDK to manage stateful interactions and automated workflows.

What is the best way to implement durable workflows for multi-step processes on edge networks?

The best way to implement durable workflows on edge networks is using the Cloudflare Agents SDK, which allows you to orchestrate multi-step processes with persistent state synchronization.

Does the Cloudflare Agents SDK support scheduled tasks and MCP servers?

Yes, the Cloudflare Agents SDK supports running scheduled tasks and hosting MCP servers, enabling automated workflows and tool integration within your Workers environment.