The course
This course takes you from "what is an agent?" to shipping real applications built on one. Every lesson is short, and every lesson has one program behind it. The code on each page is copied from an example in the repository, and CI compiles every one of them, so what you read is what runs.
You do not need to know anything about agents to start. You do need a little Rust: functions, async, Result and ?. If you are coming from Python or TypeScript, the first lessons go slowly enough that the Rust stays out of the way.
How the lessons work
Each lesson has the same shape. We start with the problem, the moment in a real project where you would want this. Then we read the example together, a few lines at a time. Then you run it, and the page tells you what to look for in the output.
The online examples call anthropic/claude-haiku-5-5, priced in the built-in catalog at 0.10 dollars per million input tokens and 0.50 per million output tokens, and every one of them sets a spend cap in code of at most four cents per run. Set your key once:
export ANTHROPIC_API_KEY=sk-ant-...
and run any lesson from a clone of the repository with cargo run -p troupekit --example <name>. Lessons that need the knowledge or llama feature show the full command.
The levels
| Level | Lesson | What you build |
|---|---|---|
| 0 | Why agents, why Rust | a one-line agent, and a reason to want one |
| Beginner | Your first agent | an agent you build once and run many times |
| Beginner | Tools | an agent that looks things up instead of guessing |
| Beginner | Spend limits | an agent that stops before it overspends |
| Intermediate | Memory | an agent that remembers each user across restarts |
| Intermediate | Knowledge | an agent that answers from your documents |
| Intermediate | Graphs | a fixed chain of Rust steps and an agent |
| Intermediate | Tracing | a record of everything a run did |
| Advanced | Runs that survive a kill | a pipeline that finishes after its process dies |
| Advanced | Budgets across runs | a per-user cap that holds across restarts |
| Applications | A support agent with knowledge | answers from your articles, remembers customers, capped per customer |
| Applications | A research pipeline that survives a kill | two agents in a graph that finishes after its process dies |
| Applications | A spend-capped team of agents | three agents under one team budget |
| Applications | An offline assistant | a private agent on a model on the device; Apple Foundation Models from Swift and LiteRT-LM models from Kotlin since 0.4 |
The applications level puts the pieces together. Every application is a complete program you can run and change.