Components of an AI Agent
- Name the four core components of an AI agent and what each one does
- Distinguish between short-term and long-term agent memory
- Describe at least three common types of tools an agent can use
The Standard Architecture
Researcher Lilian Weng's 2023 breakdown of LLM-powered agents is widely cited as the clearest framework for thinking about agent components. It describes four building blocks: the LLM core, planning, memory, and tools. Almost every agent architecture today maps onto these four, even if the terminology differs.
1. The LLM Core (The Brain)
The LLM is the central reasoning engine. It reads the current state — what it perceives, what it remembers, what tools are available — and decides what to do next. Everything else in the agent is in service of making better decisions at this step.
The model's quality matters, but it's not the only thing that matters. A better model with poorly designed tools and no memory will be outperformed by a moderate model with well-designed tools and clean context. The LLM is the brain, but the architecture is the nervous system.
2. Planning
Planning is how the agent breaks a goal into steps. This can be explicit — the agent produces a written plan at the start and executes it — or implicit, where the agent decides on the next step at each iteration without writing out the whole sequence.
Common planning approaches include:
- Chain-of-thought — the model thinks through the problem step by step before deciding
- Tree of Thoughts — the model explores multiple reasoning paths before choosing one
- ReAct — alternates reasoning steps with action steps, so the agent can update its plan based on what it observes
3. Memory
Agents need memory to build on their own work across steps. There are two main types:
- Short-term (in-context) memory — the content currently in the LLM's context window: the conversation history, recent tool results, and working notes. It's fast and immediately available, but limited in size and lost when the session ends.
- Long-term (external) memory — stored outside the model, usually in a database. When the agent needs relevant past information, it retrieves it using a technique called RAG (Retrieval-Augmented Generation). This can hold far more information than a context window and persists across sessions.
4. Tools
Tools are callable functions that let the agent interact with the world beyond generating text. When the LLM decides it needs information or needs to take an action, it calls a tool with specific arguments, waits for the result, and incorporates that result into its next step.
Common tools include:
- Web search — retrieve current information the model wasn't trained on
- Code interpreter — run Python, JavaScript, or other code and return the output
- File system access — read, write, or delete files
- API calls — interact with external services (CRM, calendar, database, payment processor)
- Browser control — navigate web pages and extract content
What Actually Determines Agent Quality
A common finding among practitioners: agent quality depends more on tool design, memory structure, and evaluation setup than on simply using a stronger model. A well-designed tool with clear error messages and predictable outputs makes the agent's job far easier than a vague tool that returns inconsistent formats. Good architecture first; model upgrades later.
- The four core components are: LLM core (reasoning), planning (step decomposition), memory (context across time), and tools (acting in the world)
- Short-term memory lives in the context window; long-term memory lives in an external database and is retrieved via RAG
- Tool design matters as much as model choice — a well-structured tool with clear outputs reliably outperforms a stronger model with poorly designed tools
- Planning can be explicit (a written-out plan) or implicit (deciding one step at a time) — most production agents use a mix
Progress is saved in this browser only — clear your cache or switch device and it's gone. Create a free account and it follows you everywhere.