[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cloudflare-agents-sdk":3,"mdc--1zxsvz-key":39,"related-repo-cloudflare-agents-sdk":3716,"related-org-cloudflare-agents-sdk":3826},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":34,"sourceUrl":37,"mdContent":38},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cloudflare","Cloudflare","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcloudflare.jpg",[12,16,19,20,23],{"name":13,"slug":14,"type":15},"Cloudflare Workers","cloudflare-workers","tag",{"name":17,"slug":18,"type":15},"WebSockets","websockets",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"MCP","mcp",{"name":24,"slug":25,"type":15},"Agents","agents",2112,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fskills","2026-04-06T18:07:36.660888",null,192,[25,8,32,33],"skills","workers",{"repoUrl":27,"stars":26,"forks":30,"topics":35,"description":36},[25,8,32,33],"Skills for teaching agents how to build on Cloudflare.","https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fagents-sdk","---\nname: agents-sdk\ndescription: Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.\n---\n\n# Cloudflare Agents SDK\n\nYour knowledge of the Agents SDK may be outdated. **Prefer retrieval over pre-training** for any Agents SDK task.\n\n## Retrieval Sources\n\nCloudflare docs: https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002F\n\n| Topic | Docs URL | Use for |\n|-------|----------|---------|\n| Getting started | [Quick start](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fgetting-started\u002Fquick-start\u002F) | First agent, project setup |\n| Adding to existing project | [Add to existing project](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fgetting-started\u002Fadd-to-existing-project\u002F) | Install into existing Workers app |\n| Configuration | [Configuration](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fconfiguration\u002F) | `wrangler.jsonc`, bindings, assets, deployment |\n| Agent class | [Agents API](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fagents-api\u002F) | Agent lifecycle, patterns, pitfalls |\n| State | [Store and sync state](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fstore-and-sync-state\u002F) | `setState`, `validateStateChange`, persistence |\n| Routing | [Routing](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Frouting\u002F) | URL patterns, `routeAgentRequest` |\n| Callable methods | [Callable methods](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fcallable-methods\u002F) | `@callable`, RPC, streaming, timeouts |\n| Scheduling | [Schedule tasks](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fschedule-tasks\u002F) | `schedule()`, `scheduleEvery()`, cron |\n| Workflows | [Run workflows](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Frun-workflows\u002F) | `AgentWorkflow`, durable multi-step tasks |\n| HTTP\u002FWebSockets | [WebSockets](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fwebsockets\u002F) | Lifecycle hooks, hibernation |\n| Chat agents | [Chat agents](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fchat-agents\u002F) | `AIChatAgent`, streaming, tools, persistence |\n| Client SDK | [Client SDK](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fclient-sdk\u002F) | `useAgent`, `useAgentChat`, React hooks |\n| Client tools | [Client tools](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fclient-tools\u002F) | Client-side tools, `autoContinueAfterToolResult` |\n| Server-driven messages | [Trigger patterns](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Ftrigger-patterns\u002F) | `saveMessages`, `waitUntilStable`, server-initiated turns |\n| Resumable streaming | [Resumable streaming](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fresumable-streaming\u002F) | Stream recovery on disconnect |\n| Email | [Email](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Femail\u002F) | Email routing, secure reply resolver |\n| MCP client | [MCP client](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-client-api\u002F) | Connecting to MCP servers |\n| MCP server | [MCP server](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-agent-api\u002F) | Building MCP servers with `McpAgent` |\n| MCP transports | [MCP transports](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-transports\u002F) | Streamable HTTP, SSE, RPC transport options |\n| Securing MCP servers | [Securing MCP](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fsecuring-mcp-servers\u002F) | OAuth, proxy MCP, hardening |\n| Human-in-the-loop | [Human-in-the-loop](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fconcepts\u002Fhuman-in-the-loop\u002F) | Approval flows, `needsApproval`, workflows |\n| Durable execution | [Durable execution](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fdurable-execution\u002F) | `runFiber()`, `stash()`, surviving DO eviction |\n| Queue | [Queue](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fqueue-tasks\u002F) | Built-in FIFO queue, `queue()` |\n| Retries | [Retries](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fretries\u002F) | `this.retry()`, backoff\u002Fjitter |\n| Observability | [Observability](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fobservability\u002F) | Diagnostics-channel events |\n| Push notifications | [Push notifications](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fpush-notifications\u002F) | Web Push + VAPID from agents |\n| Webhooks | [Webhooks](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fwebhooks\u002F) | Receiving external webhooks |\n| Cross-domain auth | [Cross-domain auth](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fcross-domain-authentication\u002F) | WebSocket auth, tokens, CORS |\n| Readonly connections | [Readonly](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Freadonly-connections\u002F) | `shouldConnectionBeReadonly` |\n| Voice | [Voice](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fvoice\u002F) | Experimental STT\u002FTTS, `withVoice` |\n| Browse the web | [Browser tools](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fbrowse-the-web\u002F) | Experimental CDP browser automation |\n| Think | [Think](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fthink\u002F) | Experimental higher-level chat agent class |\n| Migrations | [AI SDK v5](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fguides\u002Fmigration-to-ai-sdk-v5\u002F), [AI SDK v6](https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fguides\u002Fmigration-to-ai-sdk-v6\u002F) | Upgrading `@cloudflare\u002Fai-chat` |\n\n## Capabilities\n\nThe Agents SDK provides:\n\n- **Persistent state** — SQLite-backed, auto-synced to clients via `setState`\n- **Callable RPC** — `@callable()` methods invoked over WebSocket\n- **Scheduling** — One-time, recurring (`scheduleEvery`), and cron tasks\n- **Workflows** — Durable multi-step background processing via `AgentWorkflow`\n- **Durable execution** — `runFiber()` \u002F `stash()` for work that survives DO eviction\n- **Queue** — Built-in FIFO queue with retries via `queue()`\n- **Retries** — `this.retry()` with exponential backoff and jitter\n- **MCP integration** — Connect to MCP servers or build your own with `McpAgent`\n- **Email handling** — Receive and reply to emails with secure routing\n- **Streaming chat** — `AIChatAgent` with resumable streams, message persistence, tools\n- **Server-driven messages** — `saveMessages`, `waitUntilStable` for proactive agent turns\n- **React hooks** — `useAgent`, `useAgentChat` for client apps\n- **Observability** — `diagnostics_channel` events for state, RPC, schedule, lifecycle\n- **Push notifications** — Web Push + VAPID delivery from agents\n- **Webhooks** — Receive and verify external webhooks\n- **Voice** (experimental) — STT\u002FTTS via `@cloudflare\u002Fvoice`\n- **Browser tools** (experimental) — CDP-powered browsing via `agents\u002Fbrowser`\n- **Think** (experimental) — Higher-level chat agent via `@cloudflare\u002Fthink`\n\n## FIRST: Verify Installation\n\n```bash\nnpm ls agents  # Should show agents package\n```\n\nIf not installed:\n```bash\nnpm install agents\n```\n\nFor chat agents:\n```bash\nnpm install agents @cloudflare\u002Fai-chat ai @ai-sdk\u002Freact\n```\n\n## Wrangler Configuration\n\n```jsonc\n{\n  \"compatibility_flags\": [\"nodejs_compat\"],\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MyAgent\", \"class_name\": \"MyAgent\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyAgent\"] }]\n}\n```\n\n**Gotchas:**\n- Do NOT enable `experimentalDecorators` in tsconfig (breaks `@callable`)\n- Never edit old migrations — always add new tags\n- Each agent class needs its own DO binding + migration entry\n- Add `\"ai\": { \"binding\": \"AI\" }` for Workers AI\n\n## Agent Class\n\n```typescript\nimport { Agent, routeAgentRequest, callable } from \"agents\";\n\ntype State = { count: number };\n\nexport class Counter extends Agent\u003CEnv, State> {\n  initialState = { count: 0 };\n\n  validateStateChange(nextState: State, source: Connection | \"server\") {\n    if (nextState.count \u003C 0) throw new Error(\"Count cannot be negative\");\n  }\n\n  onStateUpdate(state: State, source: Connection | \"server\") {\n    console.log(\"State updated:\", state);\n  }\n\n  @callable()\n  increment() {\n    this.setState({ count: this.state.count + 1 });\n    return this.state.count;\n  }\n}\n\nexport default {\n  fetch: (req, env) => routeAgentRequest(req, env) ?? new Response(\"Not found\", { status: 404 })\n};\n```\n\n## Routing\n\nRequests route to `\u002Fagents\u002F{agent-name}\u002F{instance-name}`:\n\n| Class | URL |\n|-------|-----|\n| `Counter` | `\u002Fagents\u002Fcounter\u002Fuser-123` |\n| `ChatRoom` | `\u002Fagents\u002Fchat-room\u002Flobby` |\n\nClient: `useAgent({ agent: \"Counter\", name: \"user-123\" })`\n\nCustom routing: use `getAgentByName(env.MyAgent, \"instance-id\")` then `agent.fetch(request)`.\n\n## Core APIs\n\n| Task | API |\n|------|-----|\n| Read state | `this.state.count` |\n| Write state | `this.setState({ count: 1 })` |\n| SQL query | `` this.sql`SELECT * FROM users WHERE id = ${id}` `` |\n| Schedule (delay) | `await this.schedule(60, \"task\", payload)` |\n| Schedule (cron) | `await this.schedule(\"0 * * * *\", \"task\", payload)` |\n| Schedule (interval) | `await this.scheduleEvery(30, \"poll\")` |\n| RPC method | `@callable() myMethod() { ... }` |\n| Streaming RPC | `@callable({ streaming: true }) stream(res) { ... }` |\n| Start workflow | `await this.runWorkflow(\"ProcessingWorkflow\", params)` |\n| Durable fiber | `await this.runFiber(\"name\", async (ctx) => { ... })` |\n| Enqueue work | `this.queue(\"handler\", payload)` |\n| Retry with backoff | `await this.retry(fn, { maxAttempts: 5 })` |\n| Broadcast to clients | `this.broadcast(message)` |\n| Get connections | `this.getConnections(tag?)` |\n\n## React Client\n\n```tsx\nimport { useAgent } from \"agents\u002Freact\";\n\nfunction App() {\n  const [state, setLocalState] = useState({ count: 0 });\n\n  const agent = useAgent({\n    agent: \"Counter\",\n    name: \"my-instance\",\n    onStateUpdate: (newState) => setLocalState(newState),\n    onIdentity: (name, agentType) => console.log(`Connected to ${name}`)\n  });\n\n  return (\n    \u003Cbutton onClick={() => agent.setState({ count: state.count + 1 })}>\n      Count: {state.count}\n    \u003C\u002Fbutton>\n  );\n}\n```\n\n## References\n\n### Core\n- **[references\u002Fstate-scheduling.md](references\u002Fstate-scheduling.md)** — State persistence, scheduling, SQL\n- **[references\u002Fcallable.md](references\u002Fcallable.md)** — RPC methods, streaming, timeouts\n- **[references\u002Frouting.md](references\u002Frouting.md)** — URL patterns, custom routing, `getAgentByName`\n- **[references\u002Fconfiguration.md](references\u002Fconfiguration.md)** — Wrangler config, bindings, Vite setup\n\n### Chat & Streaming\n- **[references\u002Fstreaming-chat.md](references\u002Fstreaming-chat.md)** — AIChatAgent, resumable streams, tools\n- **[references\u002Fclient-sdk.md](references\u002Fclient-sdk.md)** — `useAgent`, `useAgentChat`, `AgentClient`\n- **[references\u002Fserver-driven-messages.md](references\u002Fserver-driven-messages.md)** — Trigger patterns, `saveMessages`\n- **[references\u002Fhuman-in-the-loop.md](references\u002Fhuman-in-the-loop.md)** — Approval flows, `needsApproval`\n\n### Background Processing\n- **[references\u002Fworkflows.md](references\u002Fworkflows.md)** — Durable Workflows integration\n- **[references\u002Fdurable-execution.md](references\u002Fdurable-execution.md)** — `runFiber`, `stash`, surviving eviction\n- **[references\u002Fqueue-retries.md](references\u002Fqueue-retries.md)** — Built-in queue, retry with backoff\n\n### Integrations\n- **[references\u002Fmcp.md](references\u002Fmcp.md)** — MCP client and server, transports, securing\n- **[references\u002Femail.md](references\u002Femail.md)** — Email routing and handling\n- **[references\u002Fwebhooks-push.md](references\u002Fwebhooks-push.md)** — Webhooks, push notifications\n- **[references\u002Fobservability.md](references\u002Fobservability.md)** — Diagnostics-channel events\n\n### Experimental\n- **[references\u002Fthink.md](references\u002Fthink.md)** — `@cloudflare\u002Fthink` higher-level chat agent\n- **[references\u002Fvoice.md](references\u002Fvoice.md)** — `@cloudflare\u002Fvoice` STT\u002FTTS\n- **[references\u002Fcodemode.md](references\u002Fcodemode.md)** — Code Mode for tool orchestration\n- **[references\u002Fbrowse-the-web.md](references\u002Fbrowse-the-web.md)** — CDP browser tools\n",{"data":40,"body":41},{"name":4,"description":6},{"type":42,"children":43},"root",[44,53,67,74,87,1010,1016,1021,1304,1310,1350,1355,1379,1384,1421,1427,1498,1506,1552,1558,2403,2408,2420,2484,2495,2515,2521,2781,2787,3352,3358,3365,3426,3432,3514,3520,3576,3582,3637,3643,3710],{"type":45,"tag":46,"props":47,"children":49},"element","h1",{"id":48},"cloudflare-agents-sdk",[50],{"type":51,"value":52},"text","Cloudflare Agents SDK",{"type":45,"tag":54,"props":55,"children":56},"p",{},[57,59,65],{"type":51,"value":58},"Your knowledge of the Agents SDK may be outdated. ",{"type":45,"tag":60,"props":61,"children":62},"strong",{},[63],{"type":51,"value":64},"Prefer retrieval over pre-training",{"type":51,"value":66}," for any Agents SDK task.",{"type":45,"tag":68,"props":69,"children":71},"h2",{"id":70},"retrieval-sources",[72],{"type":51,"value":73},"Retrieval Sources",{"type":45,"tag":54,"props":75,"children":76},{},[77,79],{"type":51,"value":78},"Cloudflare docs: ",{"type":45,"tag":80,"props":81,"children":85},"a",{"href":82,"rel":83},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002F",[84],"nofollow",[86],{"type":51,"value":82},{"type":45,"tag":88,"props":89,"children":90},"table",{},[91,115],{"type":45,"tag":92,"props":93,"children":94},"thead",{},[95],{"type":45,"tag":96,"props":97,"children":98},"tr",{},[99,105,110],{"type":45,"tag":100,"props":101,"children":102},"th",{},[103],{"type":51,"value":104},"Topic",{"type":45,"tag":100,"props":106,"children":107},{},[108],{"type":51,"value":109},"Docs URL",{"type":45,"tag":100,"props":111,"children":112},{},[113],{"type":51,"value":114},"Use for",{"type":45,"tag":116,"props":117,"children":118},"tbody",{},[119,143,166,195,218,255,283,311,347,376,398,426,461,489,525,547,569,591,619,641,664,694,729,757,785,807,829,851,873,900,928,951,973],{"type":45,"tag":96,"props":120,"children":121},{},[122,128,138],{"type":45,"tag":123,"props":124,"children":125},"td",{},[126],{"type":51,"value":127},"Getting started",{"type":45,"tag":123,"props":129,"children":130},{},[131],{"type":45,"tag":80,"props":132,"children":135},{"href":133,"rel":134},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fgetting-started\u002Fquick-start\u002F",[84],[136],{"type":51,"value":137},"Quick start",{"type":45,"tag":123,"props":139,"children":140},{},[141],{"type":51,"value":142},"First agent, project setup",{"type":45,"tag":96,"props":144,"children":145},{},[146,151,161],{"type":45,"tag":123,"props":147,"children":148},{},[149],{"type":51,"value":150},"Adding to existing project",{"type":45,"tag":123,"props":152,"children":153},{},[154],{"type":45,"tag":80,"props":155,"children":158},{"href":156,"rel":157},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fgetting-started\u002Fadd-to-existing-project\u002F",[84],[159],{"type":51,"value":160},"Add to existing project",{"type":45,"tag":123,"props":162,"children":163},{},[164],{"type":51,"value":165},"Install into existing Workers app",{"type":45,"tag":96,"props":167,"children":168},{},[169,174,183],{"type":45,"tag":123,"props":170,"children":171},{},[172],{"type":51,"value":173},"Configuration",{"type":45,"tag":123,"props":175,"children":176},{},[177],{"type":45,"tag":80,"props":178,"children":181},{"href":179,"rel":180},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fconfiguration\u002F",[84],[182],{"type":51,"value":173},{"type":45,"tag":123,"props":184,"children":185},{},[186,193],{"type":45,"tag":187,"props":188,"children":190},"code",{"className":189},[],[191],{"type":51,"value":192},"wrangler.jsonc",{"type":51,"value":194},", bindings, assets, deployment",{"type":45,"tag":96,"props":196,"children":197},{},[198,203,213],{"type":45,"tag":123,"props":199,"children":200},{},[201],{"type":51,"value":202},"Agent class",{"type":45,"tag":123,"props":204,"children":205},{},[206],{"type":45,"tag":80,"props":207,"children":210},{"href":208,"rel":209},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fagents-api\u002F",[84],[211],{"type":51,"value":212},"Agents API",{"type":45,"tag":123,"props":214,"children":215},{},[216],{"type":51,"value":217},"Agent lifecycle, patterns, pitfalls",{"type":45,"tag":96,"props":219,"children":220},{},[221,226,236],{"type":45,"tag":123,"props":222,"children":223},{},[224],{"type":51,"value":225},"State",{"type":45,"tag":123,"props":227,"children":228},{},[229],{"type":45,"tag":80,"props":230,"children":233},{"href":231,"rel":232},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fstore-and-sync-state\u002F",[84],[234],{"type":51,"value":235},"Store and sync state",{"type":45,"tag":123,"props":237,"children":238},{},[239,245,247,253],{"type":45,"tag":187,"props":240,"children":242},{"className":241},[],[243],{"type":51,"value":244},"setState",{"type":51,"value":246},", ",{"type":45,"tag":187,"props":248,"children":250},{"className":249},[],[251],{"type":51,"value":252},"validateStateChange",{"type":51,"value":254},", persistence",{"type":45,"tag":96,"props":256,"children":257},{},[258,263,272],{"type":45,"tag":123,"props":259,"children":260},{},[261],{"type":51,"value":262},"Routing",{"type":45,"tag":123,"props":264,"children":265},{},[266],{"type":45,"tag":80,"props":267,"children":270},{"href":268,"rel":269},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Frouting\u002F",[84],[271],{"type":51,"value":262},{"type":45,"tag":123,"props":273,"children":274},{},[275,277],{"type":51,"value":276},"URL patterns, ",{"type":45,"tag":187,"props":278,"children":280},{"className":279},[],[281],{"type":51,"value":282},"routeAgentRequest",{"type":45,"tag":96,"props":284,"children":285},{},[286,291,300],{"type":45,"tag":123,"props":287,"children":288},{},[289],{"type":51,"value":290},"Callable methods",{"type":45,"tag":123,"props":292,"children":293},{},[294],{"type":45,"tag":80,"props":295,"children":298},{"href":296,"rel":297},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fcallable-methods\u002F",[84],[299],{"type":51,"value":290},{"type":45,"tag":123,"props":301,"children":302},{},[303,309],{"type":45,"tag":187,"props":304,"children":306},{"className":305},[],[307],{"type":51,"value":308},"@callable",{"type":51,"value":310},", RPC, streaming, timeouts",{"type":45,"tag":96,"props":312,"children":313},{},[314,319,329],{"type":45,"tag":123,"props":315,"children":316},{},[317],{"type":51,"value":318},"Scheduling",{"type":45,"tag":123,"props":320,"children":321},{},[322],{"type":45,"tag":80,"props":323,"children":326},{"href":324,"rel":325},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fschedule-tasks\u002F",[84],[327],{"type":51,"value":328},"Schedule tasks",{"type":45,"tag":123,"props":330,"children":331},{},[332,338,339,345],{"type":45,"tag":187,"props":333,"children":335},{"className":334},[],[336],{"type":51,"value":337},"schedule()",{"type":51,"value":246},{"type":45,"tag":187,"props":340,"children":342},{"className":341},[],[343],{"type":51,"value":344},"scheduleEvery()",{"type":51,"value":346},", cron",{"type":45,"tag":96,"props":348,"children":349},{},[350,355,365],{"type":45,"tag":123,"props":351,"children":352},{},[353],{"type":51,"value":354},"Workflows",{"type":45,"tag":123,"props":356,"children":357},{},[358],{"type":45,"tag":80,"props":359,"children":362},{"href":360,"rel":361},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Frun-workflows\u002F",[84],[363],{"type":51,"value":364},"Run workflows",{"type":45,"tag":123,"props":366,"children":367},{},[368,374],{"type":45,"tag":187,"props":369,"children":371},{"className":370},[],[372],{"type":51,"value":373},"AgentWorkflow",{"type":51,"value":375},", durable multi-step tasks",{"type":45,"tag":96,"props":377,"children":378},{},[379,384,393],{"type":45,"tag":123,"props":380,"children":381},{},[382],{"type":51,"value":383},"HTTP\u002FWebSockets",{"type":45,"tag":123,"props":385,"children":386},{},[387],{"type":45,"tag":80,"props":388,"children":391},{"href":389,"rel":390},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fwebsockets\u002F",[84],[392],{"type":51,"value":17},{"type":45,"tag":123,"props":394,"children":395},{},[396],{"type":51,"value":397},"Lifecycle hooks, hibernation",{"type":45,"tag":96,"props":399,"children":400},{},[401,406,415],{"type":45,"tag":123,"props":402,"children":403},{},[404],{"type":51,"value":405},"Chat agents",{"type":45,"tag":123,"props":407,"children":408},{},[409],{"type":45,"tag":80,"props":410,"children":413},{"href":411,"rel":412},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fchat-agents\u002F",[84],[414],{"type":51,"value":405},{"type":45,"tag":123,"props":416,"children":417},{},[418,424],{"type":45,"tag":187,"props":419,"children":421},{"className":420},[],[422],{"type":51,"value":423},"AIChatAgent",{"type":51,"value":425},", streaming, tools, persistence",{"type":45,"tag":96,"props":427,"children":428},{},[429,434,443],{"type":45,"tag":123,"props":430,"children":431},{},[432],{"type":51,"value":433},"Client SDK",{"type":45,"tag":123,"props":435,"children":436},{},[437],{"type":45,"tag":80,"props":438,"children":441},{"href":439,"rel":440},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fclient-sdk\u002F",[84],[442],{"type":51,"value":433},{"type":45,"tag":123,"props":444,"children":445},{},[446,452,453,459],{"type":45,"tag":187,"props":447,"children":449},{"className":448},[],[450],{"type":51,"value":451},"useAgent",{"type":51,"value":246},{"type":45,"tag":187,"props":454,"children":456},{"className":455},[],[457],{"type":51,"value":458},"useAgentChat",{"type":51,"value":460},", React hooks",{"type":45,"tag":96,"props":462,"children":463},{},[464,469,478],{"type":45,"tag":123,"props":465,"children":466},{},[467],{"type":51,"value":468},"Client tools",{"type":45,"tag":123,"props":470,"children":471},{},[472],{"type":45,"tag":80,"props":473,"children":476},{"href":474,"rel":475},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fclient-tools\u002F",[84],[477],{"type":51,"value":468},{"type":45,"tag":123,"props":479,"children":480},{},[481,483],{"type":51,"value":482},"Client-side tools, ",{"type":45,"tag":187,"props":484,"children":486},{"className":485},[],[487],{"type":51,"value":488},"autoContinueAfterToolResult",{"type":45,"tag":96,"props":490,"children":491},{},[492,497,507],{"type":45,"tag":123,"props":493,"children":494},{},[495],{"type":51,"value":496},"Server-driven messages",{"type":45,"tag":123,"props":498,"children":499},{},[500],{"type":45,"tag":80,"props":501,"children":504},{"href":502,"rel":503},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Ftrigger-patterns\u002F",[84],[505],{"type":51,"value":506},"Trigger patterns",{"type":45,"tag":123,"props":508,"children":509},{},[510,516,517,523],{"type":45,"tag":187,"props":511,"children":513},{"className":512},[],[514],{"type":51,"value":515},"saveMessages",{"type":51,"value":246},{"type":45,"tag":187,"props":518,"children":520},{"className":519},[],[521],{"type":51,"value":522},"waitUntilStable",{"type":51,"value":524},", server-initiated turns",{"type":45,"tag":96,"props":526,"children":527},{},[528,533,542],{"type":45,"tag":123,"props":529,"children":530},{},[531],{"type":51,"value":532},"Resumable streaming",{"type":45,"tag":123,"props":534,"children":535},{},[536],{"type":45,"tag":80,"props":537,"children":540},{"href":538,"rel":539},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fresumable-streaming\u002F",[84],[541],{"type":51,"value":532},{"type":45,"tag":123,"props":543,"children":544},{},[545],{"type":51,"value":546},"Stream recovery on disconnect",{"type":45,"tag":96,"props":548,"children":549},{},[550,555,564],{"type":45,"tag":123,"props":551,"children":552},{},[553],{"type":51,"value":554},"Email",{"type":45,"tag":123,"props":556,"children":557},{},[558],{"type":45,"tag":80,"props":559,"children":562},{"href":560,"rel":561},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Femail\u002F",[84],[563],{"type":51,"value":554},{"type":45,"tag":123,"props":565,"children":566},{},[567],{"type":51,"value":568},"Email routing, secure reply resolver",{"type":45,"tag":96,"props":570,"children":571},{},[572,577,586],{"type":45,"tag":123,"props":573,"children":574},{},[575],{"type":51,"value":576},"MCP client",{"type":45,"tag":123,"props":578,"children":579},{},[580],{"type":45,"tag":80,"props":581,"children":584},{"href":582,"rel":583},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-client-api\u002F",[84],[585],{"type":51,"value":576},{"type":45,"tag":123,"props":587,"children":588},{},[589],{"type":51,"value":590},"Connecting to MCP servers",{"type":45,"tag":96,"props":592,"children":593},{},[594,599,608],{"type":45,"tag":123,"props":595,"children":596},{},[597],{"type":51,"value":598},"MCP server",{"type":45,"tag":123,"props":600,"children":601},{},[602],{"type":45,"tag":80,"props":603,"children":606},{"href":604,"rel":605},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-agent-api\u002F",[84],[607],{"type":51,"value":598},{"type":45,"tag":123,"props":609,"children":610},{},[611,613],{"type":51,"value":612},"Building MCP servers with ",{"type":45,"tag":187,"props":614,"children":616},{"className":615},[],[617],{"type":51,"value":618},"McpAgent",{"type":45,"tag":96,"props":620,"children":621},{},[622,627,636],{"type":45,"tag":123,"props":623,"children":624},{},[625],{"type":51,"value":626},"MCP transports",{"type":45,"tag":123,"props":628,"children":629},{},[630],{"type":45,"tag":80,"props":631,"children":634},{"href":632,"rel":633},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fmcp-transports\u002F",[84],[635],{"type":51,"value":626},{"type":45,"tag":123,"props":637,"children":638},{},[639],{"type":51,"value":640},"Streamable HTTP, SSE, RPC transport options",{"type":45,"tag":96,"props":642,"children":643},{},[644,649,659],{"type":45,"tag":123,"props":645,"children":646},{},[647],{"type":51,"value":648},"Securing MCP servers",{"type":45,"tag":123,"props":650,"children":651},{},[652],{"type":45,"tag":80,"props":653,"children":656},{"href":654,"rel":655},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fsecuring-mcp-servers\u002F",[84],[657],{"type":51,"value":658},"Securing MCP",{"type":45,"tag":123,"props":660,"children":661},{},[662],{"type":51,"value":663},"OAuth, proxy MCP, hardening",{"type":45,"tag":96,"props":665,"children":666},{},[667,672,681],{"type":45,"tag":123,"props":668,"children":669},{},[670],{"type":51,"value":671},"Human-in-the-loop",{"type":45,"tag":123,"props":673,"children":674},{},[675],{"type":45,"tag":80,"props":676,"children":679},{"href":677,"rel":678},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fconcepts\u002Fhuman-in-the-loop\u002F",[84],[680],{"type":51,"value":671},{"type":45,"tag":123,"props":682,"children":683},{},[684,686,692],{"type":51,"value":685},"Approval flows, ",{"type":45,"tag":187,"props":687,"children":689},{"className":688},[],[690],{"type":51,"value":691},"needsApproval",{"type":51,"value":693},", workflows",{"type":45,"tag":96,"props":695,"children":696},{},[697,702,711],{"type":45,"tag":123,"props":698,"children":699},{},[700],{"type":51,"value":701},"Durable execution",{"type":45,"tag":123,"props":703,"children":704},{},[705],{"type":45,"tag":80,"props":706,"children":709},{"href":707,"rel":708},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fdurable-execution\u002F",[84],[710],{"type":51,"value":701},{"type":45,"tag":123,"props":712,"children":713},{},[714,720,721,727],{"type":45,"tag":187,"props":715,"children":717},{"className":716},[],[718],{"type":51,"value":719},"runFiber()",{"type":51,"value":246},{"type":45,"tag":187,"props":722,"children":724},{"className":723},[],[725],{"type":51,"value":726},"stash()",{"type":51,"value":728},", surviving DO eviction",{"type":45,"tag":96,"props":730,"children":731},{},[732,737,746],{"type":45,"tag":123,"props":733,"children":734},{},[735],{"type":51,"value":736},"Queue",{"type":45,"tag":123,"props":738,"children":739},{},[740],{"type":45,"tag":80,"props":741,"children":744},{"href":742,"rel":743},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fqueue-tasks\u002F",[84],[745],{"type":51,"value":736},{"type":45,"tag":123,"props":747,"children":748},{},[749,751],{"type":51,"value":750},"Built-in FIFO queue, ",{"type":45,"tag":187,"props":752,"children":754},{"className":753},[],[755],{"type":51,"value":756},"queue()",{"type":45,"tag":96,"props":758,"children":759},{},[760,765,774],{"type":45,"tag":123,"props":761,"children":762},{},[763],{"type":51,"value":764},"Retries",{"type":45,"tag":123,"props":766,"children":767},{},[768],{"type":45,"tag":80,"props":769,"children":772},{"href":770,"rel":771},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fretries\u002F",[84],[773],{"type":51,"value":764},{"type":45,"tag":123,"props":775,"children":776},{},[777,783],{"type":45,"tag":187,"props":778,"children":780},{"className":779},[],[781],{"type":51,"value":782},"this.retry()",{"type":51,"value":784},", backoff\u002Fjitter",{"type":45,"tag":96,"props":786,"children":787},{},[788,793,802],{"type":45,"tag":123,"props":789,"children":790},{},[791],{"type":51,"value":792},"Observability",{"type":45,"tag":123,"props":794,"children":795},{},[796],{"type":45,"tag":80,"props":797,"children":800},{"href":798,"rel":799},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fobservability\u002F",[84],[801],{"type":51,"value":792},{"type":45,"tag":123,"props":803,"children":804},{},[805],{"type":51,"value":806},"Diagnostics-channel events",{"type":45,"tag":96,"props":808,"children":809},{},[810,815,824],{"type":45,"tag":123,"props":811,"children":812},{},[813],{"type":51,"value":814},"Push notifications",{"type":45,"tag":123,"props":816,"children":817},{},[818],{"type":45,"tag":80,"props":819,"children":822},{"href":820,"rel":821},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fpush-notifications\u002F",[84],[823],{"type":51,"value":814},{"type":45,"tag":123,"props":825,"children":826},{},[827],{"type":51,"value":828},"Web Push + VAPID from agents",{"type":45,"tag":96,"props":830,"children":831},{},[832,837,846],{"type":45,"tag":123,"props":833,"children":834},{},[835],{"type":51,"value":836},"Webhooks",{"type":45,"tag":123,"props":838,"children":839},{},[840],{"type":45,"tag":80,"props":841,"children":844},{"href":842,"rel":843},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fwebhooks\u002F",[84],[845],{"type":51,"value":836},{"type":45,"tag":123,"props":847,"children":848},{},[849],{"type":51,"value":850},"Receiving external webhooks",{"type":45,"tag":96,"props":852,"children":853},{},[854,859,868],{"type":45,"tag":123,"props":855,"children":856},{},[857],{"type":51,"value":858},"Cross-domain auth",{"type":45,"tag":123,"props":860,"children":861},{},[862],{"type":45,"tag":80,"props":863,"children":866},{"href":864,"rel":865},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fcross-domain-authentication\u002F",[84],[867],{"type":51,"value":858},{"type":45,"tag":123,"props":869,"children":870},{},[871],{"type":51,"value":872},"WebSocket auth, tokens, CORS",{"type":45,"tag":96,"props":874,"children":875},{},[876,881,891],{"type":45,"tag":123,"props":877,"children":878},{},[879],{"type":51,"value":880},"Readonly connections",{"type":45,"tag":123,"props":882,"children":883},{},[884],{"type":45,"tag":80,"props":885,"children":888},{"href":886,"rel":887},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Freadonly-connections\u002F",[84],[889],{"type":51,"value":890},"Readonly",{"type":45,"tag":123,"props":892,"children":893},{},[894],{"type":45,"tag":187,"props":895,"children":897},{"className":896},[],[898],{"type":51,"value":899},"shouldConnectionBeReadonly",{"type":45,"tag":96,"props":901,"children":902},{},[903,908,917],{"type":45,"tag":123,"props":904,"children":905},{},[906],{"type":51,"value":907},"Voice",{"type":45,"tag":123,"props":909,"children":910},{},[911],{"type":45,"tag":80,"props":912,"children":915},{"href":913,"rel":914},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fvoice\u002F",[84],[916],{"type":51,"value":907},{"type":45,"tag":123,"props":918,"children":919},{},[920,922],{"type":51,"value":921},"Experimental STT\u002FTTS, ",{"type":45,"tag":187,"props":923,"children":925},{"className":924},[],[926],{"type":51,"value":927},"withVoice",{"type":45,"tag":96,"props":929,"children":930},{},[931,936,946],{"type":45,"tag":123,"props":932,"children":933},{},[934],{"type":51,"value":935},"Browse the web",{"type":45,"tag":123,"props":937,"children":938},{},[939],{"type":45,"tag":80,"props":940,"children":943},{"href":941,"rel":942},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fbrowse-the-web\u002F",[84],[944],{"type":51,"value":945},"Browser tools",{"type":45,"tag":123,"props":947,"children":948},{},[949],{"type":51,"value":950},"Experimental CDP browser automation",{"type":45,"tag":96,"props":952,"children":953},{},[954,959,968],{"type":45,"tag":123,"props":955,"children":956},{},[957],{"type":51,"value":958},"Think",{"type":45,"tag":123,"props":960,"children":961},{},[962],{"type":45,"tag":80,"props":963,"children":966},{"href":964,"rel":965},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fapi-reference\u002Fthink\u002F",[84],[967],{"type":51,"value":958},{"type":45,"tag":123,"props":969,"children":970},{},[971],{"type":51,"value":972},"Experimental higher-level chat agent class",{"type":45,"tag":96,"props":974,"children":975},{},[976,981,999],{"type":45,"tag":123,"props":977,"children":978},{},[979],{"type":51,"value":980},"Migrations",{"type":45,"tag":123,"props":982,"children":983},{},[984,991,992],{"type":45,"tag":80,"props":985,"children":988},{"href":986,"rel":987},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fguides\u002Fmigration-to-ai-sdk-v5\u002F",[84],[989],{"type":51,"value":990},"AI SDK v5",{"type":51,"value":246},{"type":45,"tag":80,"props":993,"children":996},{"href":994,"rel":995},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fagents\u002Fguides\u002Fmigration-to-ai-sdk-v6\u002F",[84],[997],{"type":51,"value":998},"AI SDK v6",{"type":45,"tag":123,"props":1000,"children":1001},{},[1002,1004],{"type":51,"value":1003},"Upgrading ",{"type":45,"tag":187,"props":1005,"children":1007},{"className":1006},[],[1008],{"type":51,"value":1009},"@cloudflare\u002Fai-chat",{"type":45,"tag":68,"props":1011,"children":1013},{"id":1012},"capabilities",[1014],{"type":51,"value":1015},"Capabilities",{"type":45,"tag":54,"props":1017,"children":1018},{},[1019],{"type":51,"value":1020},"The Agents SDK provides:",{"type":45,"tag":1022,"props":1023,"children":1024},"ul",{},[1025,1041,1059,1076,1090,1112,1126,1141,1156,1166,1182,1203,1225,1241,1250,1259,1274,1289],{"type":45,"tag":1026,"props":1027,"children":1028},"li",{},[1029,1034,1036],{"type":45,"tag":60,"props":1030,"children":1031},{},[1032],{"type":51,"value":1033},"Persistent state",{"type":51,"value":1035}," — SQLite-backed, auto-synced to clients via ",{"type":45,"tag":187,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":51,"value":244},{"type":45,"tag":1026,"props":1042,"children":1043},{},[1044,1049,1051,1057],{"type":45,"tag":60,"props":1045,"children":1046},{},[1047],{"type":51,"value":1048},"Callable RPC",{"type":51,"value":1050}," — ",{"type":45,"tag":187,"props":1052,"children":1054},{"className":1053},[],[1055],{"type":51,"value":1056},"@callable()",{"type":51,"value":1058}," methods invoked over WebSocket",{"type":45,"tag":1026,"props":1060,"children":1061},{},[1062,1066,1068,1074],{"type":45,"tag":60,"props":1063,"children":1064},{},[1065],{"type":51,"value":318},{"type":51,"value":1067}," — One-time, recurring (",{"type":45,"tag":187,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":51,"value":1073},"scheduleEvery",{"type":51,"value":1075},"), and cron tasks",{"type":45,"tag":1026,"props":1077,"children":1078},{},[1079,1083,1085],{"type":45,"tag":60,"props":1080,"children":1081},{},[1082],{"type":51,"value":354},{"type":51,"value":1084}," — Durable multi-step background processing via ",{"type":45,"tag":187,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":51,"value":373},{"type":45,"tag":1026,"props":1091,"children":1092},{},[1093,1097,1098,1103,1105,1110],{"type":45,"tag":60,"props":1094,"children":1095},{},[1096],{"type":51,"value":701},{"type":51,"value":1050},{"type":45,"tag":187,"props":1099,"children":1101},{"className":1100},[],[1102],{"type":51,"value":719},{"type":51,"value":1104}," \u002F ",{"type":45,"tag":187,"props":1106,"children":1108},{"className":1107},[],[1109],{"type":51,"value":726},{"type":51,"value":1111}," for work that survives DO eviction",{"type":45,"tag":1026,"props":1113,"children":1114},{},[1115,1119,1121],{"type":45,"tag":60,"props":1116,"children":1117},{},[1118],{"type":51,"value":736},{"type":51,"value":1120}," — Built-in FIFO queue with retries via ",{"type":45,"tag":187,"props":1122,"children":1124},{"className":1123},[],[1125],{"type":51,"value":756},{"type":45,"tag":1026,"props":1127,"children":1128},{},[1129,1133,1134,1139],{"type":45,"tag":60,"props":1130,"children":1131},{},[1132],{"type":51,"value":764},{"type":51,"value":1050},{"type":45,"tag":187,"props":1135,"children":1137},{"className":1136},[],[1138],{"type":51,"value":782},{"type":51,"value":1140}," with exponential backoff and jitter",{"type":45,"tag":1026,"props":1142,"children":1143},{},[1144,1149,1151],{"type":45,"tag":60,"props":1145,"children":1146},{},[1147],{"type":51,"value":1148},"MCP integration",{"type":51,"value":1150}," — Connect to MCP servers or build your own with ",{"type":45,"tag":187,"props":1152,"children":1154},{"className":1153},[],[1155],{"type":51,"value":618},{"type":45,"tag":1026,"props":1157,"children":1158},{},[1159,1164],{"type":45,"tag":60,"props":1160,"children":1161},{},[1162],{"type":51,"value":1163},"Email handling",{"type":51,"value":1165}," — Receive and reply to emails with secure routing",{"type":45,"tag":1026,"props":1167,"children":1168},{},[1169,1174,1175,1180],{"type":45,"tag":60,"props":1170,"children":1171},{},[1172],{"type":51,"value":1173},"Streaming chat",{"type":51,"value":1050},{"type":45,"tag":187,"props":1176,"children":1178},{"className":1177},[],[1179],{"type":51,"value":423},{"type":51,"value":1181}," with resumable streams, message persistence, tools",{"type":45,"tag":1026,"props":1183,"children":1184},{},[1185,1189,1190,1195,1196,1201],{"type":45,"tag":60,"props":1186,"children":1187},{},[1188],{"type":51,"value":496},{"type":51,"value":1050},{"type":45,"tag":187,"props":1191,"children":1193},{"className":1192},[],[1194],{"type":51,"value":515},{"type":51,"value":246},{"type":45,"tag":187,"props":1197,"children":1199},{"className":1198},[],[1200],{"type":51,"value":522},{"type":51,"value":1202}," for proactive agent turns",{"type":45,"tag":1026,"props":1204,"children":1205},{},[1206,1211,1212,1217,1218,1223],{"type":45,"tag":60,"props":1207,"children":1208},{},[1209],{"type":51,"value":1210},"React hooks",{"type":51,"value":1050},{"type":45,"tag":187,"props":1213,"children":1215},{"className":1214},[],[1216],{"type":51,"value":451},{"type":51,"value":246},{"type":45,"tag":187,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":51,"value":458},{"type":51,"value":1224}," for client apps",{"type":45,"tag":1026,"props":1226,"children":1227},{},[1228,1232,1233,1239],{"type":45,"tag":60,"props":1229,"children":1230},{},[1231],{"type":51,"value":792},{"type":51,"value":1050},{"type":45,"tag":187,"props":1234,"children":1236},{"className":1235},[],[1237],{"type":51,"value":1238},"diagnostics_channel",{"type":51,"value":1240}," events for state, RPC, schedule, lifecycle",{"type":45,"tag":1026,"props":1242,"children":1243},{},[1244,1248],{"type":45,"tag":60,"props":1245,"children":1246},{},[1247],{"type":51,"value":814},{"type":51,"value":1249}," — Web Push + VAPID delivery from agents",{"type":45,"tag":1026,"props":1251,"children":1252},{},[1253,1257],{"type":45,"tag":60,"props":1254,"children":1255},{},[1256],{"type":51,"value":836},{"type":51,"value":1258}," — Receive and verify external webhooks",{"type":45,"tag":1026,"props":1260,"children":1261},{},[1262,1266,1268],{"type":45,"tag":60,"props":1263,"children":1264},{},[1265],{"type":51,"value":907},{"type":51,"value":1267}," (experimental) — STT\u002FTTS via ",{"type":45,"tag":187,"props":1269,"children":1271},{"className":1270},[],[1272],{"type":51,"value":1273},"@cloudflare\u002Fvoice",{"type":45,"tag":1026,"props":1275,"children":1276},{},[1277,1281,1283],{"type":45,"tag":60,"props":1278,"children":1279},{},[1280],{"type":51,"value":945},{"type":51,"value":1282}," (experimental) — CDP-powered browsing via ",{"type":45,"tag":187,"props":1284,"children":1286},{"className":1285},[],[1287],{"type":51,"value":1288},"agents\u002Fbrowser",{"type":45,"tag":1026,"props":1290,"children":1291},{},[1292,1296,1298],{"type":45,"tag":60,"props":1293,"children":1294},{},[1295],{"type":51,"value":958},{"type":51,"value":1297}," (experimental) — Higher-level chat agent via ",{"type":45,"tag":187,"props":1299,"children":1301},{"className":1300},[],[1302],{"type":51,"value":1303},"@cloudflare\u002Fthink",{"type":45,"tag":68,"props":1305,"children":1307},{"id":1306},"first-verify-installation",[1308],{"type":51,"value":1309},"FIRST: Verify Installation",{"type":45,"tag":1311,"props":1312,"children":1317},"pre",{"className":1313,"code":1314,"language":1315,"meta":1316,"style":1316},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm ls agents  # Should show agents package\n","bash","",[1318],{"type":45,"tag":187,"props":1319,"children":1320},{"__ignoreMap":1316},[1321],{"type":45,"tag":1322,"props":1323,"children":1326},"span",{"class":1324,"line":1325},"line",1,[1327,1333,1339,1344],{"type":45,"tag":1322,"props":1328,"children":1330},{"style":1329},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1331],{"type":51,"value":1332},"npm",{"type":45,"tag":1322,"props":1334,"children":1336},{"style":1335},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1337],{"type":51,"value":1338}," ls",{"type":45,"tag":1322,"props":1340,"children":1341},{"style":1335},[1342],{"type":51,"value":1343}," agents",{"type":45,"tag":1322,"props":1345,"children":1347},{"style":1346},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1348],{"type":51,"value":1349},"  # Should show agents package\n",{"type":45,"tag":54,"props":1351,"children":1352},{},[1353],{"type":51,"value":1354},"If not installed:",{"type":45,"tag":1311,"props":1356,"children":1358},{"className":1313,"code":1357,"language":1315,"meta":1316,"style":1316},"npm install agents\n",[1359],{"type":45,"tag":187,"props":1360,"children":1361},{"__ignoreMap":1316},[1362],{"type":45,"tag":1322,"props":1363,"children":1364},{"class":1324,"line":1325},[1365,1369,1374],{"type":45,"tag":1322,"props":1366,"children":1367},{"style":1329},[1368],{"type":51,"value":1332},{"type":45,"tag":1322,"props":1370,"children":1371},{"style":1335},[1372],{"type":51,"value":1373}," install",{"type":45,"tag":1322,"props":1375,"children":1376},{"style":1335},[1377],{"type":51,"value":1378}," agents\n",{"type":45,"tag":54,"props":1380,"children":1381},{},[1382],{"type":51,"value":1383},"For chat agents:",{"type":45,"tag":1311,"props":1385,"children":1387},{"className":1313,"code":1386,"language":1315,"meta":1316,"style":1316},"npm install agents @cloudflare\u002Fai-chat ai @ai-sdk\u002Freact\n",[1388],{"type":45,"tag":187,"props":1389,"children":1390},{"__ignoreMap":1316},[1391],{"type":45,"tag":1322,"props":1392,"children":1393},{"class":1324,"line":1325},[1394,1398,1402,1406,1411,1416],{"type":45,"tag":1322,"props":1395,"children":1396},{"style":1329},[1397],{"type":51,"value":1332},{"type":45,"tag":1322,"props":1399,"children":1400},{"style":1335},[1401],{"type":51,"value":1373},{"type":45,"tag":1322,"props":1403,"children":1404},{"style":1335},[1405],{"type":51,"value":1343},{"type":45,"tag":1322,"props":1407,"children":1408},{"style":1335},[1409],{"type":51,"value":1410}," @cloudflare\u002Fai-chat",{"type":45,"tag":1322,"props":1412,"children":1413},{"style":1335},[1414],{"type":51,"value":1415}," ai",{"type":45,"tag":1322,"props":1417,"children":1418},{"style":1335},[1419],{"type":51,"value":1420}," @ai-sdk\u002Freact\n",{"type":45,"tag":68,"props":1422,"children":1424},{"id":1423},"wrangler-configuration",[1425],{"type":51,"value":1426},"Wrangler Configuration",{"type":45,"tag":1311,"props":1428,"children":1432},{"className":1429,"code":1430,"language":1431,"meta":1316,"style":1316},"language-jsonc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"compatibility_flags\": [\"nodejs_compat\"],\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MyAgent\", \"class_name\": \"MyAgent\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyAgent\"] }]\n}\n","jsonc",[1433],{"type":45,"tag":187,"props":1434,"children":1435},{"__ignoreMap":1316},[1436,1444,1453,1462,1471,1480,1489],{"type":45,"tag":1322,"props":1437,"children":1438},{"class":1324,"line":1325},[1439],{"type":45,"tag":1322,"props":1440,"children":1441},{},[1442],{"type":51,"value":1443},"{\n",{"type":45,"tag":1322,"props":1445,"children":1447},{"class":1324,"line":1446},2,[1448],{"type":45,"tag":1322,"props":1449,"children":1450},{},[1451],{"type":51,"value":1452},"  \"compatibility_flags\": [\"nodejs_compat\"],\n",{"type":45,"tag":1322,"props":1454,"children":1456},{"class":1324,"line":1455},3,[1457],{"type":45,"tag":1322,"props":1458,"children":1459},{},[1460],{"type":51,"value":1461},"  \"durable_objects\": {\n",{"type":45,"tag":1322,"props":1463,"children":1465},{"class":1324,"line":1464},4,[1466],{"type":45,"tag":1322,"props":1467,"children":1468},{},[1469],{"type":51,"value":1470},"    \"bindings\": [{ \"name\": \"MyAgent\", \"class_name\": \"MyAgent\" }]\n",{"type":45,"tag":1322,"props":1472,"children":1474},{"class":1324,"line":1473},5,[1475],{"type":45,"tag":1322,"props":1476,"children":1477},{},[1478],{"type":51,"value":1479},"  },\n",{"type":45,"tag":1322,"props":1481,"children":1483},{"class":1324,"line":1482},6,[1484],{"type":45,"tag":1322,"props":1485,"children":1486},{},[1487],{"type":51,"value":1488},"  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyAgent\"] }]\n",{"type":45,"tag":1322,"props":1490,"children":1492},{"class":1324,"line":1491},7,[1493],{"type":45,"tag":1322,"props":1494,"children":1495},{},[1496],{"type":51,"value":1497},"}\n",{"type":45,"tag":54,"props":1499,"children":1500},{},[1501],{"type":45,"tag":60,"props":1502,"children":1503},{},[1504],{"type":51,"value":1505},"Gotchas:",{"type":45,"tag":1022,"props":1507,"children":1508},{},[1509,1529,1534,1539],{"type":45,"tag":1026,"props":1510,"children":1511},{},[1512,1514,1520,1522,1527],{"type":51,"value":1513},"Do NOT enable ",{"type":45,"tag":187,"props":1515,"children":1517},{"className":1516},[],[1518],{"type":51,"value":1519},"experimentalDecorators",{"type":51,"value":1521}," in tsconfig (breaks ",{"type":45,"tag":187,"props":1523,"children":1525},{"className":1524},[],[1526],{"type":51,"value":308},{"type":51,"value":1528},")",{"type":45,"tag":1026,"props":1530,"children":1531},{},[1532],{"type":51,"value":1533},"Never edit old migrations — always add new tags",{"type":45,"tag":1026,"props":1535,"children":1536},{},[1537],{"type":51,"value":1538},"Each agent class needs its own DO binding + migration entry",{"type":45,"tag":1026,"props":1540,"children":1541},{},[1542,1544,1550],{"type":51,"value":1543},"Add ",{"type":45,"tag":187,"props":1545,"children":1547},{"className":1546},[],[1548],{"type":51,"value":1549},"\"ai\": { \"binding\": \"AI\" }",{"type":51,"value":1551}," for Workers AI",{"type":45,"tag":68,"props":1553,"children":1555},{"id":1554},"agent-class",[1556],{"type":51,"value":1557},"Agent Class",{"type":45,"tag":1311,"props":1559,"children":1563},{"className":1560,"code":1561,"language":1562,"meta":1316,"style":1316},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Agent, routeAgentRequest, callable } from \"agents\";\n\ntype State = { count: number };\n\nexport class Counter extends Agent\u003CEnv, State> {\n  initialState = { count: 0 };\n\n  validateStateChange(nextState: State, source: Connection | \"server\") {\n    if (nextState.count \u003C 0) throw new Error(\"Count cannot be negative\");\n  }\n\n  onStateUpdate(state: State, source: Connection | \"server\") {\n    console.log(\"State updated:\", state);\n  }\n\n  @callable()\n  increment() {\n    this.setState({ count: this.state.count + 1 });\n    return this.state.count;\n  }\n}\n\nexport default {\n  fetch: (req, env) => routeAgentRequest(req, env) ?? new Response(\"Not found\", { status: 404 })\n};\n","typescript",[1564],{"type":45,"tag":187,"props":1565,"children":1566},{"__ignoreMap":1316},[1567,1636,1645,1689,1696,1751,1785,1792,1864,1947,1956,1964,2030,2082,2090,2098,2117,2135,2204,2233,2241,2249,2257,2274,2394],{"type":45,"tag":1322,"props":1568,"children":1569},{"class":1324,"line":1325},[1570,1576,1582,1588,1593,1598,1602,1607,1612,1617,1622,1626,1631],{"type":45,"tag":1322,"props":1571,"children":1573},{"style":1572},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[1574],{"type":51,"value":1575},"import",{"type":45,"tag":1322,"props":1577,"children":1579},{"style":1578},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1580],{"type":51,"value":1581}," {",{"type":45,"tag":1322,"props":1583,"children":1585},{"style":1584},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1586],{"type":51,"value":1587}," Agent",{"type":45,"tag":1322,"props":1589,"children":1590},{"style":1578},[1591],{"type":51,"value":1592},",",{"type":45,"tag":1322,"props":1594,"children":1595},{"style":1584},[1596],{"type":51,"value":1597}," routeAgentRequest",{"type":45,"tag":1322,"props":1599,"children":1600},{"style":1578},[1601],{"type":51,"value":1592},{"type":45,"tag":1322,"props":1603,"children":1604},{"style":1584},[1605],{"type":51,"value":1606}," callable",{"type":45,"tag":1322,"props":1608,"children":1609},{"style":1578},[1610],{"type":51,"value":1611}," }",{"type":45,"tag":1322,"props":1613,"children":1614},{"style":1572},[1615],{"type":51,"value":1616}," from",{"type":45,"tag":1322,"props":1618,"children":1619},{"style":1578},[1620],{"type":51,"value":1621}," \"",{"type":45,"tag":1322,"props":1623,"children":1624},{"style":1335},[1625],{"type":51,"value":25},{"type":45,"tag":1322,"props":1627,"children":1628},{"style":1578},[1629],{"type":51,"value":1630},"\"",{"type":45,"tag":1322,"props":1632,"children":1633},{"style":1578},[1634],{"type":51,"value":1635},";\n",{"type":45,"tag":1322,"props":1637,"children":1638},{"class":1324,"line":1446},[1639],{"type":45,"tag":1322,"props":1640,"children":1642},{"emptyLinePlaceholder":1641},true,[1643],{"type":51,"value":1644},"\n",{"type":45,"tag":1322,"props":1646,"children":1647},{"class":1324,"line":1455},[1648,1654,1659,1664,1668,1674,1679,1684],{"type":45,"tag":1322,"props":1649,"children":1651},{"style":1650},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1652],{"type":51,"value":1653},"type",{"type":45,"tag":1322,"props":1655,"children":1656},{"style":1329},[1657],{"type":51,"value":1658}," State",{"type":45,"tag":1322,"props":1660,"children":1661},{"style":1578},[1662],{"type":51,"value":1663}," =",{"type":45,"tag":1322,"props":1665,"children":1666},{"style":1578},[1667],{"type":51,"value":1581},{"type":45,"tag":1322,"props":1669,"children":1671},{"style":1670},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1672],{"type":51,"value":1673}," count",{"type":45,"tag":1322,"props":1675,"children":1676},{"style":1578},[1677],{"type":51,"value":1678},":",{"type":45,"tag":1322,"props":1680,"children":1681},{"style":1329},[1682],{"type":51,"value":1683}," number",{"type":45,"tag":1322,"props":1685,"children":1686},{"style":1578},[1687],{"type":51,"value":1688}," };\n",{"type":45,"tag":1322,"props":1690,"children":1691},{"class":1324,"line":1464},[1692],{"type":45,"tag":1322,"props":1693,"children":1694},{"emptyLinePlaceholder":1641},[1695],{"type":51,"value":1644},{"type":45,"tag":1322,"props":1697,"children":1698},{"class":1324,"line":1473},[1699,1704,1709,1714,1719,1723,1728,1733,1737,1741,1746],{"type":45,"tag":1322,"props":1700,"children":1701},{"style":1572},[1702],{"type":51,"value":1703},"export",{"type":45,"tag":1322,"props":1705,"children":1706},{"style":1650},[1707],{"type":51,"value":1708}," class",{"type":45,"tag":1322,"props":1710,"children":1711},{"style":1329},[1712],{"type":51,"value":1713}," Counter",{"type":45,"tag":1322,"props":1715,"children":1716},{"style":1650},[1717],{"type":51,"value":1718}," extends",{"type":45,"tag":1322,"props":1720,"children":1721},{"style":1329},[1722],{"type":51,"value":1587},{"type":45,"tag":1322,"props":1724,"children":1725},{"style":1578},[1726],{"type":51,"value":1727},"\u003C",{"type":45,"tag":1322,"props":1729,"children":1730},{"style":1329},[1731],{"type":51,"value":1732},"Env",{"type":45,"tag":1322,"props":1734,"children":1735},{"style":1578},[1736],{"type":51,"value":1592},{"type":45,"tag":1322,"props":1738,"children":1739},{"style":1329},[1740],{"type":51,"value":1658},{"type":45,"tag":1322,"props":1742,"children":1743},{"style":1578},[1744],{"type":51,"value":1745},">",{"type":45,"tag":1322,"props":1747,"children":1748},{"style":1578},[1749],{"type":51,"value":1750}," {\n",{"type":45,"tag":1322,"props":1752,"children":1753},{"class":1324,"line":1482},[1754,1759,1763,1767,1771,1775,1781],{"type":45,"tag":1322,"props":1755,"children":1756},{"style":1670},[1757],{"type":51,"value":1758},"  initialState",{"type":45,"tag":1322,"props":1760,"children":1761},{"style":1578},[1762],{"type":51,"value":1663},{"type":45,"tag":1322,"props":1764,"children":1765},{"style":1578},[1766],{"type":51,"value":1581},{"type":45,"tag":1322,"props":1768,"children":1769},{"style":1670},[1770],{"type":51,"value":1673},{"type":45,"tag":1322,"props":1772,"children":1773},{"style":1578},[1774],{"type":51,"value":1678},{"type":45,"tag":1322,"props":1776,"children":1778},{"style":1777},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1779],{"type":51,"value":1780}," 0",{"type":45,"tag":1322,"props":1782,"children":1783},{"style":1578},[1784],{"type":51,"value":1688},{"type":45,"tag":1322,"props":1786,"children":1787},{"class":1324,"line":1491},[1788],{"type":45,"tag":1322,"props":1789,"children":1790},{"emptyLinePlaceholder":1641},[1791],{"type":51,"value":1644},{"type":45,"tag":1322,"props":1793,"children":1795},{"class":1324,"line":1794},8,[1796,1801,1806,1812,1816,1820,1824,1829,1833,1838,1843,1847,1852,1856,1860],{"type":45,"tag":1322,"props":1797,"children":1798},{"style":1670},[1799],{"type":51,"value":1800},"  validateStateChange",{"type":45,"tag":1322,"props":1802,"children":1803},{"style":1578},[1804],{"type":51,"value":1805},"(",{"type":45,"tag":1322,"props":1807,"children":1809},{"style":1808},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1810],{"type":51,"value":1811},"nextState",{"type":45,"tag":1322,"props":1813,"children":1814},{"style":1578},[1815],{"type":51,"value":1678},{"type":45,"tag":1322,"props":1817,"children":1818},{"style":1329},[1819],{"type":51,"value":1658},{"type":45,"tag":1322,"props":1821,"children":1822},{"style":1578},[1823],{"type":51,"value":1592},{"type":45,"tag":1322,"props":1825,"children":1826},{"style":1808},[1827],{"type":51,"value":1828}," source",{"type":45,"tag":1322,"props":1830,"children":1831},{"style":1578},[1832],{"type":51,"value":1678},{"type":45,"tag":1322,"props":1834,"children":1835},{"style":1329},[1836],{"type":51,"value":1837}," Connection",{"type":45,"tag":1322,"props":1839,"children":1840},{"style":1578},[1841],{"type":51,"value":1842}," |",{"type":45,"tag":1322,"props":1844,"children":1845},{"style":1578},[1846],{"type":51,"value":1621},{"type":45,"tag":1322,"props":1848,"children":1849},{"style":1335},[1850],{"type":51,"value":1851},"server",{"type":45,"tag":1322,"props":1853,"children":1854},{"style":1578},[1855],{"type":51,"value":1630},{"type":45,"tag":1322,"props":1857,"children":1858},{"style":1578},[1859],{"type":51,"value":1528},{"type":45,"tag":1322,"props":1861,"children":1862},{"style":1578},[1863],{"type":51,"value":1750},{"type":45,"tag":1322,"props":1865,"children":1867},{"class":1324,"line":1866},9,[1868,1873,1878,1882,1887,1892,1897,1901,1906,1911,1916,1922,1926,1930,1935,1939,1943],{"type":45,"tag":1322,"props":1869,"children":1870},{"style":1572},[1871],{"type":51,"value":1872},"    if",{"type":45,"tag":1322,"props":1874,"children":1875},{"style":1670},[1876],{"type":51,"value":1877}," (",{"type":45,"tag":1322,"props":1879,"children":1880},{"style":1584},[1881],{"type":51,"value":1811},{"type":45,"tag":1322,"props":1883,"children":1884},{"style":1578},[1885],{"type":51,"value":1886},".",{"type":45,"tag":1322,"props":1888,"children":1889},{"style":1584},[1890],{"type":51,"value":1891},"count",{"type":45,"tag":1322,"props":1893,"children":1894},{"style":1578},[1895],{"type":51,"value":1896}," \u003C",{"type":45,"tag":1322,"props":1898,"children":1899},{"style":1777},[1900],{"type":51,"value":1780},{"type":45,"tag":1322,"props":1902,"children":1903},{"style":1670},[1904],{"type":51,"value":1905},") ",{"type":45,"tag":1322,"props":1907,"children":1908},{"style":1572},[1909],{"type":51,"value":1910},"throw",{"type":45,"tag":1322,"props":1912,"children":1913},{"style":1578},[1914],{"type":51,"value":1915}," new",{"type":45,"tag":1322,"props":1917,"children":1919},{"style":1918},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[1920],{"type":51,"value":1921}," Error",{"type":45,"tag":1322,"props":1923,"children":1924},{"style":1670},[1925],{"type":51,"value":1805},{"type":45,"tag":1322,"props":1927,"children":1928},{"style":1578},[1929],{"type":51,"value":1630},{"type":45,"tag":1322,"props":1931,"children":1932},{"style":1335},[1933],{"type":51,"value":1934},"Count cannot be negative",{"type":45,"tag":1322,"props":1936,"children":1937},{"style":1578},[1938],{"type":51,"value":1630},{"type":45,"tag":1322,"props":1940,"children":1941},{"style":1670},[1942],{"type":51,"value":1528},{"type":45,"tag":1322,"props":1944,"children":1945},{"style":1578},[1946],{"type":51,"value":1635},{"type":45,"tag":1322,"props":1948,"children":1950},{"class":1324,"line":1949},10,[1951],{"type":45,"tag":1322,"props":1952,"children":1953},{"style":1578},[1954],{"type":51,"value":1955},"  }\n",{"type":45,"tag":1322,"props":1957,"children":1959},{"class":1324,"line":1958},11,[1960],{"type":45,"tag":1322,"props":1961,"children":1962},{"emptyLinePlaceholder":1641},[1963],{"type":51,"value":1644},{"type":45,"tag":1322,"props":1965,"children":1967},{"class":1324,"line":1966},12,[1968,1973,1977,1982,1986,1990,1994,1998,2002,2006,2010,2014,2018,2022,2026],{"type":45,"tag":1322,"props":1969,"children":1970},{"style":1670},[1971],{"type":51,"value":1972},"  onStateUpdate",{"type":45,"tag":1322,"props":1974,"children":1975},{"style":1578},[1976],{"type":51,"value":1805},{"type":45,"tag":1322,"props":1978,"children":1979},{"style":1808},[1980],{"type":51,"value":1981},"state",{"type":45,"tag":1322,"props":1983,"children":1984},{"style":1578},[1985],{"type":51,"value":1678},{"type":45,"tag":1322,"props":1987,"children":1988},{"style":1329},[1989],{"type":51,"value":1658},{"type":45,"tag":1322,"props":1991,"children":1992},{"style":1578},[1993],{"type":51,"value":1592},{"type":45,"tag":1322,"props":1995,"children":1996},{"style":1808},[1997],{"type":51,"value":1828},{"type":45,"tag":1322,"props":1999,"children":2000},{"style":1578},[2001],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2003,"children":2004},{"style":1329},[2005],{"type":51,"value":1837},{"type":45,"tag":1322,"props":2007,"children":2008},{"style":1578},[2009],{"type":51,"value":1842},{"type":45,"tag":1322,"props":2011,"children":2012},{"style":1578},[2013],{"type":51,"value":1621},{"type":45,"tag":1322,"props":2015,"children":2016},{"style":1335},[2017],{"type":51,"value":1851},{"type":45,"tag":1322,"props":2019,"children":2020},{"style":1578},[2021],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2023,"children":2024},{"style":1578},[2025],{"type":51,"value":1528},{"type":45,"tag":1322,"props":2027,"children":2028},{"style":1578},[2029],{"type":51,"value":1750},{"type":45,"tag":1322,"props":2031,"children":2033},{"class":1324,"line":2032},13,[2034,2039,2043,2048,2052,2056,2061,2065,2069,2074,2078],{"type":45,"tag":1322,"props":2035,"children":2036},{"style":1584},[2037],{"type":51,"value":2038},"    console",{"type":45,"tag":1322,"props":2040,"children":2041},{"style":1578},[2042],{"type":51,"value":1886},{"type":45,"tag":1322,"props":2044,"children":2045},{"style":1918},[2046],{"type":51,"value":2047},"log",{"type":45,"tag":1322,"props":2049,"children":2050},{"style":1670},[2051],{"type":51,"value":1805},{"type":45,"tag":1322,"props":2053,"children":2054},{"style":1578},[2055],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2057,"children":2058},{"style":1335},[2059],{"type":51,"value":2060},"State updated:",{"type":45,"tag":1322,"props":2062,"children":2063},{"style":1578},[2064],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2066,"children":2067},{"style":1578},[2068],{"type":51,"value":1592},{"type":45,"tag":1322,"props":2070,"children":2071},{"style":1584},[2072],{"type":51,"value":2073}," state",{"type":45,"tag":1322,"props":2075,"children":2076},{"style":1670},[2077],{"type":51,"value":1528},{"type":45,"tag":1322,"props":2079,"children":2080},{"style":1578},[2081],{"type":51,"value":1635},{"type":45,"tag":1322,"props":2083,"children":2085},{"class":1324,"line":2084},14,[2086],{"type":45,"tag":1322,"props":2087,"children":2088},{"style":1578},[2089],{"type":51,"value":1955},{"type":45,"tag":1322,"props":2091,"children":2093},{"class":1324,"line":2092},15,[2094],{"type":45,"tag":1322,"props":2095,"children":2096},{"emptyLinePlaceholder":1641},[2097],{"type":51,"value":1644},{"type":45,"tag":1322,"props":2099,"children":2101},{"class":1324,"line":2100},16,[2102,2107,2112],{"type":45,"tag":1322,"props":2103,"children":2104},{"style":1578},[2105],{"type":51,"value":2106},"  @",{"type":45,"tag":1322,"props":2108,"children":2109},{"style":1918},[2110],{"type":51,"value":2111},"callable",{"type":45,"tag":1322,"props":2113,"children":2114},{"style":1584},[2115],{"type":51,"value":2116},"()\n",{"type":45,"tag":1322,"props":2118,"children":2120},{"class":1324,"line":2119},17,[2121,2126,2131],{"type":45,"tag":1322,"props":2122,"children":2123},{"style":1670},[2124],{"type":51,"value":2125},"  increment",{"type":45,"tag":1322,"props":2127,"children":2128},{"style":1578},[2129],{"type":51,"value":2130},"()",{"type":45,"tag":1322,"props":2132,"children":2133},{"style":1578},[2134],{"type":51,"value":1750},{"type":45,"tag":1322,"props":2136,"children":2138},{"class":1324,"line":2137},18,[2139,2144,2148,2152,2157,2161,2165,2170,2174,2178,2182,2187,2192,2196,2200],{"type":45,"tag":1322,"props":2140,"children":2141},{"style":1578},[2142],{"type":51,"value":2143},"    this.",{"type":45,"tag":1322,"props":2145,"children":2146},{"style":1918},[2147],{"type":51,"value":244},{"type":45,"tag":1322,"props":2149,"children":2150},{"style":1670},[2151],{"type":51,"value":1805},{"type":45,"tag":1322,"props":2153,"children":2154},{"style":1578},[2155],{"type":51,"value":2156},"{",{"type":45,"tag":1322,"props":2158,"children":2159},{"style":1670},[2160],{"type":51,"value":1673},{"type":45,"tag":1322,"props":2162,"children":2163},{"style":1578},[2164],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2166,"children":2167},{"style":1578},[2168],{"type":51,"value":2169}," this.",{"type":45,"tag":1322,"props":2171,"children":2172},{"style":1584},[2173],{"type":51,"value":1981},{"type":45,"tag":1322,"props":2175,"children":2176},{"style":1578},[2177],{"type":51,"value":1886},{"type":45,"tag":1322,"props":2179,"children":2180},{"style":1584},[2181],{"type":51,"value":1891},{"type":45,"tag":1322,"props":2183,"children":2184},{"style":1578},[2185],{"type":51,"value":2186}," +",{"type":45,"tag":1322,"props":2188,"children":2189},{"style":1777},[2190],{"type":51,"value":2191}," 1",{"type":45,"tag":1322,"props":2193,"children":2194},{"style":1578},[2195],{"type":51,"value":1611},{"type":45,"tag":1322,"props":2197,"children":2198},{"style":1670},[2199],{"type":51,"value":1528},{"type":45,"tag":1322,"props":2201,"children":2202},{"style":1578},[2203],{"type":51,"value":1635},{"type":45,"tag":1322,"props":2205,"children":2207},{"class":1324,"line":2206},19,[2208,2213,2217,2221,2225,2229],{"type":45,"tag":1322,"props":2209,"children":2210},{"style":1572},[2211],{"type":51,"value":2212},"    return",{"type":45,"tag":1322,"props":2214,"children":2215},{"style":1578},[2216],{"type":51,"value":2169},{"type":45,"tag":1322,"props":2218,"children":2219},{"style":1584},[2220],{"type":51,"value":1981},{"type":45,"tag":1322,"props":2222,"children":2223},{"style":1578},[2224],{"type":51,"value":1886},{"type":45,"tag":1322,"props":2226,"children":2227},{"style":1584},[2228],{"type":51,"value":1891},{"type":45,"tag":1322,"props":2230,"children":2231},{"style":1578},[2232],{"type":51,"value":1635},{"type":45,"tag":1322,"props":2234,"children":2236},{"class":1324,"line":2235},20,[2237],{"type":45,"tag":1322,"props":2238,"children":2239},{"style":1578},[2240],{"type":51,"value":1955},{"type":45,"tag":1322,"props":2242,"children":2244},{"class":1324,"line":2243},21,[2245],{"type":45,"tag":1322,"props":2246,"children":2247},{"style":1578},[2248],{"type":51,"value":1497},{"type":45,"tag":1322,"props":2250,"children":2252},{"class":1324,"line":2251},22,[2253],{"type":45,"tag":1322,"props":2254,"children":2255},{"emptyLinePlaceholder":1641},[2256],{"type":51,"value":1644},{"type":45,"tag":1322,"props":2258,"children":2260},{"class":1324,"line":2259},23,[2261,2265,2270],{"type":45,"tag":1322,"props":2262,"children":2263},{"style":1572},[2264],{"type":51,"value":1703},{"type":45,"tag":1322,"props":2266,"children":2267},{"style":1572},[2268],{"type":51,"value":2269}," default",{"type":45,"tag":1322,"props":2271,"children":2272},{"style":1578},[2273],{"type":51,"value":1750},{"type":45,"tag":1322,"props":2275,"children":2277},{"class":1324,"line":2276},24,[2278,2283,2287,2291,2296,2300,2305,2309,2314,2318,2323,2327,2332,2337,2341,2346,2350,2354,2359,2363,2367,2371,2376,2380,2385,2389],{"type":45,"tag":1322,"props":2279,"children":2280},{"style":1918},[2281],{"type":51,"value":2282},"  fetch",{"type":45,"tag":1322,"props":2284,"children":2285},{"style":1578},[2286],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2288,"children":2289},{"style":1578},[2290],{"type":51,"value":1877},{"type":45,"tag":1322,"props":2292,"children":2293},{"style":1808},[2294],{"type":51,"value":2295},"req",{"type":45,"tag":1322,"props":2297,"children":2298},{"style":1578},[2299],{"type":51,"value":1592},{"type":45,"tag":1322,"props":2301,"children":2302},{"style":1808},[2303],{"type":51,"value":2304}," env",{"type":45,"tag":1322,"props":2306,"children":2307},{"style":1578},[2308],{"type":51,"value":1528},{"type":45,"tag":1322,"props":2310,"children":2311},{"style":1650},[2312],{"type":51,"value":2313}," =>",{"type":45,"tag":1322,"props":2315,"children":2316},{"style":1918},[2317],{"type":51,"value":1597},{"type":45,"tag":1322,"props":2319,"children":2320},{"style":1584},[2321],{"type":51,"value":2322},"(req",{"type":45,"tag":1322,"props":2324,"children":2325},{"style":1578},[2326],{"type":51,"value":1592},{"type":45,"tag":1322,"props":2328,"children":2329},{"style":1584},[2330],{"type":51,"value":2331}," env) ",{"type":45,"tag":1322,"props":2333,"children":2334},{"style":1578},[2335],{"type":51,"value":2336},"??",{"type":45,"tag":1322,"props":2338,"children":2339},{"style":1578},[2340],{"type":51,"value":1915},{"type":45,"tag":1322,"props":2342,"children":2343},{"style":1918},[2344],{"type":51,"value":2345}," Response",{"type":45,"tag":1322,"props":2347,"children":2348},{"style":1584},[2349],{"type":51,"value":1805},{"type":45,"tag":1322,"props":2351,"children":2352},{"style":1578},[2353],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2355,"children":2356},{"style":1335},[2357],{"type":51,"value":2358},"Not found",{"type":45,"tag":1322,"props":2360,"children":2361},{"style":1578},[2362],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2364,"children":2365},{"style":1578},[2366],{"type":51,"value":1592},{"type":45,"tag":1322,"props":2368,"children":2369},{"style":1578},[2370],{"type":51,"value":1581},{"type":45,"tag":1322,"props":2372,"children":2373},{"style":1670},[2374],{"type":51,"value":2375}," status",{"type":45,"tag":1322,"props":2377,"children":2378},{"style":1578},[2379],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2381,"children":2382},{"style":1777},[2383],{"type":51,"value":2384}," 404",{"type":45,"tag":1322,"props":2386,"children":2387},{"style":1578},[2388],{"type":51,"value":1611},{"type":45,"tag":1322,"props":2390,"children":2391},{"style":1584},[2392],{"type":51,"value":2393},")\n",{"type":45,"tag":1322,"props":2395,"children":2397},{"class":1324,"line":2396},25,[2398],{"type":45,"tag":1322,"props":2399,"children":2400},{"style":1578},[2401],{"type":51,"value":2402},"};\n",{"type":45,"tag":68,"props":2404,"children":2406},{"id":2405},"routing",[2407],{"type":51,"value":262},{"type":45,"tag":54,"props":2409,"children":2410},{},[2411,2413,2419],{"type":51,"value":2412},"Requests route to ",{"type":45,"tag":187,"props":2414,"children":2416},{"className":2415},[],[2417],{"type":51,"value":2418},"\u002Fagents\u002F{agent-name}\u002F{instance-name}",{"type":51,"value":1678},{"type":45,"tag":88,"props":2421,"children":2422},{},[2423,2439],{"type":45,"tag":92,"props":2424,"children":2425},{},[2426],{"type":45,"tag":96,"props":2427,"children":2428},{},[2429,2434],{"type":45,"tag":100,"props":2430,"children":2431},{},[2432],{"type":51,"value":2433},"Class",{"type":45,"tag":100,"props":2435,"children":2436},{},[2437],{"type":51,"value":2438},"URL",{"type":45,"tag":116,"props":2440,"children":2441},{},[2442,2463],{"type":45,"tag":96,"props":2443,"children":2444},{},[2445,2454],{"type":45,"tag":123,"props":2446,"children":2447},{},[2448],{"type":45,"tag":187,"props":2449,"children":2451},{"className":2450},[],[2452],{"type":51,"value":2453},"Counter",{"type":45,"tag":123,"props":2455,"children":2456},{},[2457],{"type":45,"tag":187,"props":2458,"children":2460},{"className":2459},[],[2461],{"type":51,"value":2462},"\u002Fagents\u002Fcounter\u002Fuser-123",{"type":45,"tag":96,"props":2464,"children":2465},{},[2466,2475],{"type":45,"tag":123,"props":2467,"children":2468},{},[2469],{"type":45,"tag":187,"props":2470,"children":2472},{"className":2471},[],[2473],{"type":51,"value":2474},"ChatRoom",{"type":45,"tag":123,"props":2476,"children":2477},{},[2478],{"type":45,"tag":187,"props":2479,"children":2481},{"className":2480},[],[2482],{"type":51,"value":2483},"\u002Fagents\u002Fchat-room\u002Flobby",{"type":45,"tag":54,"props":2485,"children":2486},{},[2487,2489],{"type":51,"value":2488},"Client: ",{"type":45,"tag":187,"props":2490,"children":2492},{"className":2491},[],[2493],{"type":51,"value":2494},"useAgent({ agent: \"Counter\", name: \"user-123\" })",{"type":45,"tag":54,"props":2496,"children":2497},{},[2498,2500,2506,2508,2514],{"type":51,"value":2499},"Custom routing: use ",{"type":45,"tag":187,"props":2501,"children":2503},{"className":2502},[],[2504],{"type":51,"value":2505},"getAgentByName(env.MyAgent, \"instance-id\")",{"type":51,"value":2507}," then ",{"type":45,"tag":187,"props":2509,"children":2511},{"className":2510},[],[2512],{"type":51,"value":2513},"agent.fetch(request)",{"type":51,"value":1886},{"type":45,"tag":68,"props":2516,"children":2518},{"id":2517},"core-apis",[2519],{"type":51,"value":2520},"Core APIs",{"type":45,"tag":88,"props":2522,"children":2523},{},[2524,2540],{"type":45,"tag":92,"props":2525,"children":2526},{},[2527],{"type":45,"tag":96,"props":2528,"children":2529},{},[2530,2535],{"type":45,"tag":100,"props":2531,"children":2532},{},[2533],{"type":51,"value":2534},"Task",{"type":45,"tag":100,"props":2536,"children":2537},{},[2538],{"type":51,"value":2539},"API",{"type":45,"tag":116,"props":2541,"children":2542},{},[2543,2560,2577,2594,2611,2628,2645,2662,2679,2696,2713,2730,2747,2764],{"type":45,"tag":96,"props":2544,"children":2545},{},[2546,2551],{"type":45,"tag":123,"props":2547,"children":2548},{},[2549],{"type":51,"value":2550},"Read state",{"type":45,"tag":123,"props":2552,"children":2553},{},[2554],{"type":45,"tag":187,"props":2555,"children":2557},{"className":2556},[],[2558],{"type":51,"value":2559},"this.state.count",{"type":45,"tag":96,"props":2561,"children":2562},{},[2563,2568],{"type":45,"tag":123,"props":2564,"children":2565},{},[2566],{"type":51,"value":2567},"Write state",{"type":45,"tag":123,"props":2569,"children":2570},{},[2571],{"type":45,"tag":187,"props":2572,"children":2574},{"className":2573},[],[2575],{"type":51,"value":2576},"this.setState({ count: 1 })",{"type":45,"tag":96,"props":2578,"children":2579},{},[2580,2585],{"type":45,"tag":123,"props":2581,"children":2582},{},[2583],{"type":51,"value":2584},"SQL query",{"type":45,"tag":123,"props":2586,"children":2587},{},[2588],{"type":45,"tag":187,"props":2589,"children":2591},{"className":2590},[],[2592],{"type":51,"value":2593},"this.sql`SELECT * FROM users WHERE id = ${id}`",{"type":45,"tag":96,"props":2595,"children":2596},{},[2597,2602],{"type":45,"tag":123,"props":2598,"children":2599},{},[2600],{"type":51,"value":2601},"Schedule (delay)",{"type":45,"tag":123,"props":2603,"children":2604},{},[2605],{"type":45,"tag":187,"props":2606,"children":2608},{"className":2607},[],[2609],{"type":51,"value":2610},"await this.schedule(60, \"task\", payload)",{"type":45,"tag":96,"props":2612,"children":2613},{},[2614,2619],{"type":45,"tag":123,"props":2615,"children":2616},{},[2617],{"type":51,"value":2618},"Schedule (cron)",{"type":45,"tag":123,"props":2620,"children":2621},{},[2622],{"type":45,"tag":187,"props":2623,"children":2625},{"className":2624},[],[2626],{"type":51,"value":2627},"await this.schedule(\"0 * * * *\", \"task\", payload)",{"type":45,"tag":96,"props":2629,"children":2630},{},[2631,2636],{"type":45,"tag":123,"props":2632,"children":2633},{},[2634],{"type":51,"value":2635},"Schedule (interval)",{"type":45,"tag":123,"props":2637,"children":2638},{},[2639],{"type":45,"tag":187,"props":2640,"children":2642},{"className":2641},[],[2643],{"type":51,"value":2644},"await this.scheduleEvery(30, \"poll\")",{"type":45,"tag":96,"props":2646,"children":2647},{},[2648,2653],{"type":45,"tag":123,"props":2649,"children":2650},{},[2651],{"type":51,"value":2652},"RPC method",{"type":45,"tag":123,"props":2654,"children":2655},{},[2656],{"type":45,"tag":187,"props":2657,"children":2659},{"className":2658},[],[2660],{"type":51,"value":2661},"@callable() myMethod() { ... }",{"type":45,"tag":96,"props":2663,"children":2664},{},[2665,2670],{"type":45,"tag":123,"props":2666,"children":2667},{},[2668],{"type":51,"value":2669},"Streaming RPC",{"type":45,"tag":123,"props":2671,"children":2672},{},[2673],{"type":45,"tag":187,"props":2674,"children":2676},{"className":2675},[],[2677],{"type":51,"value":2678},"@callable({ streaming: true }) stream(res) { ... }",{"type":45,"tag":96,"props":2680,"children":2681},{},[2682,2687],{"type":45,"tag":123,"props":2683,"children":2684},{},[2685],{"type":51,"value":2686},"Start workflow",{"type":45,"tag":123,"props":2688,"children":2689},{},[2690],{"type":45,"tag":187,"props":2691,"children":2693},{"className":2692},[],[2694],{"type":51,"value":2695},"await this.runWorkflow(\"ProcessingWorkflow\", params)",{"type":45,"tag":96,"props":2697,"children":2698},{},[2699,2704],{"type":45,"tag":123,"props":2700,"children":2701},{},[2702],{"type":51,"value":2703},"Durable fiber",{"type":45,"tag":123,"props":2705,"children":2706},{},[2707],{"type":45,"tag":187,"props":2708,"children":2710},{"className":2709},[],[2711],{"type":51,"value":2712},"await this.runFiber(\"name\", async (ctx) => { ... })",{"type":45,"tag":96,"props":2714,"children":2715},{},[2716,2721],{"type":45,"tag":123,"props":2717,"children":2718},{},[2719],{"type":51,"value":2720},"Enqueue work",{"type":45,"tag":123,"props":2722,"children":2723},{},[2724],{"type":45,"tag":187,"props":2725,"children":2727},{"className":2726},[],[2728],{"type":51,"value":2729},"this.queue(\"handler\", payload)",{"type":45,"tag":96,"props":2731,"children":2732},{},[2733,2738],{"type":45,"tag":123,"props":2734,"children":2735},{},[2736],{"type":51,"value":2737},"Retry with backoff",{"type":45,"tag":123,"props":2739,"children":2740},{},[2741],{"type":45,"tag":187,"props":2742,"children":2744},{"className":2743},[],[2745],{"type":51,"value":2746},"await this.retry(fn, { maxAttempts: 5 })",{"type":45,"tag":96,"props":2748,"children":2749},{},[2750,2755],{"type":45,"tag":123,"props":2751,"children":2752},{},[2753],{"type":51,"value":2754},"Broadcast to clients",{"type":45,"tag":123,"props":2756,"children":2757},{},[2758],{"type":45,"tag":187,"props":2759,"children":2761},{"className":2760},[],[2762],{"type":51,"value":2763},"this.broadcast(message)",{"type":45,"tag":96,"props":2765,"children":2766},{},[2767,2772],{"type":45,"tag":123,"props":2768,"children":2769},{},[2770],{"type":51,"value":2771},"Get connections",{"type":45,"tag":123,"props":2773,"children":2774},{},[2775],{"type":45,"tag":187,"props":2776,"children":2778},{"className":2777},[],[2779],{"type":51,"value":2780},"this.getConnections(tag?)",{"type":45,"tag":68,"props":2782,"children":2784},{"id":2783},"react-client",[2785],{"type":51,"value":2786},"React Client",{"type":45,"tag":1311,"props":2788,"children":2792},{"className":2789,"code":2790,"language":2791,"meta":1316,"style":1316},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { useAgent } from \"agents\u002Freact\";\n\nfunction App() {\n  const [state, setLocalState] = useState({ count: 0 });\n\n  const agent = useAgent({\n    agent: \"Counter\",\n    name: \"my-instance\",\n    onStateUpdate: (newState) => setLocalState(newState),\n    onIdentity: (name, agentType) => console.log(`Connected to ${name}`)\n  });\n\n  return (\n    \u003Cbutton onClick={() => agent.setState({ count: state.count + 1 })}>\n      Count: {state.count}\n    \u003C\u002Fbutton>\n  );\n}\n","tsx",[2793],{"type":45,"tag":187,"props":2794,"children":2795},{"__ignoreMap":1316},[2796,2837,2844,2865,2937,2944,2972,3001,3030,3079,3162,3178,3185,3198,3288,3316,3333,3345],{"type":45,"tag":1322,"props":2797,"children":2798},{"class":1324,"line":1325},[2799,2803,2807,2812,2816,2820,2824,2829,2833],{"type":45,"tag":1322,"props":2800,"children":2801},{"style":1572},[2802],{"type":51,"value":1575},{"type":45,"tag":1322,"props":2804,"children":2805},{"style":1578},[2806],{"type":51,"value":1581},{"type":45,"tag":1322,"props":2808,"children":2809},{"style":1584},[2810],{"type":51,"value":2811}," useAgent",{"type":45,"tag":1322,"props":2813,"children":2814},{"style":1578},[2815],{"type":51,"value":1611},{"type":45,"tag":1322,"props":2817,"children":2818},{"style":1572},[2819],{"type":51,"value":1616},{"type":45,"tag":1322,"props":2821,"children":2822},{"style":1578},[2823],{"type":51,"value":1621},{"type":45,"tag":1322,"props":2825,"children":2826},{"style":1335},[2827],{"type":51,"value":2828},"agents\u002Freact",{"type":45,"tag":1322,"props":2830,"children":2831},{"style":1578},[2832],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2834,"children":2835},{"style":1578},[2836],{"type":51,"value":1635},{"type":45,"tag":1322,"props":2838,"children":2839},{"class":1324,"line":1446},[2840],{"type":45,"tag":1322,"props":2841,"children":2842},{"emptyLinePlaceholder":1641},[2843],{"type":51,"value":1644},{"type":45,"tag":1322,"props":2845,"children":2846},{"class":1324,"line":1455},[2847,2852,2857,2861],{"type":45,"tag":1322,"props":2848,"children":2849},{"style":1650},[2850],{"type":51,"value":2851},"function",{"type":45,"tag":1322,"props":2853,"children":2854},{"style":1918},[2855],{"type":51,"value":2856}," App",{"type":45,"tag":1322,"props":2858,"children":2859},{"style":1578},[2860],{"type":51,"value":2130},{"type":45,"tag":1322,"props":2862,"children":2863},{"style":1578},[2864],{"type":51,"value":1750},{"type":45,"tag":1322,"props":2866,"children":2867},{"class":1324,"line":1464},[2868,2873,2878,2882,2886,2891,2896,2900,2905,2909,2913,2917,2921,2925,2929,2933],{"type":45,"tag":1322,"props":2869,"children":2870},{"style":1650},[2871],{"type":51,"value":2872},"  const",{"type":45,"tag":1322,"props":2874,"children":2875},{"style":1578},[2876],{"type":51,"value":2877}," [",{"type":45,"tag":1322,"props":2879,"children":2880},{"style":1584},[2881],{"type":51,"value":1981},{"type":45,"tag":1322,"props":2883,"children":2884},{"style":1578},[2885],{"type":51,"value":1592},{"type":45,"tag":1322,"props":2887,"children":2888},{"style":1584},[2889],{"type":51,"value":2890}," setLocalState",{"type":45,"tag":1322,"props":2892,"children":2893},{"style":1578},[2894],{"type":51,"value":2895},"]",{"type":45,"tag":1322,"props":2897,"children":2898},{"style":1578},[2899],{"type":51,"value":1663},{"type":45,"tag":1322,"props":2901,"children":2902},{"style":1918},[2903],{"type":51,"value":2904}," useState",{"type":45,"tag":1322,"props":2906,"children":2907},{"style":1670},[2908],{"type":51,"value":1805},{"type":45,"tag":1322,"props":2910,"children":2911},{"style":1578},[2912],{"type":51,"value":2156},{"type":45,"tag":1322,"props":2914,"children":2915},{"style":1670},[2916],{"type":51,"value":1673},{"type":45,"tag":1322,"props":2918,"children":2919},{"style":1578},[2920],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2922,"children":2923},{"style":1777},[2924],{"type":51,"value":1780},{"type":45,"tag":1322,"props":2926,"children":2927},{"style":1578},[2928],{"type":51,"value":1611},{"type":45,"tag":1322,"props":2930,"children":2931},{"style":1670},[2932],{"type":51,"value":1528},{"type":45,"tag":1322,"props":2934,"children":2935},{"style":1578},[2936],{"type":51,"value":1635},{"type":45,"tag":1322,"props":2938,"children":2939},{"class":1324,"line":1473},[2940],{"type":45,"tag":1322,"props":2941,"children":2942},{"emptyLinePlaceholder":1641},[2943],{"type":51,"value":1644},{"type":45,"tag":1322,"props":2945,"children":2946},{"class":1324,"line":1482},[2947,2951,2956,2960,2964,2968],{"type":45,"tag":1322,"props":2948,"children":2949},{"style":1650},[2950],{"type":51,"value":2872},{"type":45,"tag":1322,"props":2952,"children":2953},{"style":1584},[2954],{"type":51,"value":2955}," agent",{"type":45,"tag":1322,"props":2957,"children":2958},{"style":1578},[2959],{"type":51,"value":1663},{"type":45,"tag":1322,"props":2961,"children":2962},{"style":1918},[2963],{"type":51,"value":2811},{"type":45,"tag":1322,"props":2965,"children":2966},{"style":1670},[2967],{"type":51,"value":1805},{"type":45,"tag":1322,"props":2969,"children":2970},{"style":1578},[2971],{"type":51,"value":1443},{"type":45,"tag":1322,"props":2973,"children":2974},{"class":1324,"line":1491},[2975,2980,2984,2988,2992,2996],{"type":45,"tag":1322,"props":2976,"children":2977},{"style":1670},[2978],{"type":51,"value":2979},"    agent",{"type":45,"tag":1322,"props":2981,"children":2982},{"style":1578},[2983],{"type":51,"value":1678},{"type":45,"tag":1322,"props":2985,"children":2986},{"style":1578},[2987],{"type":51,"value":1621},{"type":45,"tag":1322,"props":2989,"children":2990},{"style":1335},[2991],{"type":51,"value":2453},{"type":45,"tag":1322,"props":2993,"children":2994},{"style":1578},[2995],{"type":51,"value":1630},{"type":45,"tag":1322,"props":2997,"children":2998},{"style":1578},[2999],{"type":51,"value":3000},",\n",{"type":45,"tag":1322,"props":3002,"children":3003},{"class":1324,"line":1794},[3004,3009,3013,3017,3022,3026],{"type":45,"tag":1322,"props":3005,"children":3006},{"style":1670},[3007],{"type":51,"value":3008},"    name",{"type":45,"tag":1322,"props":3010,"children":3011},{"style":1578},[3012],{"type":51,"value":1678},{"type":45,"tag":1322,"props":3014,"children":3015},{"style":1578},[3016],{"type":51,"value":1621},{"type":45,"tag":1322,"props":3018,"children":3019},{"style":1335},[3020],{"type":51,"value":3021},"my-instance",{"type":45,"tag":1322,"props":3023,"children":3024},{"style":1578},[3025],{"type":51,"value":1630},{"type":45,"tag":1322,"props":3027,"children":3028},{"style":1578},[3029],{"type":51,"value":3000},{"type":45,"tag":1322,"props":3031,"children":3032},{"class":1324,"line":1866},[3033,3038,3042,3046,3051,3055,3059,3063,3067,3071,3075],{"type":45,"tag":1322,"props":3034,"children":3035},{"style":1918},[3036],{"type":51,"value":3037},"    onStateUpdate",{"type":45,"tag":1322,"props":3039,"children":3040},{"style":1578},[3041],{"type":51,"value":1678},{"type":45,"tag":1322,"props":3043,"children":3044},{"style":1578},[3045],{"type":51,"value":1877},{"type":45,"tag":1322,"props":3047,"children":3048},{"style":1808},[3049],{"type":51,"value":3050},"newState",{"type":45,"tag":1322,"props":3052,"children":3053},{"style":1578},[3054],{"type":51,"value":1528},{"type":45,"tag":1322,"props":3056,"children":3057},{"style":1650},[3058],{"type":51,"value":2313},{"type":45,"tag":1322,"props":3060,"children":3061},{"style":1918},[3062],{"type":51,"value":2890},{"type":45,"tag":1322,"props":3064,"children":3065},{"style":1670},[3066],{"type":51,"value":1805},{"type":45,"tag":1322,"props":3068,"children":3069},{"style":1584},[3070],{"type":51,"value":3050},{"type":45,"tag":1322,"props":3072,"children":3073},{"style":1670},[3074],{"type":51,"value":1528},{"type":45,"tag":1322,"props":3076,"children":3077},{"style":1578},[3078],{"type":51,"value":3000},{"type":45,"tag":1322,"props":3080,"children":3081},{"class":1324,"line":1949},[3082,3087,3091,3095,3100,3104,3109,3113,3117,3122,3126,3130,3134,3139,3144,3149,3153,3158],{"type":45,"tag":1322,"props":3083,"children":3084},{"style":1918},[3085],{"type":51,"value":3086},"    onIdentity",{"type":45,"tag":1322,"props":3088,"children":3089},{"style":1578},[3090],{"type":51,"value":1678},{"type":45,"tag":1322,"props":3092,"children":3093},{"style":1578},[3094],{"type":51,"value":1877},{"type":45,"tag":1322,"props":3096,"children":3097},{"style":1808},[3098],{"type":51,"value":3099},"name",{"type":45,"tag":1322,"props":3101,"children":3102},{"style":1578},[3103],{"type":51,"value":1592},{"type":45,"tag":1322,"props":3105,"children":3106},{"style":1808},[3107],{"type":51,"value":3108}," agentType",{"type":45,"tag":1322,"props":3110,"children":3111},{"style":1578},[3112],{"type":51,"value":1528},{"type":45,"tag":1322,"props":3114,"children":3115},{"style":1650},[3116],{"type":51,"value":2313},{"type":45,"tag":1322,"props":3118,"children":3119},{"style":1584},[3120],{"type":51,"value":3121}," console",{"type":45,"tag":1322,"props":3123,"children":3124},{"style":1578},[3125],{"type":51,"value":1886},{"type":45,"tag":1322,"props":3127,"children":3128},{"style":1918},[3129],{"type":51,"value":2047},{"type":45,"tag":1322,"props":3131,"children":3132},{"style":1670},[3133],{"type":51,"value":1805},{"type":45,"tag":1322,"props":3135,"children":3136},{"style":1578},[3137],{"type":51,"value":3138},"`",{"type":45,"tag":1322,"props":3140,"children":3141},{"style":1335},[3142],{"type":51,"value":3143},"Connected to ",{"type":45,"tag":1322,"props":3145,"children":3146},{"style":1578},[3147],{"type":51,"value":3148},"${",{"type":45,"tag":1322,"props":3150,"children":3151},{"style":1584},[3152],{"type":51,"value":3099},{"type":45,"tag":1322,"props":3154,"children":3155},{"style":1578},[3156],{"type":51,"value":3157},"}`",{"type":45,"tag":1322,"props":3159,"children":3160},{"style":1670},[3161],{"type":51,"value":2393},{"type":45,"tag":1322,"props":3163,"children":3164},{"class":1324,"line":1958},[3165,3170,3174],{"type":45,"tag":1322,"props":3166,"children":3167},{"style":1578},[3168],{"type":51,"value":3169},"  }",{"type":45,"tag":1322,"props":3171,"children":3172},{"style":1670},[3173],{"type":51,"value":1528},{"type":45,"tag":1322,"props":3175,"children":3176},{"style":1578},[3177],{"type":51,"value":1635},{"type":45,"tag":1322,"props":3179,"children":3180},{"class":1324,"line":1966},[3181],{"type":45,"tag":1322,"props":3182,"children":3183},{"emptyLinePlaceholder":1641},[3184],{"type":51,"value":1644},{"type":45,"tag":1322,"props":3186,"children":3187},{"class":1324,"line":2032},[3188,3193],{"type":45,"tag":1322,"props":3189,"children":3190},{"style":1572},[3191],{"type":51,"value":3192},"  return",{"type":45,"tag":1322,"props":3194,"children":3195},{"style":1670},[3196],{"type":51,"value":3197}," (\n",{"type":45,"tag":1322,"props":3199,"children":3200},{"class":1324,"line":2084},[3201,3206,3211,3216,3221,3225,3229,3233,3237,3241,3245,3249,3253,3257,3261,3266,3271,3275,3279,3283],{"type":45,"tag":1322,"props":3202,"children":3203},{"style":1578},[3204],{"type":51,"value":3205},"    \u003C",{"type":45,"tag":1322,"props":3207,"children":3208},{"style":1670},[3209],{"type":51,"value":3210},"button",{"type":45,"tag":1322,"props":3212,"children":3213},{"style":1650},[3214],{"type":51,"value":3215}," onClick",{"type":45,"tag":1322,"props":3217,"children":3218},{"style":1578},[3219],{"type":51,"value":3220},"={()",{"type":45,"tag":1322,"props":3222,"children":3223},{"style":1650},[3224],{"type":51,"value":2313},{"type":45,"tag":1322,"props":3226,"children":3227},{"style":1584},[3228],{"type":51,"value":2955},{"type":45,"tag":1322,"props":3230,"children":3231},{"style":1578},[3232],{"type":51,"value":1886},{"type":45,"tag":1322,"props":3234,"children":3235},{"style":1918},[3236],{"type":51,"value":244},{"type":45,"tag":1322,"props":3238,"children":3239},{"style":1584},[3240],{"type":51,"value":1805},{"type":45,"tag":1322,"props":3242,"children":3243},{"style":1578},[3244],{"type":51,"value":2156},{"type":45,"tag":1322,"props":3246,"children":3247},{"style":1670},[3248],{"type":51,"value":1673},{"type":45,"tag":1322,"props":3250,"children":3251},{"style":1578},[3252],{"type":51,"value":1678},{"type":45,"tag":1322,"props":3254,"children":3255},{"style":1584},[3256],{"type":51,"value":2073},{"type":45,"tag":1322,"props":3258,"children":3259},{"style":1578},[3260],{"type":51,"value":1886},{"type":45,"tag":1322,"props":3262,"children":3263},{"style":1584},[3264],{"type":51,"value":3265},"count ",{"type":45,"tag":1322,"props":3267,"children":3268},{"style":1578},[3269],{"type":51,"value":3270},"+",{"type":45,"tag":1322,"props":3272,"children":3273},{"style":1777},[3274],{"type":51,"value":2191},{"type":45,"tag":1322,"props":3276,"children":3277},{"style":1578},[3278],{"type":51,"value":1611},{"type":45,"tag":1322,"props":3280,"children":3281},{"style":1584},[3282],{"type":51,"value":1528},{"type":45,"tag":1322,"props":3284,"children":3285},{"style":1578},[3286],{"type":51,"value":3287},"}>\n",{"type":45,"tag":1322,"props":3289,"children":3290},{"class":1324,"line":2092},[3291,3296,3300,3304,3308,3312],{"type":45,"tag":1322,"props":3292,"children":3293},{"style":1584},[3294],{"type":51,"value":3295},"      Count: ",{"type":45,"tag":1322,"props":3297,"children":3298},{"style":1578},[3299],{"type":51,"value":2156},{"type":45,"tag":1322,"props":3301,"children":3302},{"style":1584},[3303],{"type":51,"value":1981},{"type":45,"tag":1322,"props":3305,"children":3306},{"style":1578},[3307],{"type":51,"value":1886},{"type":45,"tag":1322,"props":3309,"children":3310},{"style":1584},[3311],{"type":51,"value":1891},{"type":45,"tag":1322,"props":3313,"children":3314},{"style":1578},[3315],{"type":51,"value":1497},{"type":45,"tag":1322,"props":3317,"children":3318},{"class":1324,"line":2100},[3319,3324,3328],{"type":45,"tag":1322,"props":3320,"children":3321},{"style":1578},[3322],{"type":51,"value":3323},"    \u003C\u002F",{"type":45,"tag":1322,"props":3325,"children":3326},{"style":1670},[3327],{"type":51,"value":3210},{"type":45,"tag":1322,"props":3329,"children":3330},{"style":1578},[3331],{"type":51,"value":3332},">\n",{"type":45,"tag":1322,"props":3334,"children":3335},{"class":1324,"line":2119},[3336,3341],{"type":45,"tag":1322,"props":3337,"children":3338},{"style":1670},[3339],{"type":51,"value":3340},"  )",{"type":45,"tag":1322,"props":3342,"children":3343},{"style":1578},[3344],{"type":51,"value":1635},{"type":45,"tag":1322,"props":3346,"children":3347},{"class":1324,"line":2137},[3348],{"type":45,"tag":1322,"props":3349,"children":3350},{"style":1578},[3351],{"type":51,"value":1497},{"type":45,"tag":68,"props":3353,"children":3355},{"id":3354},"references",[3356],{"type":51,"value":3357},"References",{"type":45,"tag":3359,"props":3360,"children":3362},"h3",{"id":3361},"core",[3363],{"type":51,"value":3364},"Core",{"type":45,"tag":1022,"props":3366,"children":3367},{},[3368,3381,3394,3413],{"type":45,"tag":1026,"props":3369,"children":3370},{},[3371,3379],{"type":45,"tag":60,"props":3372,"children":3373},{},[3374],{"type":45,"tag":80,"props":3375,"children":3377},{"href":3376},"references\u002Fstate-scheduling.md",[3378],{"type":51,"value":3376},{"type":51,"value":3380}," — State persistence, scheduling, SQL",{"type":45,"tag":1026,"props":3382,"children":3383},{},[3384,3392],{"type":45,"tag":60,"props":3385,"children":3386},{},[3387],{"type":45,"tag":80,"props":3388,"children":3390},{"href":3389},"references\u002Fcallable.md",[3391],{"type":51,"value":3389},{"type":51,"value":3393}," — RPC methods, streaming, timeouts",{"type":45,"tag":1026,"props":3395,"children":3396},{},[3397,3405,3407],{"type":45,"tag":60,"props":3398,"children":3399},{},[3400],{"type":45,"tag":80,"props":3401,"children":3403},{"href":3402},"references\u002Frouting.md",[3404],{"type":51,"value":3402},{"type":51,"value":3406}," — URL patterns, custom routing, ",{"type":45,"tag":187,"props":3408,"children":3410},{"className":3409},[],[3411],{"type":51,"value":3412},"getAgentByName",{"type":45,"tag":1026,"props":3414,"children":3415},{},[3416,3424],{"type":45,"tag":60,"props":3417,"children":3418},{},[3419],{"type":45,"tag":80,"props":3420,"children":3422},{"href":3421},"references\u002Fconfiguration.md",[3423],{"type":51,"value":3421},{"type":51,"value":3425}," — Wrangler config, bindings, Vite setup",{"type":45,"tag":3359,"props":3427,"children":3429},{"id":3428},"chat-streaming",[3430],{"type":51,"value":3431},"Chat & Streaming",{"type":45,"tag":1022,"props":3433,"children":3434},{},[3435,3448,3478,3496],{"type":45,"tag":1026,"props":3436,"children":3437},{},[3438,3446],{"type":45,"tag":60,"props":3439,"children":3440},{},[3441],{"type":45,"tag":80,"props":3442,"children":3444},{"href":3443},"references\u002Fstreaming-chat.md",[3445],{"type":51,"value":3443},{"type":51,"value":3447}," — AIChatAgent, resumable streams, tools",{"type":45,"tag":1026,"props":3449,"children":3450},{},[3451,3459,3460,3465,3466,3471,3472],{"type":45,"tag":60,"props":3452,"children":3453},{},[3454],{"type":45,"tag":80,"props":3455,"children":3457},{"href":3456},"references\u002Fclient-sdk.md",[3458],{"type":51,"value":3456},{"type":51,"value":1050},{"type":45,"tag":187,"props":3461,"children":3463},{"className":3462},[],[3464],{"type":51,"value":451},{"type":51,"value":246},{"type":45,"tag":187,"props":3467,"children":3469},{"className":3468},[],[3470],{"type":51,"value":458},{"type":51,"value":246},{"type":45,"tag":187,"props":3473,"children":3475},{"className":3474},[],[3476],{"type":51,"value":3477},"AgentClient",{"type":45,"tag":1026,"props":3479,"children":3480},{},[3481,3489,3491],{"type":45,"tag":60,"props":3482,"children":3483},{},[3484],{"type":45,"tag":80,"props":3485,"children":3487},{"href":3486},"references\u002Fserver-driven-messages.md",[3488],{"type":51,"value":3486},{"type":51,"value":3490}," — Trigger patterns, ",{"type":45,"tag":187,"props":3492,"children":3494},{"className":3493},[],[3495],{"type":51,"value":515},{"type":45,"tag":1026,"props":3497,"children":3498},{},[3499,3507,3509],{"type":45,"tag":60,"props":3500,"children":3501},{},[3502],{"type":45,"tag":80,"props":3503,"children":3505},{"href":3504},"references\u002Fhuman-in-the-loop.md",[3506],{"type":51,"value":3504},{"type":51,"value":3508}," — Approval flows, ",{"type":45,"tag":187,"props":3510,"children":3512},{"className":3511},[],[3513],{"type":51,"value":691},{"type":45,"tag":3359,"props":3515,"children":3517},{"id":3516},"background-processing",[3518],{"type":51,"value":3519},"Background Processing",{"type":45,"tag":1022,"props":3521,"children":3522},{},[3523,3536,3563],{"type":45,"tag":1026,"props":3524,"children":3525},{},[3526,3534],{"type":45,"tag":60,"props":3527,"children":3528},{},[3529],{"type":45,"tag":80,"props":3530,"children":3532},{"href":3531},"references\u002Fworkflows.md",[3533],{"type":51,"value":3531},{"type":51,"value":3535}," — Durable Workflows integration",{"type":45,"tag":1026,"props":3537,"children":3538},{},[3539,3547,3548,3554,3555,3561],{"type":45,"tag":60,"props":3540,"children":3541},{},[3542],{"type":45,"tag":80,"props":3543,"children":3545},{"href":3544},"references\u002Fdurable-execution.md",[3546],{"type":51,"value":3544},{"type":51,"value":1050},{"type":45,"tag":187,"props":3549,"children":3551},{"className":3550},[],[3552],{"type":51,"value":3553},"runFiber",{"type":51,"value":246},{"type":45,"tag":187,"props":3556,"children":3558},{"className":3557},[],[3559],{"type":51,"value":3560},"stash",{"type":51,"value":3562},", surviving eviction",{"type":45,"tag":1026,"props":3564,"children":3565},{},[3566,3574],{"type":45,"tag":60,"props":3567,"children":3568},{},[3569],{"type":45,"tag":80,"props":3570,"children":3572},{"href":3571},"references\u002Fqueue-retries.md",[3573],{"type":51,"value":3571},{"type":51,"value":3575}," — Built-in queue, retry with backoff",{"type":45,"tag":3359,"props":3577,"children":3579},{"id":3578},"integrations",[3580],{"type":51,"value":3581},"Integrations",{"type":45,"tag":1022,"props":3583,"children":3584},{},[3585,3598,3611,3624],{"type":45,"tag":1026,"props":3586,"children":3587},{},[3588,3596],{"type":45,"tag":60,"props":3589,"children":3590},{},[3591],{"type":45,"tag":80,"props":3592,"children":3594},{"href":3593},"references\u002Fmcp.md",[3595],{"type":51,"value":3593},{"type":51,"value":3597}," — MCP client and server, transports, securing",{"type":45,"tag":1026,"props":3599,"children":3600},{},[3601,3609],{"type":45,"tag":60,"props":3602,"children":3603},{},[3604],{"type":45,"tag":80,"props":3605,"children":3607},{"href":3606},"references\u002Femail.md",[3608],{"type":51,"value":3606},{"type":51,"value":3610}," — Email routing and handling",{"type":45,"tag":1026,"props":3612,"children":3613},{},[3614,3622],{"type":45,"tag":60,"props":3615,"children":3616},{},[3617],{"type":45,"tag":80,"props":3618,"children":3620},{"href":3619},"references\u002Fwebhooks-push.md",[3621],{"type":51,"value":3619},{"type":51,"value":3623}," — Webhooks, push notifications",{"type":45,"tag":1026,"props":3625,"children":3626},{},[3627,3635],{"type":45,"tag":60,"props":3628,"children":3629},{},[3630],{"type":45,"tag":80,"props":3631,"children":3633},{"href":3632},"references\u002Fobservability.md",[3634],{"type":51,"value":3632},{"type":51,"value":3636}," — Diagnostics-channel events",{"type":45,"tag":3359,"props":3638,"children":3640},{"id":3639},"experimental",[3641],{"type":51,"value":3642},"Experimental",{"type":45,"tag":1022,"props":3644,"children":3645},{},[3646,3665,3684,3697],{"type":45,"tag":1026,"props":3647,"children":3648},{},[3649,3657,3658,3663],{"type":45,"tag":60,"props":3650,"children":3651},{},[3652],{"type":45,"tag":80,"props":3653,"children":3655},{"href":3654},"references\u002Fthink.md",[3656],{"type":51,"value":3654},{"type":51,"value":1050},{"type":45,"tag":187,"props":3659,"children":3661},{"className":3660},[],[3662],{"type":51,"value":1303},{"type":51,"value":3664}," higher-level chat agent",{"type":45,"tag":1026,"props":3666,"children":3667},{},[3668,3676,3677,3682],{"type":45,"tag":60,"props":3669,"children":3670},{},[3671],{"type":45,"tag":80,"props":3672,"children":3674},{"href":3673},"references\u002Fvoice.md",[3675],{"type":51,"value":3673},{"type":51,"value":1050},{"type":45,"tag":187,"props":3678,"children":3680},{"className":3679},[],[3681],{"type":51,"value":1273},{"type":51,"value":3683}," STT\u002FTTS",{"type":45,"tag":1026,"props":3685,"children":3686},{},[3687,3695],{"type":45,"tag":60,"props":3688,"children":3689},{},[3690],{"type":45,"tag":80,"props":3691,"children":3693},{"href":3692},"references\u002Fcodemode.md",[3694],{"type":51,"value":3692},{"type":51,"value":3696}," — Code Mode for tool orchestration",{"type":45,"tag":1026,"props":3698,"children":3699},{},[3700,3708],{"type":45,"tag":60,"props":3701,"children":3702},{},[3703],{"type":45,"tag":80,"props":3704,"children":3706},{"href":3705},"references\u002Fbrowse-the-web.md",[3707],{"type":51,"value":3705},{"type":51,"value":3709}," — CDP browser tools",{"type":45,"tag":3711,"props":3712,"children":3713},"style",{},[3714],{"type":51,"value":3715},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3717,"total":1958},[3718,3726,3740,3752,3778,3797,3810],{"slug":4,"name":4,"fn":5,"description":6,"org":3719,"tags":3720,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3721,3722,3723,3724,3725],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"slug":8,"name":8,"fn":3727,"description":3728,"org":3729,"tags":3730,"stars":26,"repoUrl":27,"updatedAt":3739},"build on the full Cloudflare platform","Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3731,3732,3733,3736],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3734,"slug":3735,"type":15},"Serverless","serverless",{"name":3737,"slug":3738,"type":15},"Storage","storage","2026-04-06T18:07:35.399081",{"slug":3741,"name":3741,"fn":3742,"description":3743,"org":3744,"tags":3745,"stars":26,"repoUrl":27,"updatedAt":3751},"cloudflare-email-service","manage transactional emails with Cloudflare","Send and receive transactional emails with Cloudflare Email Service (Email Sending + Email Routing). Use when building email sending (Workers binding or REST API), email routing, Agents SDK email handling, or integrating email into any app — Workers, Node.js, Python, Go, etc. Also use for email deliverability, SPF\u002FDKIM\u002FDMARC, wrangler email setup, MCP email tools, or when a coding agent needs to send emails. Even for simple requests like \"add email to my Worker\" — this skill has critical config details.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3746,3747,3748,3750],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":554,"slug":3749,"type":15},"email",{"name":3734,"slug":3735,"type":15},"2026-04-16T05:02:38.301955",{"slug":3753,"name":3753,"fn":3754,"description":3755,"org":3756,"tags":3757,"stars":26,"repoUrl":27,"updatedAt":3777},"cloudflare-one","configure and manage Cloudflare One Zero Trust","Guides Cloudflare One Zero Trust and SASE work across Access, Gateway, WARP, Tunnel, Cloudflare WAN, DLP, CASB, device posture, and identity. Use when designing, configuring, troubleshooting, or reviewing Cloudflare One deployments. Retrieval-first: use current Cloudflare docs\u002FAPI schemas instead of embedded product docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3758,3761,3762,3765,3768,3771,3774],{"name":3759,"slug":3760,"type":15},"Access Control","access-control",{"name":9,"slug":8,"type":15},{"name":3763,"slug":3764,"type":15},"Infrastructure","infrastructure",{"name":3766,"slug":3767,"type":15},"Networking","networking",{"name":3769,"slug":3770,"type":15},"SASE","sase",{"name":3772,"slug":3773,"type":15},"Security","security",{"name":3775,"slug":3776,"type":15},"Zero Trust","zero-trust","2026-06-15T09:51:34.015251",{"slug":3779,"name":3779,"fn":3780,"description":3781,"org":3782,"tags":3783,"stars":26,"repoUrl":27,"updatedAt":3796},"cloudflare-one-migrations","plan migrations to Cloudflare One","Plans migrations from Zscaler ZIA\u002FZPA, Palo Alto, legacy VPN, SWG, or SASE stacks to Cloudflare One. Use for migration assessments, policy mapping, rollout plans, and parity\u002Fgap analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3784,3785,3788,3789,3792,3793],{"name":9,"slug":8,"type":15},{"name":3786,"slug":3787,"type":15},"Migration","migration",{"name":3766,"slug":3767,"type":15},{"name":3790,"slug":3791,"type":15},"Risk Assessment","risk-assessment",{"name":3772,"slug":3773,"type":15},{"name":3794,"slug":3795,"type":15},"Strategy","strategy","2026-06-15T09:51:35.348691",{"slug":3798,"name":3798,"fn":3799,"description":3800,"org":3801,"tags":3802,"stars":26,"repoUrl":27,"updatedAt":3809},"durable-objects","build Cloudflare Durable Objects","Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3803,3804,3805,3808],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3806,"slug":3807,"type":15},"State Management","state-management",{"name":17,"slug":18,"type":15},"2026-04-06T18:07:39.148434",{"slug":3811,"name":3811,"fn":3812,"description":3813,"org":3814,"tags":3815,"stars":26,"repoUrl":27,"updatedAt":3825},"sandbox-sdk","build sandboxed code execution apps on Cloudflare","Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI\u002FCD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3816,3817,3818,3821,3824],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3819,"slug":3820,"type":15},"Code Execution","code-execution",{"name":3822,"slug":3823,"type":15},"Sandboxing","sandboxing",{"name":3734,"slug":3735,"type":15},"2026-04-06T18:07:37.89439",{"items":3827,"total":2251},[3828,3843,3857,3872,3885,3899,3913,3927,3944,3961,3974,3989],{"slug":3829,"name":3829,"fn":3830,"description":3831,"org":3832,"tags":3833,"stars":3840,"repoUrl":3841,"updatedAt":3842},"code-review","review code changes for quality and risk","Review code changes for correctness, clarity, and risk. Use when the user asks for a review, a second opinion on a diff, or feedback on code they wrote.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3834,3835,3837],{"name":9,"slug":8,"type":15},{"name":3836,"slug":3829,"type":15},"Code Review",{"name":3838,"slug":3839,"type":15},"Engineering","engineering",5284,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fagents","2026-06-08T08:19:41.621858",{"slug":3844,"name":3844,"fn":3845,"description":3846,"org":3847,"tags":3848,"stars":3840,"repoUrl":3841,"updatedAt":3856},"debug-plan","create systematic debugging plans","Create a systematic debugging plan for a bug report. Use when the user asks how to investigate a failure, regression, or unexpected behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3849,3852,3855],{"name":3850,"slug":3851,"type":15},"Code Analysis","code-analysis",{"name":3853,"slug":3854,"type":15},"Debugging","debugging",{"name":3838,"slug":3839,"type":15},"2026-05-30T06:16:58.837407",{"slug":3858,"name":3858,"fn":3859,"description":3860,"org":3861,"tags":3862,"stars":3840,"repoUrl":3841,"updatedAt":3871},"escalation","escalate customer issues to human agents","Decide when and how to escalate a customer conversation to a human agent. Use when a request is high-risk, the customer is frustrated, or the issue is outside what you can resolve.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3863,3866,3869],{"name":3864,"slug":3865,"type":15},"Communications","communications",{"name":3867,"slug":3868,"type":15},"Customer Support","customer-support",{"name":3870,"slug":3858,"type":15},"Escalation","2026-06-08T08:19:43.130686",{"slug":3873,"name":3873,"fn":3874,"description":3875,"org":3876,"tags":3877,"stars":3840,"repoUrl":3841,"updatedAt":3884},"pirate-voice","rewrite text in pirate voice","Rewrite or answer in a playful pirate voice. Use when the user asks for pirate tone, nautical phrasing, or says to talk like a pirate.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3878,3881],{"name":3879,"slug":3880,"type":15},"Creative","creative",{"name":3882,"slug":3883,"type":15},"Writing","writing","2026-05-30T06:17:00.080367",{"slug":3886,"name":3886,"fn":3887,"description":3888,"org":3889,"tags":3890,"stars":3840,"repoUrl":3841,"updatedAt":3898},"release-notes","draft product release notes","Draft short release notes from a list of changes. Use when the user asks for changelogs, release notes, or a concise product update.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3891,3894,3897],{"name":3892,"slug":3893,"type":15},"Content Creation","content-creation",{"name":3895,"slug":3896,"type":15},"Documentation","documentation",{"name":3882,"slug":3883,"type":15},"2026-05-30T06:17:01.278643",{"slug":3900,"name":3900,"fn":3901,"description":3902,"org":3903,"tags":3904,"stars":3840,"repoUrl":3841,"updatedAt":3912},"test-plan","produce focused test plans","Produce a focused test plan for a change. Use when the user asks how to test a feature, what cases to cover, or for a QA checklist before shipping.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3905,3906,3909],{"name":3838,"slug":3839,"type":15},{"name":3907,"slug":3908,"type":15},"QA","qa",{"name":3910,"slug":3911,"type":15},"Testing","testing","2026-05-30T06:17:02.479863",{"slug":3914,"name":3914,"fn":3915,"description":3916,"org":3917,"tags":3918,"stars":3840,"repoUrl":3841,"updatedAt":3926},"workspace-digest","summarize files in the shared workspace","Summarize the files saved in this assistant's shared workspace. Use when the user asks what is in their workspace, for a file inventory, or a digest of saved work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3919,3920,3923],{"name":3895,"slug":3896,"type":15},{"name":3921,"slug":3922,"type":15},"Knowledge Management","knowledge-management",{"name":3924,"slug":3925,"type":15},"Summarization","summarization","2026-06-07T07:51:27.265303",{"slug":3928,"name":3928,"fn":3929,"description":3930,"org":3931,"tags":3932,"stars":3941,"repoUrl":3942,"updatedAt":3943},"cloudflare-bundler-apps","author Cloudflare Worker Bundler applications","Author Cloudflare Worker Bundler-compatible apps that build and preview correctly inside a space. Use this skill whenever you scaffold, modify, or deploy a project that will be built with `@cloudflare\u002Fworker-bundler` (i.e. anything served from `\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F`). Covers wrangler config, project layout, static asset rules, server entry conventions, npm dependency limits, and the most common cause of blank previews (JSX in browser scripts).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3933,3934,3935,3938],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3936,"slug":3937,"type":15},"Deployment","deployment",{"name":3939,"slug":3940,"type":15},"Web Development","web-development",5145,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fvibesdk","2026-06-16T09:45:57.551207",{"slug":3945,"name":3945,"fn":3946,"description":3947,"org":3948,"tags":3949,"stars":3941,"repoUrl":3942,"updatedAt":3960},"frontend-design","create production-grade frontend interfaces","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3950,3953,3956,3959],{"name":3951,"slug":3952,"type":15},"Design","design",{"name":3954,"slug":3955,"type":15},"Frontend","frontend",{"name":3957,"slug":3958,"type":15},"HTML","html",{"name":3939,"slug":3940,"type":15},"2026-06-16T09:46:01.852741",{"slug":3962,"name":3962,"fn":3963,"description":3964,"org":3965,"tags":3966,"stars":3941,"repoUrl":3942,"updatedAt":3973},"frontend-design-landing-page","build marketing landing pages","Marketing landing page and conversion-focused product page reference. Use this skill when building hero sections, feature grids, pricing pages, testimonials, CTAs, footers, navigation bars, or any public-facing marketing surface. Covers a warm, professional, developer-friendly design language (cream backgrounds, generous whitespace, pill CTAs, corner-bracket card decorations) and a complete token set, animation system, and copy-paste component snippets. NOT for product\u002Fdashboard UIs — use frontend-design-saas for those.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3967,3968,3969,3972],{"name":3954,"slug":3955,"type":15},{"name":3957,"slug":3958,"type":15},{"name":3970,"slug":3971,"type":15},"Marketing","marketing",{"name":3939,"slug":3940,"type":15},"2026-06-16T09:46:00.515859",{"slug":3975,"name":3975,"fn":3976,"description":3977,"org":3978,"tags":3979,"stars":3941,"repoUrl":3942,"updatedAt":3988},"frontend-design-saas","build SaaS dashboard and product UIs","S-tier SaaS dashboard and product UI reference. Use this skill when building application shells, data tables, settings panels, billing pages, dashboards, auth flows, admin tools, or any internal\u002Fcustomer-facing SaaS product UI. Inspired by Stripe, Linear, Vercel, Airbnb, Notion. Covers neutral-led design tokens, sidebar+content shells, dense data UIs, form-heavy configuration pages, command palettes, empty states, and the accessibility (WCAG AA+) bar these products clear.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3980,3981,3982,3985],{"name":3951,"slug":3952,"type":15},{"name":3954,"slug":3955,"type":15},{"name":3983,"slug":3984,"type":15},"SaaS","saas",{"name":3986,"slug":3987,"type":15},"UI Components","ui-components","2026-06-16T09:45:58.956063",{"slug":4,"name":4,"fn":5,"description":6,"org":3990,"tags":3991,"stars":26,"repoUrl":27,"updatedAt":28},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3992,3993,3994,3995,3996],{"name":24,"slug":25,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15}]