- {state.messages.map((msg, i) => (
-
{msg.role}: {msg.content}
- ))}
-
e.key === "Enter" && sendMessage(e.target.value)} />
-
- );
-}
-```
-
-### Vanilla JavaScript
-
-```javascript
-const ws = new WebSocket("wss://my-agent.workers.dev/agents/MyAgent/user123");
-
-ws.onopen = () => {
- console.log("Connected to agent");
-};
-
-ws.onmessage = (event) => {
- const data = JSON.parse(event.data);
- console.log("Received:", data);
-};
-
-ws.send(JSON.stringify({ type: "chat", content: "Hello!" }));
-```
-
-## Common Patterns
-
-See [references/agent-patterns.md](references/agent-patterns.md) for:
-- Tool calling and function execution
-- Multi-agent orchestration
-- RAG (Retrieval Augmented Generation)
-- Human-in-the-loop workflows
-
-## Deployment
-
-```bash
-# Deploy
-npx wrangler deploy
-
-# View logs
-wrangler tail
-
-# Test endpoint
-curl https://my-agent.workers.dev/agents/MyAgent/test-user
-```
-
-## Troubleshooting
-
-See [references/troubleshooting.md](references/troubleshooting.md) for common issues.
-
-## References
-
-- [references/examples.md](references/examples.md) — Official templates and production examples
-- [references/agent-patterns.md](references/agent-patterns.md) — Advanced patterns
-- [references/state-patterns.md](references/state-patterns.md) — State management strategies
-- [references/troubleshooting.md](references/troubleshooting.md) — Error solutions
diff --git a/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md b/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md
deleted file mode 100644
index 219e82530473220..000000000000000
--- a/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md
+++ /dev/null
@@ -1,461 +0,0 @@
-# Agent Patterns
-
-Advanced patterns for building sophisticated agents.
-
-## Tool Calling
-
-Agents can expose tools that AI models can call:
-
-```typescript
-import { Agent, Connection } from "agents";
-import { z } from "zod";
-
-interface Tool {
- name: string;
- description: string;
- parameters: z.ZodSchema;
- handler: (params: any) => Promise