Start course

Day 1 · For teachers

Teaching kit

What a head teacher in any location gets for every day, by mid-January: who does what in each block, the lab step by step, the exit ticket, the usual failures and their fixes, and the homework rubric. Day 1 is written in full as the sample.

Run sheet: head teacher and TA6 blocks
TimeHead teacherTA
0:00–0:15Welcome. The 10-day outcome, how the capstone grows a day at a time, the coding-agent rule, and workplace standards: arrive on time, phones away, ask questions in class.Checks every student finished the pre-work setup and helps anyone stuck.
0:15–0:45Live build from an empty folder: hands a coding agent the lab's written spec and explains each line it writes. Stops only where the build raises a question: the same prompt run five times gives different answers, and each call has a cost in tokens.Posts every demo snippet in the class channel as it's shown.
0:45–1:15Live deploy: links the project set up for the student, pulls the key, deploys and opens the URL on a phone. Then the same prompt on three models through the AI Gateway, comparing answer, cost and latency.Fixes the setups that failed at 0:00, so those students can follow along.
1:15–1:25Break.One-on-one with anyone still without a working local app.
1:25–2:40Lab. Circulates and cold-calls "explain this line" walkthroughs. At 2:10, checks the TA's list and pairs anyone behind with someone who has deployed.Owns the setup and deploy queue. Gives the head teacher a list of anyone not yet deployed at 2:10.
2:40–3:00Three students show their live URL. Explains the capstone brief and tonight's homework. Exit ticket in the last 5 minutes.Records who shipped and the exit-ticket scores, and sends the head teacher both lists by noon.
The lab, step by step6 steps
Step 1

Write BRIEF.md: the user, their problem, what useful looks like, tonight's thin slice and what could block it.

Done when: one page, written without the coding agent.

Step 2

Create the project with uv init --app --no-package --python 3.13, then add fastapi and anthropic.

Done when: pyproject.toml, uv.lock and .python-version exist.

Step 3

Give the coding agent the lab's written spec: one POST /ask route that calls Claude through the AI Gateway and returns the answer, token counts and latency.

Done when: main.py has the route and no hard-coded key.

Step 4

Answer the lab's six explain-every-line questions in NOTES.md before running anything.

Done when: each answer is checked against the docs, not just the agent.

Step 5

vercel link to the project set up for you, then vercel env pull .env.local to bring down the key already in it. Check git ignores it, then run the app.

Done when: /docs on localhost returns a real answer with token counts and latency.

Step 6

Deploy with vercel deploy --prod (the project already has the key), then push to GitHub and connect it.

Done when: the public URL answers a question typed on a classmate's phone.

StretchAccept a model name in the request, and return the cost of each answer alongside it, so you can compare models from /docs.

Exit ticket3 questions
Question 1

Your app works locally but errors once deployed. What do you check first, and why?

A good answer: That the folder is linked to the project with the key in it. The key lives in the project's settings, never in the code.

Question 2

The same prompt gives a different answer on each run. Why, and how does your app cope?

A good answer: Each token is picked with some chance, so variation is built in, and newer models don't let you turn it off. Ask for a fixed format, check what comes back, and measure with evals.

Question 3

A model is 3× cheaper and 2× faster but slightly worse on your five prompts. How do you choose?

A good answer: It depends on the user and the cost of a wrong answer: test on your own prompts, and multiply cost per request by expected use.

The TA scores each answer 0, 1 or 2. Anyone under 3 of 6 gets a 10-minute check-in before day 2's recap.

Where students get stuck6 fixes
Works locally, errors once deployed
The folder was linked to a new project instead of the one set up for the student, so it has no key. Run vercel link again, choose the program's team and the student's project, and redeploy.
.env.local pushed to GitHub
Revoke the key with vercel ai-gateway api-keys revoke, issue a new one, and add .env* to .gitignore. Use it as a two-minute lesson for the room, not a reprimand.
"Model not found"
A typo in the model ID. Copy the exact ID from the gateway's model list.
Python or uv won't install, often on Windows
Paste the pre-work setup prompt again and let the agent fix it. If that fails, start the project in GitHub Codespaces and keep going.
The coding agent built far more than the spec
Commit before every prompt, read git diff, and keep only what you can explain.
Requests start failing mid-lab
The student's key hit its $5 limit and the gateway returns 402. The TA raises it with vercel ai-gateway budgets set api-key, and it's a good moment to explain why the cap exists.
Homework and how it's marked3 criteria

Run the same five prompts on three models and log quality, cost and latency in a table in the README, with three sentences on which model the capstone should use. Then write the one-page capstone brief: who the user is, their problem, and what the app will do by day 10. Submit the AI prompts used.

Measured, not guessed
5 prompts × 3 models, with cost and latency from the logs
A reasoned choice
The model recommendation follows from the table
A real, small problem
A named user, and a problem ten days can solve

Each criterion scores 0, 1 or 2. The TA marks before day 2 starts, and the head teacher picks two briefs to discuss in the recap.

Materials7 items
  • The student lab with the written spec, and an instructor reference app tagged at the end of every day, so anyone behind can catch up
  • 8 slides: the thin slice, the coding-agent rule, keys and secrets, why answers vary, choosing a model
  • A live-demo script with the exact prompts and the three models to compare
  • Model comparison table and one-page capstone brief templates
  • Exit ticket form
  • One Vercel project per student in the program's Vercel team, created before day 1 with the student's own AI Gateway key already set: $5 limit, email alerts at 75% and 100%
  • Spend per student, read before each class: vercel ai-gateway budgets list, or the AI Gateway Overview and Logs in the Vercel dashboard
Back to day 1