Core Concepts
Before building with agents, it helps to have clear mental models for the key pieces. Think of these concepts like understanding the parts of a car before you learn to drive.
Understanding these concepts lets you:
- Choose the right tool for a given problem instead of guessing
- Debug faster β when something breaks, you'll know which layer to look at
- Compose systems confidently β knowing how pieces fit together makes you a better architect
- Communicate clearly with teammates, docs, and AI assistants
The five core concepts
Concept map β how they relate
Every agent system is built from these five pieces, each playing a distinct role:
| Concept | Role | Analogy |
|---|---|---|
| Model | Reasons and generates text | The brain |
| Agent | Model + goals + decision loop | The person |
| Harness | Orchestrates the agent in a workflow | The job description |
| Memory | Stores and retrieves context | The notebook |
| Tools | Lets the agent act on the world | The hands |
A minimal agent needs only a model and a goal. As you add memory and tools, the agent becomes more capable. The harness is what ties it all together into something you can actually ship.
The three-layer mental model
Every AI agent system has three layers:
βββββββββββββββββββββββββββββββββββ
β YOUR APPLICATION β β What users see and interact with
βββββββββββββββββββββββββββββββββββ€
β AGENT HARNESS β β Orchestration, memory, tools, routing
βββββββββββββββββββββββββββββββββββ€
β AI MODEL β β The reasoning engine (Claude, GPT, etc.)
βββββββββββββββββββββββββββββββββββYou don't have to build all three yourself β that's what the tools in this cookbook are for. But understanding what lives at each layer makes you dramatically better at both using and building agent systems.
Where to start
If you're new to agents, read the concepts in this order:
- Models β understand what the model actually does
- Agents β see how a model becomes an agent
- Tools β learn how agents take action
- Memory β learn how agents maintain context
- Harnesses β see how it all gets wired together
Once you have a feel for these building blocks, head to the Recipes section to see them in action.