Index of every page on this site: llms.txt
All skills
cloudflare avatar

/agents-sdk

@5108325 official
by cloudflarecloudflare/skills3.4k stars
357
Run it yourself

Build, debug, or review Cloudflare Agents SDK applications using the agents package.

Use this Skill: https://skilld.dev/gh/cloudflare/skills/agents-sdk

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesskill-feedback.md

≈697 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Skill feedback

GitHub issues are public: anyone can read an issue once it is posted. Never include sensitive information, and never post an issue until the user has seen the exact title and body and approved it.

Use this when the user reports that the agents-sdk skill gave incorrect or outdated guidance, is missing information, or could be improved. This is about the skill (agent instructions), not about Cloudflare products.

What not to include

The issue is drafted from the conversation, so remove the following before drafting and describe the problem in general terms instead:

  • Credentials, API tokens, secrets, and passwords
  • Account IDs, zone IDs, and other resource identifiers
  • Customer or personal data, such as names, email addresses, and IP addresses
  • Internal hostnames and URLs
  • Private code, configuration, and logs

Steps

  1. Ask permission – Ask the user if they would like to submit feedback to the skill maintainers. If they decline, move on.

  2. Draft the issue – Fill in the table below from the conversation and use it as the issue body. Always identify which specific file and section caused the problem. Leave out everything listed in What not to include.

  3. Review with the user – Show the user the exact title and body, then ask a yes/no question, such as "Post this as a public issue on cloudflare/skills?" Submit only after the user answers yes. If they ask for changes, apply them and ask again. If they answer no, do not post. Agreeing to send feedback in step 1 is not approval of the text.

  4. Submit – Create a GitHub issue on the cloudflare/skills repository with the approved draft as the body, for example with gh issue create --repo cloudflare/skills. The title must follow this format: skill-feedback: agents-sdk: <summary of the problem>.

  5. Share the result – Share the issue URL with the user after submission. If submission fails, give the user the approved title and body, and this link to create the issue manually: https://github.com/cloudflare/skills/issues/new

Issue body

Field Value
Type bug (incorrect guidance), outdated, missing, or improvement
Skill agents-sdk
Source File and section, e.g. SKILL.md > "Section name" or references/<file>.md > "Section name"
Agent The agent and model in use, if known
Task What the user was trying to do, e.g. "deploy a preview"
Expected What should have happened, e.g. "Create a Preview deployment"
Actual What the skill said or what happened, e.g. "Unknown option: --preview"
Impact The effect on the user, e.g. "Time spent finding the correct syntax"
Suggested fix How the skill should change; leave blank if unsure

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning23d5 checks · Risk SAFE
  • Gen Agent Trust Hub23d

    This skill provides documentation and tools for the Cloudflare Agents SDK, including support for state management, RPC, and background processing. It includes features for handling external inputs such as emails and webhooks, which are standard for the SDK's intended use. See detailed analysis for context.

  • Socket23d

    No alerts

  • Snyk23d

    Risk: MEDIUM · 1 issue

  • Runlayer8mo

    8 files scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 5108325. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 4 weeks ago
  • MCP
  • cloudflare
  • workers
  • agents
  • state-management
  • websocket
  • durable-objects
  • scheduling
  • workflows
  • observable

README badge

README badge for cloudflare/skills/agents-sdk

Builds stateful AI agents on Cloudflare Workers using Durable Objects, with APIs for persistent state, callable RPC methods, scheduling, workflows, durable execution, queues, and streaming chat. Covers the full lifecycle of agent development from configuration through observability, with experimental support for voice, browser automation, and MCP integration.

Generated from the current SKILL.md.

Does this work with existing Cloudflare Workers projects?
Yes. Use the 'Add to existing project' guide to install the SDK into an existing Workers app. You'll need to configure durable objects and migrations in wrangler.jsonc.
What state management does the SDK provide?
SQLite-backed persistent state that auto-syncs to clients via setState(). State changes trigger validateStateChange() and onStateUpdate() hooks, and the SDK includes built-in SQL query support.
Can I use this with chat applications?
Yes. The SDK includes AIChatAgent for streaming chat with tools, message persistence, and resumable streams. It requires @cloudflare/ai-chat and ai packages.
Does this support background workflows and scheduled tasks?
Yes. The SDK provides AgentWorkflow for durable multi-step tasks, schedule() / scheduleEvery() for one-time and recurring tasks, and runFiber() for work that survives durable object eviction.
Can I connect to external MCP servers or build MCP servers with this?
Yes. The SDK includes MCP client integration to connect to external MCP servers and McpAgent to build MCP servers with configurable transports (HTTP, SSE, RPC).

Generated from the current SKILL.md. These answers refresh after source changes.