agents-sdk

Build AI agents on Cloudflare Workers with the Cloudflare Agents SDK.

2|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/Nihalmai/opencode-plugin-update --skill agents-sdk-nihalmai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/Nihalmai/opencode-plugin-update/tree/main/packages/opencode/test/fixture/skills/agents-sdk
Command: npx skills add https://github.com/Nihalmai/opencode-plugin-update --skill agents-sdk-nihalmai

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you build and manage AI agents on Cloudflare Workers, making it easy to create stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, and chat applications.

Core Features & Use Cases

  • Stateful Agents: Create agents that maintain state across user sessions.
  • Workflows: Execute durable multi-step background tasks.
  • WebSocket Apps: Build real-time, interactive applications with WebSocket support.
  • Scheduled Tasks: Schedule one-time or recurring tasks.
  • MCP Integration: Connect to or build MCP servers for robust applications.
  • Chat Applications: Create chat applications with seamless integration.
  • Use Case: Imagine you want to build a chat application that can handle high traffic and maintain user context. This Skill enables you to create such an application quickly and efficiently.

Quick Start

Use the Cloudflare Agents SDK to create a new agent named 'MyAgent' with persistent state and scheduling capabilities.

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 can use the Cloudflare Agents SDK to maintain agent state across user sessions and integrate scheduling capabilities. This allows you to create persistent agents that handle high traffic efficiently.

Can I create real-time WebSocket apps with the Cloudflare Agents SDK?

Yes, you can create real-time WebSocket apps with the Cloudflare Agents SDK. It provides built-in WebSocket support and React hooks to build interactive applications that require instant data streaming and user interaction.

Does the Cloudflare Agents SDK support durable workflow execution?

Yes, the Cloudflare Agents SDK supports durable workflow execution. You can execute durable multi-step background tasks using Workflows integration, ensuring reliable state management and processing for complex, long-running operations.

How do I schedule recurring tasks for AI agents on Cloudflare?

You can schedule recurring tasks for AI agents on Cloudflare using the Agents SDK's scheduled tasks feature. This allows you to configure one-time or recurring jobs directly within your Workers environment to automate agent actions.

What is the best way to build a chat application that maintains user context?

The best way to build a chat application that maintains user context is using the Cloudflare Agents SDK. It enables stateful agents to seamlessly preserve conversation history and context across sessions while handling high traffic.

Can I build an MCP server using Cloudflare Workers?

Yes, you can build an MCP server using Cloudflare Workers. The Cloudflare Agents SDK provides MCP integration, allowing you to connect to or build MCP servers for robust application communication and tool integration.