agents-sdk

Build persistent stateful AI agents on Cloudflare Workers.

190|14|Updated May 20, 2014
One-click install
npx skills add https://github.com/elithrar/dotfiles --skill agents-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/elithrar/dotfiles/tree/main/.config/opencode/skill/agents-sdk
Command: npx skills add https://github.com/elithrar/dotfiles --skill agents-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Build stateful AI agents on Cloudflare Workers using the Cloudflare Agents SDK, enabling persistent state, scheduling, RPC, MCP, email handling, and streaming chat with Code Mode support.

Core Features & Use Cases

  • Stateful agent lifecycle with automatic state persistence and client broadcasts.
  • Scheduling, RPC, MCP integration, email handling, and streaming chat support for complex workflows.
  • Real-world scenario: orchestrate multiple agents across MCP servers while persisting chat history and task state.

Quick Start

Install the Agents SDK and Wrangler, configure durable_objects in wrangler.jsonc, and implement an Agent class with a fetch handler. Then load and route messages to the agent instance to enable stateful interactions.

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 using the Agents SDK by installing the npm package, configuring durable_objects bindings in wrangler.jsonc, and implementing an Agent class with a fetch handler to manage persistent state and route messages.

Can I use Model Context Protocol servers with Cloudflare Workers agents?

Yes, the Agents SDK supports MCP server integration, allowing you to orchestrate multiple agents across MCP servers while persisting chat history and task state within your worker agents.

What state management options does the Agents SDK provide?

The Agents SDK uses SQLite-backed state management through durable_objects bindings, enabling automatic state persistence, client broadcasts, and stateful agent lifecycle management for streaming chat workflows.

Does the Agents SDK support scheduling and RPC for agent workflows?

Yes, the SDK includes scheduling, RPC, and email handling capabilities alongside state management, letting you build complex agent workflows with task automation and inter-agent communication.

Can I stream chat responses with the Cloudflare Agents SDK?

The Agents SDK supports streaming chat workflows with Code Mode, enabling real-time chat interactions and persistent state synchronization for AI agents running on Cloudflare Workers.

What are the prerequisites for deploying agents with this SDK?

You need npm to install the agents package, Cloudflare Wrangler CLI configured with durable_objects bindings and SQLite backend, and a Cloudflare Workers environment to deploy stateful agents.