Agents SDK vs Durable objects
Agents SDK is an open-source agent skill for developer tools. Durable objects is an open-source agent skill for cloud and infrastructure.
- Agents SDK is best for build a stateful agent on cloudflare workers with persistent state.
- Durable objects is best for build a chat room or multiplayer game backed by one durable object per room.
- What it is
- Agents SDK is an open-source agent skill for developer tools.Durable objects is an open-source agent skill for cloud and infrastructure.
- Best for
- Build a stateful agent on Cloudflare Workers with persistent stateBuild a chat room or multiplayer game backed by one Durable Object per room
- Kind
- SkillSkill
- Pricing
- Open sourceOpen source
- Platforms
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, GooseClaude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- GitHub stars
- 3.4K3.4K
- Last commit
- Nov 2026Nov 2026
- License
- Apache-2.0Apache-2.0
- Open source
- Good for
- Build a stateful agent on Cloudflare Workers with persistent state; Add a streaming AI chat agent with resumable streams to an existing app; Expose an MCP server from a Cloudflare WorkerBuild a chat room or multiplayer game backed by one Durable Object per room; Add per-user persistent storage to a multi-tenant SaaS Worker; Schedule subscription renewals or game timeouts with Durable Object alarms
What Agents SDK does
Setup and configuration
Covers installing the agents package and writing the Wrangler config, Durable Object bindings and migrations.
Agent class patterns
Shows how to define agent classes with typed state, state validation and callable RPC methods.
Scheduling and queues
Explains delayed, recurring and cron tasks along with the built-in FIFO queue and retry backoff.
Chat and streaming
References AIChatAgent, resumable streams, client hooks and human-in-the-loop approval flows.
MCP and integrations
Covers building and connecting MCP servers, plus email, webhooks and push notifications.
Durable background work
Describes workflows, runFiber and stash for work that survives Durable Object eviction.
What Durable objects does
Durable Object class patterns
Templates for defining DO classes, constructors, RPC methods and stub creation via getByName or idFromString.
SQLite storage guidance
Covers synchronous SQL queries and async key-value storage operations inside a Durable Object.
Alarm scheduling
Shows how to set, handle and cancel per-object alarms for scheduled work.
Wrangler configuration help
Explains durable_objects bindings and SQLite migrations in wrangler.jsonc or wrangler.toml.
Concurrency and consistency rules
Lists critical rules and anti-patterns around blockConcurrencyWhile, atomic writes and persisting state.
Vitest testing reference
Points to a testing reference for configuring Vitest suites that exercise Durable Object behavior.
Agents SDK vs Durable objects: questions
Is Agents SDK or Durable objects cheaper?
Both are open source. Compare current plans on each official site.
What is the difference between Agents SDK and Durable objects?
Agents SDK is an open-source agent skill for developer tools. Durable objects is an open-source agent skill for cloud and infrastructure.
