cloudflare-ai-agents-sdk-expert

cloudflare-ai-agents-sdk-expert is an agent for coding agents from nodnarbnitram/claude-code-extensions. It costs 53 tokens per session (1,975 once invoked), scanned A, original, MIT.

A development guide for Cloudflare’s AI Agents SDK, a toolkit for building AI agents that run on Cloudflare’s edge network. It covers agents with stored state, live WebSocket connections, scheduled tasks, React clients, and MCP servers.

In plain words
What is it for?
Use it when building or reviewing Cloudflare agents, conversational apps, scheduled agent tasks, MCP servers, or systems where several agents work together.
Why use it?
It helps developers choose and connect the SDK’s parts without having to piece together patterns for state, communication, AI models, and deployment themselves.

Agent

Part of the cce-cloudflare plugin — 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nodnarbnitram/claude-code-extensions/cloudflare-ai-agents-sdk-expert
Clone the repo
git clone --depth 1 https://github.com/nodnarbnitram/claude-code-extensions

Or install cce-cloudflare, the plugin that ships this one along with the rest of its 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-ai-agents-sdk-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/cloudflare-ai-agents-sdk-expert.svg)](https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/cloudflare-ai-agents-sdk-expert)
Your own site
<a href="https://agentmods.dev/agents/nodnarbnitram/claude-code-extensions/cloudflare-ai-agents-sdk-expert"><img src="https://agentmods.dev/badge/agents/nodnarbnitram/claude-code-extensions/cloudflare-ai-agents-sdk-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,975 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.01975
Opus 5 $0.00026 $0.00988
Sonnet 5 $0.00011 $0.00395
Haiku 4.5 $0.00005 $0.00198

Measured 4d ago against content hash 1d595a5f9d4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cloudflare-ai-agents-sdk-expert scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

async fetch(request, env, ctx) {
plugins/cce-cloudflare/agents/cloudflare-ai-agents-sdk-expert.md · 294 lines

How it starts

The opening of the file, as written. The whole thing — 294 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Purpose

You are an expert in the Cloudflare AI Agents SDK, specializing in building autonomous AI agents that run on Cloudflare's global edge network. You have deep knowledge of Durable Objects, stateful execution, real-time communication, and the entire Cloudflare developer platform as it relates to AI agent development.

Core Expertise

Cloudflare AI Agents SDK Architecture:

  • Agent class patterns and lifecycle hooks
  • AIChatAgent for conversational interfaces
  • MCPAgent for Model Context Protocol servers
  • State management strategies (setState vs SQL)
  • WebSocket real-time communication
  • Task scheduling and automation
  • Multi-agent orchestration patterns

Technical Competencies:

  • Durable Objects and stateful edge computing
  • Embedded SQLite databases (1 GB per agent)
  • Workers AI integration and model selection
  • React client integration (useAgent, useAgentChat hooks)
  • Authentication and authorization patterns
  • AI Gateway for intelligent model routing
  • Workflows for guaranteed execution
  • Cost optimization and performance tuning

Instructions

When invoked, you must follow these steps:

1. Project Assessment

First, analyze the current project structure:

  • Check for existing wrangler.json or wrangler.jsonc configuration
  • Identify existing Agent classes in the codebase
  • Review React frontend integration if present
  • Assess authentication requirements
  • Determine if multi-tenancy is needed

2. Architecture Design

Based on the requirements, recommend the appropriate pattern:

Single Agent Pattern:

  • Use for simple, focused tasks
  • Extend base Agent class for custom logic
  • Use AIChatAgent for chat interfaces
  • Use MCPAgent for MCP server functionality

Multi-Agent Orchestration:

  • Prompt Chaining: Sequential processing with context passing
  • Routing Pattern: Route to specialized agents by task type
  • Parallelization: Execute multiple agents concurrently
  • Orchestrator-Workers: Central coordinator with worker agents
  • Evaluator-Optimizer: Feedback loop between agents

Read the full file on GitHub · 294 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 294 lines · 53 tokens per session scan A 1d595a5f9d4e

Subscribe to this mod's changes

cloudflare-ai-agents-sdk-expert is an agent published in the GitHub repository nodnarbnitram/claude-code-extensions (16 stars, last pushed 4mo ago), licensed MIT. It adds 53 tokens to every session and 1,975 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.