Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Dissecting AI Agents: Core Components

Introduction

In our last lesson, we established the strategic value of agentic AI, framing it in terms of risk mitigation, cost reduction, and product innovation for financial services. We moved from the conceptual model of an agent—the perceive-plan-act cycle—to the business case for why an enterprise should invest in this technology.

This lesson marks our transition into Module 3, where we pivot from the "why" to the technical "how." Our objective is to map the core components of an agent: the LLM backbone, memory, tools, and an orchestration layer. You will learn to see an agent not as a magical black box, but as an engineered system with distinct, interacting parts. This architectural decomposition is the first and most critical step for anyone aspiring to design and build these systems.

The Agentic Stack: A Systems View

Before we dissect the individual agent, it's crucial to place it within a larger architectural context. A production-grade agent doesn't exist in a vacuum; it's part of a layered system designed for coordination, governance, and scalability. This is the "systems thinking" approach that separates robust enterprise solutions from simple prototypes.

A clear and practical way to model this is through a layered architecture, often called the "agentic stack."

Agentic architecture: a systems thinking guide for enterprise brands

The article 'Agentic architecture: a systems thinking guide for enterprise brands' from Algolia provides an excellent breakdown of this layered model. It's a high-signal overview that will help you structure your thinking about where different components fit.

Please read the section titled 'The agentic stack: how layers work together'. As you read, study the diagram provided in that section and focus on the role of each of the six layers: Application, Orchestration, Agent, Context and Memory, Data, and Model.

This layered model gives us a complete blueprint. The four core components we are focusing on in this lesson map directly onto this stack:

  • LLM Backbone is the Model Layer.
  • Memory is the Context and Memory Layer.
  • Tools are the capabilities used by the Agent Layer to interact with the Data Layer and other external systems.
  • The Orchestration Layer is the coordinator that manages the entire workflow.

With this high-level map in place, let's zoom in on the agent itself and examine each of these fundamental components in detail.

Deconstructing the Agent: The Four Core Components

We'll now break down the agent into its constituent parts. Think of this as opening the chassis to inspect the engine, the memory banks, and the actuators.

Core Components of an LLM Agent
This diagram provides a clear visual of the primary components of an agent. The Large Language Model (LLM) acts as the central 'brain' for reasoning. It interacts with Memory, uses Tools to take Action on an Environment, and receives Results, all within a continuous loop to arrive at a Decision.

Let's explore each of these components.

1. The LLM Backbone: The Reasoning Engine

The Large Language Model is the "brain" of the agent. Its primary role is not just to generate text, but to perform the cognitive work of reasoning, understanding, and planning.

Reasoning, Memory, and the Core Capabilities of Agentic AI

This article from Unstructured.io provides a precise definition of the LLM's role as the cognitive core of the agent.

Read the section 'The LLM as the Agentic Reasoning Engine'. Focus on how it distinguishes agentic software from traditional programs and the LLM's role in understanding instructions and decomposing them into a plan.

A critical architectural point is that the LLM itself is stateless. It has no memory of past interactions. All the information it needs to make a decision must be provided within a single request, in what is known as the "context." The orchestration layer is responsible for assembling this context for every call to the LLM.

2. The Orchestration Layer: The Conductor

While the LLM is the brain, the orchestration layer is the central nervous system. It's the code that manages the entire process. It receives the user's initial request, prepares the context for the LLM, executes the tools the LLM requests, and formats the final response.

Many people use the term "agent" to refer to the whole system, but for an architect, it's more precise to think of the orchestration logic as the "agent" itself, which uses an LLM, tools, and memory.

AI Agent Architecture Explained: LLMs, Context & Tool Execution

This video from the 'DevOps & AI Toolkit' channel offers a crisp, no-fluff explanation of this distinction and the orchestrator's role.

Please watch these two short clips: Defining the Roles (02:31 - 03:38): Pay close attention to the precise distinction between the 'agentic system' (the whole thing) and the 'agent' (the orchestration layer). Recap (11:21 - 12:08): This segment provides a concise summary, describing the agent as the 'dumb actor' that purely executes and coordinates, while the LLM provides the 'brains'. This separation of concerns is a fundamental design principle.

This orchestrator manages the core agentic loop: Think -> Act -> Observe.

  1. Think: The orchestrator sends the current situation (user query, past actions) to the LLM. The LLM reasons about it and decides on the next step.
  2. Act: If the LLM decides to use a tool, the orchestrator executes that tool call.
  3. Observe: The orchestrator takes the result from the tool and adds it to the history.
    This loop repeats until the LLM determines the goal has been met.

3. Tools: The Hands and Senses

Tools are what give an agent the ability to go beyond its internal knowledge and interact with the outside world. They are the agent's "hands and senses." A tool can be anything from a simple function to a complex API call:

  • Searching the web
  • Querying a database (e.g., to check a client's portfolio)
  • Calling an external API (e.g., a stock price service)
  • Reading or writing to a file
  • Interacting with other software systems

The crucial interaction pattern here is that the LLM decides which tool to use and with what parameters, but it is the orchestrator that actually executes the tool call.

AI Agent Architecture Explained: LLMs, Context & Tool Execution

Let's return to the 'DevOps & AI Toolkit' video for a clear explanation of how tools are integrated.

Watch the segment on tools (05:31 - 07:35). Focus on how the agent provides the LLM with tool descriptions in the context, and the strict separation between the LLM requesting a tool and the agent executing it.

This design is secure and predictable. The LLM operates in a sandboxed environment, only able to suggest actions, while the orchestration layer maintains full control over execution, permissions, and interaction with live systems.

4. Memory: The Foundation for Context and Learning

Memory is what elevates an agent from a one-shot tool to a stateful entity that can handle complex, multi-step tasks and learn over time. Architecturally, we distinguish between two types of memory.

Reasoning, Memory, and the Core Capabilities of Agentic AI

The Unstructured.io article provides a detailed architectural breakdown of agent memory, mirroring concepts from human cognition. This structured approach is highly valuable for system design.

Read the section titled '3) Memory: The Foundation for Context and Learning'. Pay close attention to the distinction between: Short-Term Memory (Context Window): The agent's immediate 'working memory'. Long-Term Memory: The agent's persistent knowledge store, and its sub-types (Episodic, Semantic, Procedural).

To use a pragmatic analogy from your background, think of it this way:

  • Short-Term Memory is like the open case file on your desk—all the immediate documents and notes for the task at hand.
  • Long-Term Memory is the firm's entire library and case history archive.
    • Episodic memory is the archive of past cases (what did we do last time?).
    • Semantic memory is the law library (what are the facts and regulations?).
    • Procedural memory represents established best practices and workflows (what is our standard process for due diligence?).

Effectively engineering these memory systems, often using the Retrieval-Augmented Generation (RAG) pattern we discussed in Module 1, is what allows an agent to maintain context, learn from experience, and act with relevant, up-to-date information.

Conclusion

In this lesson, we have deconstructed the AI agent into its four essential architectural components. You now have a precise, technical map of how an agent is built.

Key Takeaways:

  • An enterprise-grade agent operates within a layered agentic stack that separates concerns like user interface, orchestration, data, and models.
  • The four core components of a single agent are:
    1. LLM Backbone: The stateless reasoning engine that provides the cognitive power.
    2. Orchestration Layer: The "agent" itself; the code that manages the entire control loop.
    3. Tools: The agent's connection to the outside world, enabling it to take action and perceive its environment.
    4. Memory: The system for maintaining state, divided into short-term (working context) and long-term (persistent knowledge).
  • These components work together in a Think -> Act -> Observe loop, managed by the orchestrator, to autonomously pursue goals.

Preview of the Next Lesson:

Having mapped the core components, we will now begin to zoom in on each one. In the next lesson, we will focus exclusively on Tools. You will learn the mechanics of how agents invoke external tools and APIs, how tool descriptions are formatted, and how the LLM makes decisions about which tool to use. This is where the agent's ability to "do things" comes to life.

Can't find a good explanation? Sign up and we'll make it for you

Sign up