1 What are LLM Agents and Multi-Agent Systems?
Large language models can describe what they would do to solve a task, but on their own they cannot actually carry out those actions. The chapter introduces LLM agents as the systems that bridge that gap by taking an LLM’s plans and tool-call requests and turning them into real execution. In this setup, the model becomes the reasoning and language core, while the surrounding orchestration handles tools, actions, and the back-and-forth needed to complete work for a user.
The chapter emphasizes that LLM agents become useful when paired with capabilities such as planning, tool use, memory, and human oversight. Planning helps an agent decide what to do next and revise its approach as it learns from earlier steps, while tool-calling lets it use external functions like search, code execution, or browser control. These capabilities support many practical applications, including report generation, web and deep research, retrieval-augmented generation, coding assistants, and computer-use workflows that can automate tasks previously handled by rigid rule-based systems.
It also explains when multiple agents should be combined into a multi-agent system: when a task can be broken into smaller parts that are better handled by specialized agents working together. The chapter highlights protocols such as MCP for accessing tools and resources, Agent Skills for reusable workflows, and A2A for agent-to-agent communication, then previews the book’s hands-on approach of building an agent framework from scratch. That roadmap covers core tool and model interfaces first, then enhancements like memory, skills, and human-in-the-loop control, and finally multi-agent coordination, all to deepen understanding of how these systems work under the hood.
The applications for LLM agents are many, including agentic RAG, report generation, deep search and computer use, all of which can benefit from MAS.
An LLM agent is comprised of a backbone LLM and its equipped tools.
LLM agents utilize the planning capability of backbone LLMs to formulate initial plans for tasks, as well as to adapt current plans based on the results of past steps or actions taken towards task completion.
An illustration of the tool-equipping process, where a textual description of the tool that contains the tool’s name, description and its parameters is provided to the LLM agent.
The tool-calling process, where any equipped tool can be used.
A mental model of an LLM agent performing a task through its processing loop, where tool calling and planning are used repeatedly. The task is executed through a series of sub-steps, a typical approach for performing tasks.
An LLM agent that has access to memory modules where it can store key information of task executions and load this back into its context for future tasks.
A mental model of the LLM agent processing loop that has memory modules for saving and loading important information obtained during task execution.
An LLM agent processing loop with access to human operators. The processing loop is effectively paused each time a human operator is required to provide input.
Multiple LLM agents collaborating to complete an overarching task. The outcomes of each LLM agent’s processing loop are combined to form the overall task result.
The difference between LLM agent framework developers and application developers
A first look at the llm-agents-from-scratch framework that we’ll build together.
A simple UML class diagram that shows two classes from the llm-agents-from-scratch framework. The BaseTool class lives in the base module, while the ToolCallResult lives in the data_structures module. The attributes and methods of both classes are indicated in their respective class diagrams and the relation between them is also described.
A UML sequence diagram that illustrates how the flow of a tool call. First, an LLM agent prepares a ToolCall object and invokes the BaseTool, which initiates the processing of the tool call. Once completed, the BaseTool class constructs a ToolCallResult which then gets sent back to the LLM agent.
The build plan for our llm-agents-from-scratch framework
Summary
- LLMs have become very powerful text generators that have been applied successfully to tasks like text summarization, question-answering, and text classification, but they have a critical limitation in that they cannot act; they can only express an intent to act (such as making a tool call) through text. That’s where LLM agents come in to bring in the ability to carry out the intended actions.
- Applications for LLM agents are many, such as report generation, deep research, computer use and coding.
- With MAS, individual LLM agents collaborate to collectively perform tasks.
- Many applications for LLM agents can further benefit from MAS. In principle, MAS excel when complex tasks can be decomposed into smaller subtasks, where specialized LLM agents outperform general-purpose LLM agents.
- LLM agents are systems comprised of an LLM and tools that can act autonomously to perform tasks.
- LLM agents use a processing loop to execute tasks. Tool calling and planning capabilities are key components of that processing loop.
- Protocols like MCP, Agent Skills, and A2A have helped to create a vibrant LLM agent ecosystem that is powering the growth of LLM agents and their applications.
- MCP is a protocol developed by Anthropic that has paved the way for LLM agents to use third-party provided tools.
- Agent Skills is another protocol that originated from Anthropic that standardizes how reusable workflows are documented and used by LLM agents
- A2A is a protocol developed by Google to standardize agent-to-agent interactions in MAS.
- In this book, we’ll primarily be framework developers, building our own LLM agent framework to learn the internals of LLM agents more deeply.
- Supplementary materials in the form of additional example notebooks and capstone projects are provided in the book’s GitHub repository to deepen your learning.
FAQ
What is an LLM agent in this chapter’s definition?
An LLM agent is an autonomous system made up of a backbone LLM and tools that can act on the LLM’s tool-call requests and plans to perform tasks on behalf of a user.
Why are LLMs alone insufficient to act like agents?
LLMs can generate text and express intent or plans, but they cannot directly carry out actions. They need an orchestration system around them to execute tool calls and turn those intentions into real task steps.
How does tool calling help an LLM agent work?
Tool calling lets the LLM describe, in text, which tool it wants to use and with what parameters. The agent then executes that request, returns the result to the LLM, and the LLM synthesizes the outcome into a response or next step.
What kinds of tasks are good fits for LLM agents?
LLM agents are useful for report generation, web search, deep research, agentic RAG, coding tasks, and computer-use automation. They are especially helpful when tasks can be broken into multiple steps and supported by tools.
What is the difference between web search and deep search?
Web search typically answers general user queries using search tools. Deep search, or deep research, adds multi-step orchestration such as planning, browsing multiple pages, reasoning over findings, and generating a synthesized report.
What is agentic RAG?
Agentic RAG is a retrieval-augmented generation setup where an LLM agent uses tools to query knowledge stores or indexed documents. It retrieves relevant context from those sources and uses it to answer user questions.
Why would multiple LLM agents be combined into a multi-agent system?
A multi-agent system can improve performance by assigning different subtasks to specialized agents. This works well when a complex task can be decomposed into smaller parts that focused agents can handle better than one general-purpose agent.
What two backbone LLM capabilities are important for an effective agent?
Planning and tool calling are the two key capabilities. Planning helps the agent decide what to do next, while tool calling allows it to request and use external tools during task execution.
What role do memory and human-in-the-loop play in LLM agents?
Memory lets agents save useful results from past tasks and reload them later, reducing repeated work and improving efficiency. Human-in-the-loop adds review or approval steps to reduce errors, though it increases execution time.
Which protocols are highlighted as important for LLM agents and MAS?
The chapter highlights MCP for third-party tools and resources, Agent Skills for reusable workflows, and A2A for agent-to-agent communication. These standards help agents and multi-agent systems interoperate across frameworks.
Build a Multi-Agent System (from Scratch) ebook for free