Skip to content
ImagineWorld

AI Agents in Practice

node_idnode-book_ai-agents-in-practice
node_typenode-book
schema_profileworld.node_book.v1
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityinforms
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the agent-guides field, the work covers AI agents in practice — deployment lessons, patterns, and pitfalls from real use — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD
constitutional_citationCONSTITUTION
peer_node_books
book_titleAI Agents in Practice
book_publisherPackt Publishing
total_chapters9
updated_at2026-10-14T05:34:29Z
book_isbn9781805801351
book_copyrightCopyright © Packt Publishing
local graph

node-book_ai-agents-in-practice_chapter-01-evolution-of-genai-workflows — Evolution of GenAI Workflows

node-book_ai-agents-in-practice_chapter-02-the-rise-of-ai-agents — The Rise of AI Agents

node-book_ai-agents-in-practice_chapter-03-the-need-for-an-ai-orchestrator — The Need for an AI Orchestrator

node-book_ai-agents-in-practice_chapter-04-the-need-for-memory-and-context-management — The Need for Memory and Context Management

node-book_ai-agents-in-practice_chapter-05-the-need-for-tools-and-external-integrations — The Need for Tools and External Integrations

node-book_ai-agents-in-practice_chapter-06-building-your-first-ai-agent-with-langchain — Building Your First AI Agent with LangChain

node-book_ai-agents-in-practice_chapter-07-multi-agent-applications — Multi-Agent Applications

node-book_ai-agents-in-practice_chapter-08-orchestrating-intelligence-blueprint-for-next-gen-agent-prot — Orchestrating Intelligence: Blueprint for Next-Gen Agent Protocols

node-book_ai-agents-in-practice_chapter-09-navigating-ethical-challenges-in-real-world-ai — Navigating Ethical Challenges in Real-World AI

We are living in a time of accelerated change in artificial intelligence (AI), where models are no longer passive tools but active decision-makers. Since the release of ChatGPT in November 2022, the world has witnessed a seismic shift: not only in the capabilities of large language models (LLMs) but also in the way AI is architected, integrated, and operationalized within real-world systems.

A new paradigm has emerged—AI agents. Unlike traditional AI workflows, agents bring persistence, autonomy, and goal-oriented reasoning to applications. They can plan, remember, use tools, and interact with other agents or humans to complete complex tasks. From customer service to R&D, from orchestrating APIs to driving personalized workflows, AI agents are reshaping how we think about software and intelligence.

This book serves as a hands-on guide to understanding and building AI agents, covering their architecture, key components, and real-world use cases. Whether you are a developer, architect, product manager, or AI enthusiast, this book aims to give you the foundational knowledge and practical skills to harness the power of autonomous agents.

The book is structured into three parts:

  • Part 1, Foundations of AI Workflows and the Rise of AI Agents, explores how AI workflows have evolved since the rise of generative models, tracing the shift from simple API calls to more intelligent, autonomous behaviors. It introduces the concept of AI agents, their ingredients—LLMs, tools, memory, and context—and highlights the growing need for agentic systems across industries.
  • Part 2, Designing, Building, and Scaling AI Agents, dives into the practical aspects of agent development. It covers AI orchestration tools, memory and context handling, tool integration, and agent observability. This part also walks you through building single-agent and multi-agent applications using frameworks such as LangChain and LangGraph, with hands-on examples such as e-commerce assistants and customer support agents.
  • Part 3, Road to an Open, Agentic Ecosystem, looks ahead to the protocols, platforms, and principles shaping the future of intelligent software. It covers emerging open standards such as MCP, A2A, and NLWeb, and discusses how to build responsible, secure, and cost-effective agent systems for enterprise-scale deployment. It will also cover responsible AI practices, including evaluation, safety mechanisms, and human oversight.

This book is for developers, architects, innovation leaders, and researchers who want to unlock the full potential of AI agents. Whether you’re a software engineer building agent-based workflows, a product owner designing intelligent assistants, or a business strategist looking to embed autonomous decision-making into your systems, this book offers the frameworks, examples, and tools you need to get started—and scale.

Chapter 1, Evolution of GenAI Workflows, traces the transformation of AI workflows since late 2022, from simple API interactions to retrieval-augmented generation (RAG). It explores recent breakthroughs such as fine-tuning, model distillation, and reinforcement learning from human feedback (RLHF), and introduces the need for more autonomous, agentic behaviors.

Chapter 2, The Rise of AI Agents, defines what AI agents are and how they differ from previous automation paradigms such as RPA. It introduces different types of agents and the key components that make up their architecture, including system messages, tools, memory, and data.

Chapter 3, The Need for an AI Orchestrator, examines the emerging role of orchestration layers in LLM-based applications. It compares popular orchestrators, describes their components, and provides guidance on selecting the right orchestrator for your needs.

Chapter 4, The Need for Memory and Context Management, dives into how agents can store, retrieve, and update information through various types of memory (short-term, long-term, episodic, and semantic), along with techniques to manage context windows and leverage vector databases.

Chapter 5, The Need for Tools and External Integrations, explores how agents use APIs, databases, and third-party services to interact with the world. It also discusses asynchronous versus synchronous calls and how to enable observability through monitoring and logging.

Chapter 6, Building Your First AI Agent with LangChain, walks you through building your own single-agent applications using LangChain, including two practical use cases: an e-commerce assistant and a customer support agent.

Chapter 7, Multi-Agent Applications, explores what happens when multiple agents work together. It covers design patterns such as group chat, hierarchical, and sequential coordination, introduces orchestrators such as LangGraph and AutoGen, and guides you in building your first multi-agent system.

Chapter 8, Orchestrating Intelligence: Blueprint for Next-Gen Agent Protocols, introduces emerging standards and protocols—such as MCP, A2A, ACP, and NLWeb—that aim to define the next layer of the intelligent web for interoperable agents.

Chapter 9, Navigating Ethical Challenges in Real-World AI, highlights the critical importance of designing agent systems responsibly. It covers evaluation strategies, security filters, cost control, and the implementation of guardrails and human-in-the-loop systems to ensure safe and ethical deployment of autonomous AI agents.

Following along will be easier if you bear the following in mind:

  • Learn through hands-on examples: Many chapters include real-world scenarios and practical exercises. Whenever possible, follow along by building your own AI agents using frameworks such as LangChain and LangGraph, and try deploying them using APIs, vector databases, and orchestrators.
  • Experiment with different agent behaviors: Agent design is not one-size-fits-all. Modify tools, memory strategies, and workflows to see how they affect outcomes. Play with different architectures—single-agent, multi-agent, and hierarchical—to explore their strengths and trade-offs.
  • Explore the open source tools and orchestration frameworks: This book covers a wide range of technologies. Take time to dive into the documentation for LangChain, LangGraph, and LangSmith to understand how to extend and fine-tune your own implementations.
  • Think beyond the basics: The agentic paradigm is still evolving rapidly. Use this book as a launchpad, but stay current with the latest protocols, research papers, and advancements in LLM orchestration, tool use, and agent collaboration to deepen your expertise.

Here is a list of things you need to have:

Software/hardware covered in the bookSystem requirements
Python 3.10 or higherWindows, macOS, or Linux
Node.jsWindows, macOS, or Linux
LLM chat and embedding modelsWindows, macOS, or Linux You can decide to leverage your LLM of choice. Throughout the book, we will be using GPT-4o from Azure OpenAI or OpenAI. Other options include (but are not limited to) the following: Hugging Face Hub Anthropic Gemini

The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/AI-Agents-in-Practice.

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and X handles. For example, “Launch a mock JSON server on localhost:3000 to enable the cart management tool.”

A block of code is set as follows:

from langchain_huggingface import HuggingFacePipeline
llm = HuggingFacePipeline.from_model_id(
model_id="microsoft/Phi-3-mini-4k-instruct",
task="text-generation",
pipeline_kwargs={
"max_new_tokens": 100, "top_k": 50,
"temperature": 0.1,
},
)
llm.invoke("Your query here")

Bold: Indicates a new term, an important word, or words that you see on the screen, for example, in menus or dialog boxes. For example: “LangChain was introduced in October 2022 as an open source framework aimed at simplifying the development of applications powered by large language models (LLMs).”

Warnings or important notes appear like this.

Tips and tricks appear like this.

The author acknowledges the use of cutting-edge AI, such as ChatGPT and GitHub Copilot, with the sole aim of enhancing the language and clarity within the book, thereby ensuring a smooth reading experience for readers. It’s important to note that the content itself has been crafted by the author and edited by a professional publishing team.

You’re not the only one navigating fragmented tools, constant updates, and unclear best practices. Join a growing community of professionals exchanging insights that don’t make it into documentation.

Stay informed with updates, discussions, and behind-the-scenes insights from our authors. Join our Discord space at or scan the QR code below: Connect with peers, share ideas, and discuss real-world GenAI challenges. Follow us on Reddit at or scan the QR code below: A qr code on a white background AI-generated content may be incorrect.

Keep your purchase invoice for this book ready, as you’ll need it in Step 3. If you received a physical invoice, scan it on your phone and have it ready as either a PDF, JPG, or PNG.

For more help on finding your invoice, visit

Note: Did you buy this book directly from Packt? You don’t need an invoice. After completing Step 2, you can jump straight to your exclusive content.

## Step 2 Scan this QR code or go to packtpub.com/unlock.

On the page that opens (which will look similar to Figure 0.2 if you’re on desktop), search for this book by name. Make sure you select the correct edition.

A screenshot of a web page AI-generated content may be incorrect.

Figure 0.2: Packt unlock landing page on desktop

Sign in to your Packt account or create a new one for free. Once you’re logged in, upload your invoice. It can be in PDF, PNG, or JPG format and must be no larger than 10 MB. Follow the rest of the instructions on the screen to complete the process.

## Need help? If you get stuck and need help, visit for a detailed FAQ on how to find your invoices and more. The following QR code will take you to the help page directly:

Note: If you are still facing issues, reach out to .


Source: