agents-sdk

Build durable Cloudflare Agents with stateful workflows and WebSocket RPC.

1|Updated Mar 12, 2026
One-click install
npx skills add https://github.com/mahou-labs/shiru --skill agents-sdk-mahou-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/mahou-labs/shiru/tree/main/.agents/skills/agents-sdk
Command: npx skills add https://github.com/mahou-labs/shiru --skill agents-sdk-mahou-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Cloudflare Agents empower developers to build scalable, stateful workers with durable workflows, remote procedure calls, and real-time interactions, reducing integration complexity.

Core Features & Use Cases

  • Persistent state management with SQLite-backed storage and automatic client synchronization.
  • Callable RPC, streaming, scheduling, and AgentWorkflows for robust background processing.
  • MCP integration, email routing, and React hooks for client apps.
  • Real-world use: coordinate long-running tasks, chat sessions, and event-driven automation inside Cloudflare Workers.

Quick Start

Install dependencies, implement an Agent class, and expose it via a Worker endpoint.

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 agents with durable workflows in Cloudflare Workers?

To build stateful agents in Cloudflare Workers, you implement an Agent class using the Agents SDK to manage persistent state, schedule tasks, and coordinate durable workflows. The SDK handles state persistence via SQLite-backed storage and automatic client synchronization.

Can I use WebSocket RPC for real-time interactions in Cloudflare Agents?

Yes, Cloudflare Agents support callable RPC and streaming via WebSocket RPC capabilities. This enables real-time interactions and robust background processing directly inside your Workers environment.

What's the best way to manage persistent state for long-running tasks in Cloudflare Workers?

The best way to manage persistent state for long-running tasks is using the Agents SDK's SQLite-backed storage. It provides automatic client synchronization and allows your agents to maintain state across durable workflows without manual integration complexity.

Does the Cloudflare Agents SDK support MCP server integration?

Yes, the Cloudflare Agents SDK supports MCP integration. You can interface your agents with MCP servers, coordinate chat sessions, and handle event-driven automation within your Workers environment.

Do I need Cloudflare Workers to use the Agents SDK for durable workflows?

Yes, the Agents SDK requires the Cloudflare Workers environment to function. It is specifically designed to develop agents that manage persistent state, schedule tasks, and coordinate durable workflows within that platform.

Why use durable workflows for background processing in Cloudflare Agents?

Durable workflows provide robust background processing for long-running tasks by ensuring state persistence and automatic client synchronization. This approach reduces integration complexity when coordinating event-driven automation and chat sessions in Workers.