liveBook · Manning

Chapter 1: What are LLM Agents and Multi-Agent Systems?

What you will learn in chapter 1 of Build a Multi-Agent System (from Scratch)

Introduces how LLM agents turn generated intentions into actions through tool-calling and how multiple agents can collaborate in a system.

After this chapter you will be able to

Section by section

Introduction

Introduces how LLM agents turn generated intentions into actions through tool-calling and how multiple agents can collaborate in a system.

Key terms: LLM agents, orchestration systems, tool-calling, tool-call request, multi-agent systems, MAS, subagents, local agents, Agent2Agent, A2A

1.1 Where LLM agents and multi-agent systems are useful

This section explains why multi-agent systems can be useful for tasks handled by LLM agents.

Key terms: multi-agent systems, parallelization, subtasks, focused LLM agents

1.1.1 Report generation

This section explains how LLM agents can generate reports and how multiple agents can divide and fact-check the work.

Key terms: report generation, synthesizing, structured output format, MAS, fact-checker LLM agent, hallucinations, backbone LLM

1.1.2 Web search and deep search

This section describes web search and deep research as LLM agent applications and outlines ways to distribute research across multiple agents.

Key terms: LLM agents, web search tools, enhanced reasoning, deep research, multi-step orchestration, synthesis, report generation, MAS, orchestration steps, deep search agents

1.1.3 Search and retrieval agents

This section describes how agents retrieve information from knowledge bases, specialize across them, and help maintain them.

Key terms: retrieval-augmented generation, RAG, agentic RAG, knowledge stores, MAS, knowledge base, search and retrieval agent, routed, knowledge bases, update knowledge

1.1.4 Coding LLM agents

This section describes how coding agents change developers’ roles, distribute coding tasks, and create challenges for development infrastructure and code review.

Key terms: LLM agents, design, architecture, subagents, session, Git worktree, harness, version control, code review, multiple providers

1.1.5 Computer use for personal assistants

This section explains how computer-use permissions enable LLM agents to act as flexible personal assistants and contrasts them with traditional rules-based automation.

Key terms: computer use, personal assistants, tools, Robotic Process Automation, RPA, reasoning

1.2 What is an LLM agent?

This section defines an LLM agent as a system that combines a backbone LLM with tools to act autonomously on a user's behalf.

Key terms: LLM agent, backbone LLM, tools, tool-call requests, plans, autonomous system

1.2.1 Prerequisite LLM capabilities

This section explains the planning and tool-calling capabilities a backbone LLM needs to help an agent execute tasks.

Key terms: backbone LLM, planning, processing loop, Chain-of-Thought, few-shot exemplars, reasoning LLMs, tool equipping, tool-call request, tool identifier, parameters

1.3 The processing loop

This section explains how an LLM agent uses a processing loop to carry out a task, how its trajectory can be inspected, and how LLM agents differ from specialized LAM agents.

Key terms: processing loop, sub-steps, planning, tool calls, stopping condition, trajectory, rollout, plans, LLM agent, large action model

1.4 Important enhancements and patterns

This section explains how memory and human involvement can improve LLM agent task execution, along with the trade-offs involved.

Key terms: memory modules, context, processing loop, tool calls, human-in-the-loop, cascading errors, task result, human in the loop, error acceptance rates, execution times

1.5 Protocols for LLM agents

This section introduces three standards for LLM agent ecosystems and distinguishes LLM agents from reinforcement learning agents.

Key terms: Model Context Protocol, MCP, MCP-compatible tools, Agent Skills, skills, SKILL.md, compliant agent client, Agent2Agent Protocol, A2A, agent-to-agent communication

1.6 Assembling LLM agents into MAS

This section explains how specialized LLM agents can be assembled into multi-agent systems, including interoperable systems using remote A2A agents.

Key terms: MAS, coordinator, subagents, subtasks, processing loops, system-level instructions, tools, skills, memory systems, default subagents

1.7 What we’re building in this book

This section explains why the book builds an educational LLM agent framework from scratch and outlines its module organization.

Key terms: framework developers, application developers, production-grade, under the hood, base, tools, llms, agent, memory, skills

1.8 Code resources for this book

This introduction recommends coding along with the book’s hands-on framework to deepen understanding of LLM agents.

1.8.1 GitHub Repository

The section identifies the book’s GitHub repository and describes its code, learning resources, and community uses.

Key terms: GitHub repository, source code, example notebooks, bonus materials, community examples

1.8.2 Code Listings — Source Code

This section explains how code listings contribute to the framework source and indicate where their code should be saved.

Key terms: code listings, source code, module, subfolders

1.8.3 Code Snippets — Example Notebooks

This section distinguishes example code snippets from framework source code and explains where to find and run them.

Key terms: code snippets, framework’s source code, Jupyter Notebook, examples/

1.8.4 Additional Examples and Capstone Projects

This section distinguishes the book’s additional examples and capstone projects and the framework-developer and application-developer perspectives.

Key terms: additional examples and exercises, capstone projects, framework developers, application developers

1.8.5 Running the chapter notebooks

This section explains the prerequisite and general steps for launching the chapter Jupyter notebooks.

Key terms: Jupyter notebooks, uv, dependencies, package builds

1.8.6 Setting the LLM

This section explains how to choose and prepare a backbone LLM for the chapter notebooks, including cloud, local, and hosted-compute options.

Key terms: backbone LLM, Ollama cloud models, Ollama API key, local Ollama models, Ollama service, CPU, Lightning AI, book template, Studio, L4 GPU

1.9 The basics of UML diagrams

This section introduces the class and sequence diagram basics used to communicate the book’s implementation designs.

Key terms: UML class diagram, attribute, method, dependency relationship, BaseTool, ToolCallResult, UML sequence diagram, participants, lifeline, messages

1.10 Our roadmap

This section outlines the three-part roadmap for building and enhancing LLM agents and assembling them into multi-agent systems.

1.11 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Working with Tools →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.