Introduction
This is a foundations plus choose-your-own-adventure practical workshop that teaches you to build a trip-planning agent, TripMate. There is no video and no slide deck: code, a README per challenge, and a running model.
Two paths, same outcomes
Section titled “Two paths, same outcomes”| Pydantic AI (Python) | Vercel AI SDK (TypeScript) | |
|---|---|---|
| Agent class | Agent() | ToolLoopAgent |
| Tool definition | @agent.tool_plain | tool({ execute }) |
| Structured output | output_type= | Output.object |
| Streaming | agent.run_stream() | agent.stream() |
| Tracing | logfire → console + autotel-devtools | autotel → console + autotel-devtools |
| Full-stack | FastAPI + useChat | Hono on Node + useChat |
| Delivery | Jupyter notebooks (plus runnable scripts) | Files you edit and run |
Both paths teach the same concepts in code idiomatic to each ecosystem.
The shape of the workshop
Section titled “The shape of the workshop”-
Foundations (f1–f7): the augmented LLM. Everyone does these. Call an agent and stream its reply, read the loop and what it costs, make it return typed data, write a tool, put a guardrail in front, route by description, and prove the gate with a test.
Don’t just complete Foundations: experiment. Rerun each challenge with different instructions and watch what changes. How short can a prompt get before the agent loses the plot? Find where you have to spell things out, and where the model works it out on its own.
-
One track, your choice: Patterns (p1–p7), workflows you orchestrate and then agent patterns the model orchestrates; RAG (r1–r2), grounding the model in your own documents; or Full-Stack, the same agent behind a real web chat UI (a template you clone with
npx @jagreehal/ai-workshop). The tracks you skip are take-home, along with the self-serve tracks (MCP, Resilience, and on the TS path Output Guardrails). -
The Discussion closes the workshop. Wherever you got to, the last 20 minutes are the same questions: was working with the model what you expected, what surprised you, and what did you learn?
What you need
Section titled “What you need”- Python 3.10+ with uv (for the Pydantic path) or Node.js 22+ (for the TS path)
- Ollama with
granite4.1:3bpulled (about 2 GB), or a Google Gemini API key - 8 GB RAM recommended for the local model
- For the RAG track:
ollama pull embeddinggemma(needed even if you chat on Gemini)
How to read a challenge
Section titled “How to read a challenge”Each challenge has:
start/agent.pyorstart/agent.ts: runs as-is, with TODO comments marking what to dofinish/agent.pyorfinish/agent.ts: the reference solutionREADME.md: the lesson, with a worked example, numbered build steps, traps, and a “Done when” checklist
On the Python path each challenge also ships as a generated Jupyter notebook
(make lab), the same lesson with runnable cells.
Open the README first, do the worked example in your head, then open the start file and make the changes.