Part 8 · 5 chapters

Building Real-World Agents

Now we assemble everything into production-grade agents using modern frameworks, connect them to real tools through the Model Context Protocol, and coordinate multiple agents together.

Chapter 38Building Real-World Agents

Agent Frameworks Overview: LangGraph, CrewAI, and Agent SDKs

You have built agents from scratch in Part VII — the loop, tools, memory, planning. That foundation is exactly what lets this part go faster, because now we meet the **frameworks** that package all of that machinery for you. This chapter is a tour of the major framework families, what each is good at, and how to choose among them without getting swept up in hype. Because this is a fast-moving area, we focus on durable patterns rather than today's exact APIs, and we lean on a reassuring truth: every framework is built from the concepts you already understand.

Chapter 39Building Real-World Agents

Building a Single Agent with LangGraph

Time to build. In this chapter we take one framework — LangGraph — and use it to construct a complete single agent, turning the loop you already know into an explicit, controllable graph. LangGraph represents an agent as a graph of steps, which makes its control flow visible and easy to shape, and it is an excellent vehicle for understanding how a real framework organizes an agent. The code here shows the *shape* of LangGraph rather than its exact, ever-changing API, so the lessons transfer even as details evolve; always check the current documentation when you build for real.

Chapter 40Building Real-World Agents

The Model Context Protocol (MCP)

As you connect agents to more and more tools and data sources, a quiet problem emerges: every connection is custom, one-off wiring. The Model Context Protocol, or MCP, is the standard that solves this — a universal way for agents to plug into tools and data, much as a single port lets any device connect to any computer. MCP has gone from a niche idea to a widely adopted standard in a remarkably short time, and understanding it is increasingly essential for building real agents. This chapter explains what MCP is, why a standard matters so much, and how to use and build with it.

Chapter 41Building Real-World Agents

Multi-Agent Systems and Orchestration

So far we have built single agents. But some problems are best tackled not by one generalist agent but by a *team* of specialized agents working together — a researcher, a writer, a reviewer, each focused on what it does best. This chapter explores multi-agent systems: how several agents collaborate, the patterns for coordinating them, and — just as importantly — when a team of agents helps and when a single well-designed agent is the wiser choice. As always, we favor clear thinking over hype, because multiplying agents is as easy to overdo as it is to underuse.

Chapter 42Building Real-World Agents

Giving Agents Real Tools: Web, Code, Files, and APIs

An agent is only as capable as the tools it can reach, and the toy tools of earlier chapters — a calculator, a clock — were just warm-ups. This chapter connects agents to the messy, powerful real world: browsing the web, running code, reading and writing files, and calling external services. These capabilities are what make agents genuinely useful — and genuinely risky. So we cover each with two lenses always in view: **reliability** (real tools fail constantly) and **security** (real tools are where an agent can do real harm). This is where careful engineering separates a robust agent from a dangerous demo.

← Part 7Part 9