agents-sdk

Develop stateful, durable AI agents on Cloudflare Workers using the Agents SDK.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill agents-sdk-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/agents-sdk
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill agents-sdk-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agents, @cloudflare/ai-chat, ai, @ai-sdk/react, @cloudflare/codemode, zod, @modelcontextprotocol/sdk, web-push, and includes references (resource) components.

What problem does it solve?

Developing stateful, durable AI agents on the edge is complex due to challenges with state persistence, long-running workflows, and real-time communication. This Skill simplifies the architecture by providing a unified SDK for managing agent lifecycles, state, and external integrations.

Core Features & Use Cases

  • Durable State & Workflows: Automatically syncs SQLite-backed state to clients and supports multi-step background tasks that survive eviction.
  • Real-time RPC & Chat: Enables WebSocket-based communication, streaming chat responses, and callable methods for interactive applications.
  • Use Case: Build a real-time collaborative chat agent or a durable background task processor that handles human-in-the-loop approvals without losing progress.

Quick Start

Use the agents-sdk skill to initialize a new durable agent class with state management and RPC capabilities in your Cloudflare Workers project.

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?

To build stateful AI agents on Cloudflare Workers, you use the Agents SDK to initialize durable agent classes. This framework automatically syncs SQLite-backed state to clients and enables real-time RPC for interactive applications.

How do I persist agent state and background workflows during edge eviction?

To persist agent state and survive edge eviction, you use Durable Objects to manage SQLite-backed state. This ensures multi-step background tasks, such as human-in-the-loop approvals, retain their progress even when the agent instance is evicted.

Can I stream real-time chat responses and RPC methods using the AI SDK?

Yes, you can stream real-time chat responses and expose callable RPC methods. The framework enables WebSocket-based communication for interactive applications, supporting streaming chat responses alongside callable methods using the AI SDK.

Does the Agents SDK support MCP server integration for Cloudflare Workers?

Yes, the Agents SDK supports MCP server integration for Cloudflare Workers. It provides a unified environment for managing agent lifecycles and external integrations using the Model Context Protocol SDK.

What is the best way to handle human-in-the-loop approvals in background tasks?

The best way to handle human-in-the-loop approvals is by using durable workflows on Cloudflare Workers. This approach manages multi-step background tasks that survive eviction, ensuring no progress is lost while waiting for user input.

How do I add web push notifications to a durable AI agent?

To add web push notifications to a durable AI agent, you use the web-push dependency within your Cloudflare Workers project. This enables event-driven applications to trigger external notifications from background workflows.