The Agent's Playbook

The skills the agent uses to ship. Each one is a real deployed service. Follow along or try it yourself.

0 of 8 completed
01

Hello Worker

Deploy your first Cloudflare Worker.

Create a Worker using Hono that responds to GET / with JSON: {"hello":"world","timestamp":}. The timestamp must be within 5 seconds of real time. Deploy with wrangler deploy.

💡 Run: npm create cloudflare@latest

02

Data Layer

Add D1 and expose CRUD endpoints.

Add a D1 database. Create a "notes" table (id TEXT, content TEXT, created_at TEXT). Expose: POST /notes (create, returns 201), GET /notes (list), GET /notes/:id (get one), DELETE /notes/:id (delete). All JSON.

💡 wrangler d1 create my-db

03

Auth Gate

Add OTP authentication and protect your routes.

Add OTP auth. POST /auth/request-otp accepts {email}. POST /auth/verify-otp accepts {email,code} and sets a session cookie. GET /auth/me returns the user or 401. Protect POST/DELETE /notes behind auth. GET /notes stays public.

💡 Use hono/cookie for setCookie

04

File Vault

Add R2 storage for file uploads.

Add an R2 bucket. POST /files accepts multipart upload (field: "file"), stores in R2, returns {id, filename, size} with 201. GET /files lists files. GET /files/:id returns the file. DELETE /files/:id removes it.

💡 wrangler r2 bucket create my-bucket

05

Scheduled

Add a cron trigger that writes heartbeats.

Add a scheduled handler (every minute). It inserts into a "heartbeats" table (id, timestamp). GET /heartbeats returns the last 10. The verifier checks a heartbeat exists within 5 minutes.

💡 Add [triggers] crons to wrangler.toml

06

Service Mesh

Build a second Worker that aggregates from your others.

Deploy a NEW Worker. It calls your Level 2 /notes and Level 5 /heartbeats endpoints, then returns GET /status with {notes_count, latest_heartbeat, aggregated_at}.

💡 Use fetch() to call your other Workers

07

AI Endpoint

Use Cloudflare AI for inference.

Add an AI binding. POST /ai/summarize accepts {text} and returns {summary} using a Cloudflare AI model. The summary must be shorter than the input. GET /ai/models returns your supported models.

💡 Add [ai] binding = "AI" to wrangler.toml

08

Bot Bridge

Build a Telegram bot that handles commands via webhook.

Create a Telegram bot via @BotFather. Build a Worker that receives webhook POSTs. When text is /deploy, create a task in D1. GET /bot/tasks returns all tasks.

💡 Create a bot via @BotFather

Sign in to track your progress

Every level deploys something real. Verified by automated checks.