Week 4 — Agents
5 lessons · project on day 24
- Open
Day 19
AI Agents
The perceive-decide-act-observe loop, when an agent is the wrong tool, and how to keep one from running away with your budget.
- Open
Day 20
Memory
Short-term context vs long-term storage, what to summarize, what to discard, and why "append everything" dies at the context limit.
- Open
Day 21
Tools
Function calling, JSON-schema tool definitions, and why every model-supplied argument is untrusted input until your code says otherwise.
Day 22
AI SaaS
Day 23
Deployment
Day 24 project
Agent Workbench
A tool-calling agent with a visible trace: every tool call, argument, result, and retry is rendered as a timeline you can inspect and replay. Give it three real tools — a search, a calculator, and a write-to-database — and a hard budget on steps so a loop cannot run forever.
Stack
- TypeScript
- Vercel AI SDK tool calling
- Zod schemas
- Postgres
- React
The hard parts
- Models that call a tool with arguments that pass your Zod schema but are semantically wrong, so validation succeeds and the result is nonsense.
- Terminating cleanly: distinguishing 'the task is done' from 'the model ran out of ideas and is repeating itself'.
- Making tool results small enough to fit back into the context window without discarding the part the model needed.
Why it belongs in your portfolio
Observability is what separates an agent demo from an agent product. A trace view and a step budget are the two things every production agent grows, and most portfolios have neither.