agents-sdk

Develop stateful AI agents on Cloudflare Workers with SQLite persistence and WebSocket RPC.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/achmf/KostaHub --skill agents-sdk-achmf
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/achmf/KostaHub/tree/main/.agents/skills/agents-sdk
Command: npx skills add https://github.com/achmf/KostaHub --skill agents-sdk-achmf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill simplifies the development of complex, stateful AI agents by providing a unified framework for managing persistence, real-time communication, and durable background tasks on Cloudflare Workers.

Core Features & Use Cases

  • Stateful Persistence: Automatically syncs SQLite-backed state to clients, ensuring agents maintain context across sessions.
  • Durable Execution: Supports long-running workflows, scheduled tasks, and retries that survive worker eviction.
  • Multi-Modal Integration: Enables chat, voice, browser automation, and MCP server connectivity within a single agent architecture.

Quick Start

Use the agents-sdk skill to initialize a new stateful agent project with the required wrangler configuration and dependencies.

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 this framework to integrate persistent SQLite state, durable workflows, and real-time WebSocket RPC. It simplifies managing background tasks and ensures agents maintain context across sessions.

Does Cloudflare Workers support durable execution for long-running agent workflows?▼

Yes, Cloudflare Workers supports durable execution for long-running agent workflows. This framework enables scheduled tasks and retries that survive worker eviction, ensuring complex agent architectures run reliably without losing execution state.

How do I connect an MCP server to an AI agent in a Cloudflare Worker?▼

To connect an MCP server to an AI agent in a Cloudflare Worker, this framework provides orchestration capabilities using the Model Context Protocol SDK. It allows you to manage MCP server connectivity alongside chat and voice integrations.

Can I use real-time WebSocket RPC for state management in Cloudflare Workers?▼

Yes, you can use real-time WebSocket RPC for state management in Cloudflare Workers. This framework automatically syncs SQLite-backed state to clients via WebSocket, ensuring real-time updates and persistent context across user sessions.

What Wrangler configuration is required for AI agents using Durable Objects?▼

Setting up AI agents using Durable Objects requires specific Wrangler configuration for Durable Objects and Workers AI bindings. This framework initializes a project with the necessary dependencies and setup to enable durable stateful execution.

What is the best way to handle persistent state for AI agents on Cloudflare?▼

The best way to handle persistent state for AI agents on Cloudflare is using a framework that integrates SQLite-backed state with Durable Objects. This approach automatically syncs state to clients and maintains context across active sessions.