CascadiaJS 2026 · Friday, June 5 · with Eve Porcello
Today we go from "the model can talk" to "the model can act." We'll build agents with the Vercel AI SDK (v6) and AI Gateway: tool calling, the agent loop, multi-step tasks, and production patterns that keep agents safe and debuggable. Then we turn it up with a fun creative agent that generates and restyles real images.
npm install
cp .env.example .env # paste your AI Gateway key
npm run tool # smoke test, your first tool-calling agent| # | Lesson | Run |
|---|---|---|
| 00 | Setup & what is an agent? | npm run tool |
| 01 | Tool calling fundamentals | npm run tool |
| 02 | Agent architecture: the loop | npm run loop · npm run assistant |
| # | Lesson | Run |
|---|---|---|
| 03 | Multi-step agents | npm run multistep |
| 04 | Agents in production | npm run approval · npm run guardrails · npm run ralph · npm run observe |
| 05 | Creative agent projects | npm run image |
The lessons show; the labs are where you build. Open-ended briefs in labs/:
| # | Lab | When |
|---|---|---|
| 01 | Build an agent that does real work | morning |
| 02 | Build an image stylizing agent | afternoon |
| 03 | Capstone: data-analysis dashboard agent | optional / stretch |
| Command | What it shows |
|---|---|
npm run tool |
a single tool call (generateText + tool) |
npm run loop |
the agent loop with ToolLoopAgent |
npm run assistant |
a custom assistant with tools over state |
npm run multistep |
a code-gen agent writing files (sandboxed) |
npm run approval |
human-in-the-loop approval gate |
npm run guardrails |
step caps, allowlists, cost ceilings |
npm run ralph |
the "Ralph Wiggum loop", run till done |
npm run observe |
step-by-step tracing with onStepFinish |
npm run image |
an image agent that generates + restyles real images |
⚠️ multistepwrites into a sandboxed./output/folder (gitignored). The file tools are locked to that directory on purpose, your first real guardrail.
npm run image -- "a foggy Seattle skyline at dawn"(then watch it synthwave-ify)- "Restyle this headshot as a Studio Ghibli watercolor."
- "Turn a plain coffee-mug photo into a neon cyberpunk product shot."
Let's build something that does things. ✨