fcakyon/claude-codex-settings / plugins/cloudflare-skills/skills/agents-sdk
agents-sdk
VerifiedBuild, debug, or review Cloudflare Agents SDK applications using the agents package.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.0 KB |
| references/browse-the-web.md | markdown | 1.6 KB |
| references/callable.md | markdown | 2.1 KB |
| references/client-sdk.md | markdown | 1.2 KB |
| references/codemode.md | markdown | 2.8 KB |
| references/configuration.md | markdown | 1.8 KB |
| references/durable-execution.md | markdown | 1.7 KB |
| references/email.md | markdown | 3.5 KB |
| references/human-in-the-loop.md | markdown | 929 B |
| references/mcp.md | markdown | 1.3 KB |
| references/observability.md | markdown | 1.3 KB |
| references/queue-retries.md | markdown | 1.4 KB |
| references/routing.md | markdown | 1.8 KB |
| references/server-driven-messages.md | markdown | 868 B |
| references/skill-feedback.md | markdown | 2.7 KB |
| references/state-scheduling.md | markdown | 1.5 KB |
| references/streaming-chat.md | markdown | 1.4 KB |
| references/think.md | markdown | 2.9 KB |
| references/voice.md | markdown | 1.9 KB |
| references/webhooks-push.md | markdown | 2.4 KB |
| references/workflows.md | markdown | 2.3 KB |
references/configuration.md
View on GitHub# Configuration
Fetch https://developers.cloudflare.com/agents/runtime/operations/configuration/index.md for complete documentation.
## Wrangler Config (`wrangler.jsonc`)
```jsonc
{
"name": "my-agent",
"main": "src/index.ts",
"compatibility_date": "2025-01-28",
"compatibility_flags": ["nodejs_compat"],
"durable_objects": {
"bindings": [
{ "name": "MyAgent", "class_name": "MyAgent" },
{ "name": "ChatAgent", "class_name": "ChatAgent" }
]
},
"migrations": [
{ "tag": "v1", "new_sqlite_classes": ["MyAgent", "ChatAgent"] }
],
"ai": { "binding": "AI" },
"assets": {
"directory": "./dist/client",
"binding": "ASSETS",
"not_found_handling": "single-page-application",
"run_worker_first": true
}
}
```
## Key Rules
- Every agent class needs a DO binding AND a `new_sqlite_classes` migration entry
- `nodejs_compat` is required
- Never edit old migrations — add a new tag (e.g. `v2`) for new classes
- Do NOT enable `experimentalDecorators` in tsconfig — it breaks `@callable`
- For Workers AI locally, set `"ai": { "binding": "AI", "remote": true }` in `.dev.vars` or config
- Use `wrangler secret put` for secrets, never hardcode them
## Vite Setup
```typescript
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { cloudflare } from "@cloudflare/vite-plugin";
import { agents } from "agents/vite";
export default defineConfig({
plugins: [react(), cloudflare(), agents()]
});
```
## Type Generation
```bash
npx wrangler types
```
This generates `env.d.ts` with typed bindings. Regenerate after changing `wrangler.jsonc`.
## tsconfig
Extend the agents tsconfig for correct settings:
```jsonc
{
"extends": ["agents/tsconfig"],
"include": ["src/**/*.ts", "src/**/*.tsx"],
"compilerOptions": { "paths": { "~/*": ["./src/*"] } }
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |