CHAPTER 01 · Anatomy of an AI Agent · 3 / 5
How the parts interact in one turn
Walk through a single user request to see the parts cooperate:
- The request arrives. The surrounding system authenticates the user and authorizes what they can touch.
- The orchestrator assembles context: it loads relevant memory (history, available artifacts), builds the system prompt, and gathers the tools available on this surface.
- The orchestrator calls the model with that context.
- The model streams reasoning and text, and may request tools. The orchestrator runs each tool (these may touch the surrounding system: storage, external APIs), and feeds results back into the loop.
- The model produces a final answer. The orchestrator streams it to the user and writes the outcome into memory.
Every chapter in this folder is, in effect, a deep look at one of these steps.