soev for developers
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.

TutorialYou buildYou learn
1. Your first agentA town assistant that answers questions from the town documentsReActAgent, ReActConfig, @tool, threads and the trace
2. Cite the documentsThe same assistant, with a citation for each factElements, bind, Recorded, element numbers, limits, citations, tool tests
3. One agent for many usersOne assistant that searches only the documents that each user can readResources, a config for each turn, prompt files, the agent and the graph
4. Control what the model seesThe same assistant, with a context policy for long conversationsThe context builder, what each model call receives, the context policy, reopen
5. A refund agent with approval and a safe paymentA refund desk that asks an employee for approval and pays onceAgents and graphs of your own, routers, requests, effect steps and recovery
6. Serve an agent and chat with itA server for the agent of tutorial 3, and a command-line chat clientThe 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.