01 Foundations
Workers, bindings, storage, stateful compute.
02 Build the agent
Start with a wired agent. Add state, memory, tools and scheduling.
03 Beyond the lab
Internal app-building with VibeSDK and Void Platform.
Sign up for a free Cloudflare account
Local tools
Node.js 24+ and Git. Use the repo’s AGENTS.md with your coding agent.
Accept the lab invite
Create your Cloudflare login first, then accept your workshop lab invite.
Workers
Request handlers + APIs
Durable Objects
Identity + stateful compute
Containers / Sandboxes
Linux execution + isolated code
R2
Object storage + artifacts
D1
Relational application data
KV
Read-heavy configuration
Workers AI
Model inference
AI Gateway
Model traffic + observability
Agents SDK / Workflows
Agent runtime + durable orchestration
export default { async fetch(req: Request, env: Env) { const flags = await env.CONFIG.get("flags", "json"); await env.BUCKET.put("hello.txt", "Hello"); const rows = await env.DB.prepare("SELECT 1").all(); const ai = await env.AI.run( "@cf/zai-org/glm-4.7-flash", { messages: [{ role: "user", content: "Hi" }] } ); const room = env.ROOMS.getByName("demo"); const state = await room.fetch("https://room/state"); return Response.json({ flags, rows, ai, ok: state.ok }); } } satisfies ExportedHandler<Env>;
{
"name": "cloudflare-agent-starter",
"main": "src/server.ts",
"compatibility_date": "2026-10-19",
"ai": { "binding": "AI", "remote": true },
"vars": { "AI_GATEWAY_ID": "<lab-gateway-id>" },
"durable_objects": { "bindings": [
{ "name": "Assistant", "class_name": "Assistant" }
] }
}wrangler.jsonc declares the Worker and its bindings.
npm run dev uses Vite + Cloudflare tooling.
npm run deploy builds and runs Wrangler.
Chat, streaming replies and WebSocket sync.
Named compute with its own built-in SQLite.
Chat loop, transcript storage and tool execution.
Every model call follows the configured gateway.
npm run test:cp01
The browser calls a narrow server method.
Reject direct client writes and invalid values.
Every tab on this instance sees the same setting.
npm run test:cp02
The model uses set_context to update memory.
Writes beyond the 1,000-token limit are rejected.
SQLite memory survives clearing chat history.
npm run test:cp03
Trim and bound the note title and body.
Use toolCallId as the operation key.
The chat renders the input and structured result.
npm run test:cp04
Validate the delay; this.schedule() takes seconds.
The alarm fires even with no connected tabs.
Persist pending → completed once; ignore repeats.
Inbound mail + replies
Voice
Streaming speech · beta
Video
RealtimeKit / WebRTC
HITL
Human-in-the-loop approvals
Fibers
Checkpoint + recover work
Sub-agents
Delegate with isolated state
MCP tools
Connect external capabilities
Workflows
Durable steps + retries
Deploy
- Set AI_GATEWAY_ID in wrangler.jsonc
- Run npm run deploy to get your workers.dev URL
- Open it, chat, and check your checkpoints work live
Submit
- Your deployed URL
- GitHub repo or code link, if shareable
- A 2–3 sentence description of your agent
- Checkpoints or stretch goals completed