Lesson 00.02 · Phase 00 · Setup & Tooling
Python & TypeScript for agents
Agent code is mostly waiting: on models, on tools, on networks. The language features that matter are the ones that make waiting safe, typed, and concurrent.
Learning objectives
- Model chat messages as typed data and validate them where JSON enters your program.
- Run many slow model or tool calls concurrently, with a concurrency limit and a timeout on each.
- Stream a reply token by token with generators, in Python and TypeScript.
- Read agent code in either language, because the patterns map one to one.
You don't need to know all of Python to build agents, but you need four parts of it cold. Most agent bugs live in exactly these four places:
Loading the full lesson…