Agent architecture
The orchestrator
Design the runtime that controls model calls, state, budgets, and stopping conditions.
Lesson overview
The orchestrator
The orchestrator owns the agent loop. It should load state, construct model input, receive a decision, dispatch approved tools, persist results, and decide whether another iteration is allowed.
Keep orchestration deterministic where possible. The model can choose an action, but the orchestrator decides whether that action can execute.
Learning path
Theory → Example → Code → Practice → Quiz → Challenge → Completion
Step 1
Theory
The orchestrator
The orchestrator owns the agent loop. It should load state, construct model input, receive a decision, dispatch approved tools, persist results, and decide whether another iteration is allowed.
Keep orchestration deterministic where possible. The model can choose an action, but the orchestrator decides whether that action can execute.
Step 2
Example
Example
Apply The orchestrator to a realistic production scenario and trace the decision step by step.
Step 3
Code
Code
Add implementation notes or a runnable example for this concept.
Step 4
Practice
Practice
Write down the inputs, expected output, constraints, and one failure case for The orchestrator.
Step 5
Quiz
Quiz coming soon.
Step 6
Challenge
Challenge
Design a production-ready solution for The orchestrator and explain one important trade-off.
Complete every stage
Work through every step in order, then the lesson will be marked complete.
Each chapter and subtopic has its own public URL under /ai-agent.