Skip to content

Latest commit

 

History

History
36 lines (30 loc) · 2.63 KB

File metadata and controls

36 lines (30 loc) · 2.63 KB

Playground Improvements

Make Docs-Only Demos Interactive

  • Live AI Chat - Working chat with Workers AI, streaming, and client-side tools
  • MCP Server - Real MCP server at /mcp-server with tools (roll_dice, generate_uuid, word_count, hash_text) and resources
  • MCP Client - Connects to the playground's own MCP server, discovers tools via onMcpUpdate, calls them
  • Workflow Demos - Interactive multi-step workflow simulation and approval patterns
  • Email Demos - Real email receiving and secure replies via Cloudflare Email Routing
  • Workers Pattern - Interactive fan-out demo with ManagerAgent distributing to parallel FanoutWorkerAgents
  • Pipeline Pattern - Interactive 3-stage pipeline (Validate → Transform → Enrich) with per-stage output

Missing SDK Features

  • Durable Execution - Fiber demo showing long-running work with checkpoints and recovery hooks
  • Hibernation - Demo showing hibernatable WebSockets and cost savings patterns
  • HTTP API - Show getAgentByName() for HTTP-only access without WebSockets
  • Queue Patterns - Rate limiting, batching, deduplication using the queue
  • Agent Tools - Show agentTool(), runAgentTool(), useAgentToolEvents(), and sub-agent drill-in
  • Think + Shell - Explain the assistant runtime, durable workspace, state tools, and sandboxed execution
  • Expanded MCP - Explain transports, elicitation, OAuth server, codemode MCP, WebMCP, and x402 patterns
  • Product Integrations - Explain email, webhooks, push, A2A, payments, and browser-tool product stories
  • Multi-Agent - One agent calling another agent (agent-to-agent communication)
  • Routing Strategies - Different agent naming patterns (per-user, per-session, shared)

Developer Experience

  • Network Inspector - Raw WebSocket frame viewer showing the actual protocol messages
  • Agent Inspector - View internal tables (cf_agents_state, cf_agents_schedules, etc.)
  • State Diff View - Highlight what changed in state updates
  • Copy-Paste Templates - One-click starter code for each feature
  • Code Examples - "How it works" sections on every demo page with Shiki syntax-highlighted literate code snippets
  • Rich Descriptions - Fleshed-out descriptions with inline code tags on every demo page
  • Back Navigation - Back button on every demo page linking to the home page
  • JSON Highlighting - All JSON output uses Shiki syntax highlighting instead of plain CodeBlock
  • Idle Cleanup - All agents self-destroy after 15 minutes without connections (PlaygroundAgent base class)