soev-agentsTutorials
Tutorials
Six tutorials that each build one agent, step by step, with a real model.
Each tutorial builds one agent, step by step, with a real model. You write the files of
each tutorial in its own folder in my_tutorials/, a directory that git ignores. The
complete code of each tutorial is in the same folder in
examples/tutorials, and CI runs it.
| Tutorial | You build | You learn |
|---|---|---|
| 1. Your first agent | A town assistant that answers questions from the town documents | ReActAgent, ReActConfig, @tool, threads and the trace |
| 2. Cite the documents | The same assistant, with a citation for each fact | Elements, bind, Recorded, element numbers, limits, citations, tool tests |
| 3. One agent for many users | One assistant that searches only the documents that each user can read | Resources, a config for each turn, prompt files, the agent and the graph |
| 4. Control what the model sees | The same assistant, with a context policy for long conversations | The context builder, what each model call receives, the context policy, reopen |
| 5. A refund agent with approval and a safe payment | A refund desk that asks an employee for approval and pays once | Agents and graphs of your own, routers, requests, effect steps and recovery |
| 6. Serve an agent and chat with it | A server for the agent of tutorial 3, and a command-line chat client | The thread API, resources from the HTTP request, server-sent events, streamed answers |
Do the tutorials in order. Tutorials 1 to 4 build one assistant, one step at a time. Tutorial 5 builds a new agent. Tutorial 6 serves the agent of tutorial 3.
You need Python 3.12 or later, uv, and a chat model with tool calls behind an OpenAI-compatible API.