Build & Deploy AI Agents

Exercise 1

Build: Foundations

Add Review state, persistence, and the live findings panel.

Time to build Module 1 in your local reviewbot-agent checkout. Start from checkpoint-0-starter.

The goal

REVIEWBOT should remember its reviews and show them live:

  • typed Review state defined with Zod,
  • state that persists in the Durable Object and broadcasts over WebSocket,
  • a findings panel that updates without a page refresh.

Getting started

Tell your agent what you want, and let the Cloudflare skills guide the code. Work in src/state.ts and the ReviewAgent in src/server.ts.

Stuck?

The canonical solution is the checkpoint-1-foundations tag. Overlay just the source so you keep your notes:

git checkout checkpoint-1-foundations -- src/

Done when

  • State survives a page reload.
  • A state change appears in the UI within about a second.
  • You can explain why the same agent name always maps to the same instance.