agents-sdk

Build persistent, stateful AI agents on Cloudflare Workers with SQLite persistence.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/andrewkoumoudjian/personnal-setup --skill agents-sdk-andrewkoumoudjian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agents-sdk
Source: https://github.com/andrewkoumoudjian/personnal-setup/tree/main/.opencode/skill/agents-sdk
Command: npx skills add https://github.com/andrewkoumoudjian/personnal-setup --skill agents-sdk-andrewkoumoudjian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables developers to build and orchestrate stateful AI agents on Cloudflare Workers, providing a cohesive framework for persistent state, scheduling, RPC, MCP integration, and streaming chat.

Core Features & Use Cases

  • Stateful Agent base with automatic state persistence to SQLite and client broadcasts.
  • AIChatAgent for streaming chat with automatic message persistence and resumable streams.
  • MCP server support and Code Mode to reduce token usage.
  • Email handling and tool integration via @callable RPC for extensible workflows.

Quick Start

Install the agents package and export a minimal Agent-based fetch handler to run on Cloudflare Workers.

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?

Building stateful AI agents on Cloudflare Workers requires a framework that provides automatic SQLite persistence, typed state enforcement, and client broadcasts to maintain session continuity across serverless environments.

Can I use streaming chat with automatic message persistence in Cloudflare Workers?

Yes, streaming chat with automatic message persistence is supported in Cloudflare Workers via an AIChatAgent base class that manages message history and enables resumable streams across different client environments.

Does Cloudflare Workers support MCP server integration for AI agents?

Yes, Cloudflare Workers supports MCP server integration for AI agents, enabling tool connectivity and Code Mode functionality to reduce token usage during model context protocol interactions.

What is the best way to manage persistent state for AI agents in a serverless environment?

The best way to manage persistent state for AI agents in a serverless environment is using a framework with automatic SQLite persistence and typed state enforcement to maintain data consistency across executions.

How do I expose callable RPC tools for extensible AI agent workflows?

You can expose callable RPC tools for extensible AI agent workflows by using the @callable RPC decorator, enabling email handling and custom tool integration for extensible workflow automation.

Do I need SQLite to maintain scheduling and stateful persistence for AI agents?

Yes, SQLite is required to maintain scheduling and stateful persistence for AI agents, providing the automatic data storage layer needed for persistent state and resumable streams in serverless environments.