Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the authors
OK
Generative AI with LangChain: Build production-ready LLM applications and advanced agents using Python, LangChain, and LangGraph
Purchase options and add-ons
Go beyond foundational LangChain documentation with detailed coverage of LangGraph interfaces, design patterns for building AI agents, and scalable architectures used in production—ideal for Python developers building GenAI applications
Key Features
- Bridge the gap between prototype and production with robust LangGraph agent architectures
- Apply enterprise-grade practices for testing, observability, and monitoring
- Build specialized agents for software development and data analysis
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
This second edition tackles the biggest challenge facing companies in AI today: moving from prototypes to production. Fully updated to reflect the latest developments in the LangChain ecosystem, it captures how modern AI systems are developed, deployed, and scaled in enterprise environments. This edition places a strong focus on multi-agent architectures, robust LangGraph workflows, and advanced retrieval-augmented generation (RAG) pipelines.
You'll explore design patterns for building agentic systems, with practical implementations of multi-agent setups for complex tasks. The book guides you through reasoning techniques such as Tree-of -Thoughts, structured generation, and agent handoffs—complete with error handling examples. Expanded chapters on testing, evaluation, and deployment address the demands of modern LLM applications, showing you how to design secure, compliant AI systems with built-in safeguards and responsible development principles. This edition also expands RAG coverage with guidance on hybrid search, re-ranking, and fact-checking pipelines to enhance output accuracy.
Whether you're extending existing workflows or architecting multi-agent systems from scratch, this book provides the technical depth and practical instruction needed to design LLM applications ready for success in production environments.
What you will learn
- Design and implement multi-agent systems using LangGraph
- Implement testing strategies that identify issues before deployment
- Deploy observability and monitoring solutions for production environments
- Build agentic RAG systems with re-ranking capabilities
- Architect scalable, production-ready AI agents using LangGraph and MCP
- Work with the latest LLMs and providers like Google Gemini, Anthropic, Mistral, DeepSeek, and OpenAI's o3-mini
- Design secure, compliant AI systems aligned with modern ethical practices
Who this book is for
This book is for developers, researchers, and anyone looking to learn more about LangChain and LangGraph. With a strong emphasis on enterprise deployment patterns, it’s especially valuable for teams implementing LLM solutions at scale. While the first edition focused on individual developers, this updated edition expands its reach to support engineering teams and decision-makers working on enterprise-scale LLM strategies. A basic understanding of Python is required, and familiarity with machine learning will help you get the most out of this book.
Table of Contents
- The Rise of Generative AI: From Language Models to Agents
- First Steps with LangChain
- Building Workflows with LangGraph
- Building Intelligent RAG Systems with LangChain
- Building Intelligent Agents
- Advanced Applications and Multi-Agent Systems
- Software Development and Data Analysis Agents
- Evaluation and Testing
- Observability and Production Deployment
- The Future of LLM Applications
- ISBN-101837022011
- ISBN-13978-1837022014
- Edition2nd ed.
- PublisherPackt Publishing
- Publication dateMay 23, 2025
- LanguageEnglish
- Dimensions7.5 x 1.09 x 9.25 inches
- Print length476 pages
Frequently bought together

Customers who viewed this item also viewed
AI Engineering: Building Applications with Foundation ModelsPaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
Building AI Agents with LLMs, RAG, and Knowledge Graphs: A practical guide to autonomous and modern AI agentsPaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
AI Agents and Applications: With LangChain, LangGraph, and MCPPaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
LLM Engineer's Handbook: Master the art of engineering large language models from concept to productionPaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
Agentic Architectural Patterns for Building Multi-Agent Systems: Proven design patterns and practices for GenAI, agents, RAG, LLMOps, and enterprise-scale AI systemsPaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
Build a Large Language Model (From Scratch)PaperbackFREE Shipping by AmazonGet it as soon as Thursday, Jun 11
Customers also bought or read
- Building AI Agents with LLMs, RAG, and Knowledge Graphs: A practical guide to autonomous and modern AI agents
Paperback$44.99$44.99FREE delivery Thu, Jun 11 - Building Agentic AI Systems: Create intelligent, autonomous AI agents that can reason, plan, and adapt
Paperback$41.24$41.24FREE delivery Thu, Jun 11 - Generative AI with Python and PyTorch: Navigating the AI frontier with LLMs, Stable Diffusion, and next-gen AI applications
Paperback$32.99$32.99Delivery Thu, Jun 11 - Agentic Architectural Patterns for Building Multi-Agent Systems: Proven design patterns and practices for GenAI, agents, RAG, LLMOps, and enterprise-scale AI systems
Paperback$49.99$49.99FREE delivery Thu, Jun 11 - Learning LangChain: Building AI and LLM Applications with LangChain and LangGraph
Paperback$56.06$56.06FREE delivery Thu, Jun 11 - Building Applications with AI Agents: Designing and Implementing Multiagent Systems
Paperback$59.57$59.57FREE delivery Thu, Jun 11 - Learn Model Context Protocol with Python: Build agentic systems in Python with the new standard for AI capabilities
Paperback$36.99$36.99FREE delivery Thu, Jun 11 - LLM Engineer's Handbook: Master the art of engineering large language models from concept to production
Paperback$44.99$44.99FREE delivery Thu, Jun 11 - Context Engineering for Multi-Agent Systems: Move beyond prompting to build a Context Engine, a transparent architecture of context and reasoning
Paperback$54.99$54.99FREE delivery Thu, Jun 11 - Design Multi-Agent AI Systems Using MCP and A2A: Engineer your own Python-based agentic AI framework with tool use, memory, and multi-agent workflows
Paperback$43.99$43.99FREE delivery Thu, Jun 11 - Agentic Coding with Claude Code: The everyday developer's guide to agentic coding with Claude Code
Just releasedPaperback$49.99$49.99FREE delivery Thu, Jun 11 - AI Agents in Action: Build, orchestrate, and deploy autonomous multi-agent systems
Paperback$41.64$41.64FREE delivery Thu, Jun 11 - Unlocking Data with Generative AI and RAG: Enhance generative AI systems by integrating internal data with large language models using RAG
Paperback$44.99$44.99FREE delivery Thu, Jun 11 - Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents
Paperback$46.40$46.40FREE delivery Thu, Jun 11 - AI Engineering: Building Applications with Foundation Models#1 Best SellerNatural Language Processing
Paperback$57.00$57.00FREE delivery Thu, Jun 11 - 30 Agents Every AI Engineer Must Build: Build production-ready agent systems using proven architectures and patterns#1 Best SellerComputer Simulation
Paperback$54.99$54.99FREE delivery Thu, Jun 11 - AI Agents in Practice: Design, implement, and scale autonomous AI systems for production
Paperback$33.74$33.74Delivery Thu, Jun 11 - Hands-On Large Language Models: Language Understanding and Generation
Paperback$47.69$47.69FREE delivery Thu, Jun 11 - LLM Design Patterns: A Practical Guide to Building Robust and Efficient AI Systems
Paperback$43.99$43.99FREE delivery Thu, Jun 11 - Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning
Paperback$50.99$50.99FREE delivery Thu, Jun 11 - Knowledge Graphs and LLMs in Action: Build AI systems using connected data
Paperback$41.41$41.41$3.99 delivery Jul 9 - 29 - Build a Large Language Model (From Scratch)#1 Best SellerComputer Neural Networks
Paperback$49.24$49.24FREE delivery Thu, Jun 11 - LLMs in Production: From language models to successful products
Paperback$50.66$50.66FREE delivery Thu, Jun 11 - RAG-Driven Generative AI: Build custom retrieval augmented generation pipelines with LlamaIndex, Deep Lake, and Pinecone
Paperback$32.99$32.99Delivery Thu, Jun 11 - Generative AI Design Patterns: Solutions to Common Challenges When Building GenAI Agents and Applications
Paperback$74.55$74.55FREE delivery Thu, Jun 11 - Generative AI with Python: The Developer’s Guide to Pretrained LLMs, Vector Databases, Retrieval Augmented Generation, and Agentic Systems (Rheinwerk Computing)
Paperback$47.73$47.73FREE delivery Thu, Jun 11 - Deep Reinforcement Learning Hands-On: A practical and easy-to-follow guide to RL from Q-learning and DQNs to PPO and RLHF
Paperback$34.47$34.47Delivery Thu, Jun 11 - Hands-On Machine Learning with Scikit-Learn and PyTorch: Concepts, Tools, and Techniques to Build Intelligent Systems
Paperback$80.41$80.41FREE delivery Thu, Jun 11 - Architecting AI Software Systems: Crafting robust and scalable AI systems for modern software development
Paperback$34.99$34.99Delivery Thu, Jun 11
From the brand
-
See more at our store
-
Packt is a leading publisher of technical learning content with the ability to publish books on emerging tech faster than any other.
Our mission is to increase the shared value of deep tech knowledge by helping tech pros put software to work.
We help the most interesting minds and ground-breaking creators on the planet distill and share the working knowledge of their peers.
From the Publisher
Editorial Reviews
About the Author
Ben Auffarth is a full-stack data scientist with more than 15 years of work experience. With a background and Ph.D. in computational and cognitive neuroscience, he has designed and conducted wet lab experiments on cell cultures, analyzed experiments with terabytes of data, run brain models on IBM supercomputers with up to 64k cores, built production systems processing hundreds and thousands of transactions per day, and trained language models on a large corpus of text documents. He co-founded and is the former president of Data Science Speakers, London.
Leonid Kuligin is a staff AI engineer at Google Cloud, working on generative AI and classical machine learning solutions (such as demand forecasting or optimization problems). Leonid is one of the key maintainers of Google Cloud integrations on LangChain, and a visiting lecturer at CDTM (TUM and LMU). Prior to Google, Leonid gained more than 20 years of experience in building B2C and B2B applications based on complex machine learning and data processing solutions such as search, maps, and investment management in German, Russian, and US technological, financial, and retail companies.
Product details
- Publisher : Packt Publishing
- Publication date : May 23, 2025
- Edition : 2nd ed.
- Language : English
- Print length : 476 pages
- ISBN-10 : 1837022011
- ISBN-13 : 978-1837022014
- Item Weight : 1.82 pounds
- Dimensions : 7.5 x 1.09 x 9.25 inches
- Best Sellers Rank: #95,803 in Books (See Top 100 in Books)
- Customer Reviews:
About the authors

Discover more of the author’s books, see similar authors, read book recommendations and more.

Ben Auffarth, PhD, is a bestselling author and AI implementation expert with over 15 years of experience bridging advanced technology with measurable business outcomes. As founder of Chelsea AI Ventures, he specializes in helping small and medium enterprises implement enterprise-grade AI solutions that deliver tangible ROI. His systems have prevented millions in fraud losses and process transactions at sub-300ms latency. With a background in computational neuroscience, Ben brings rare depth to practical AI applications—from supercomputing brain models to production systems that combine technical excellence with business strategy. His books are practical "cookbooks" that explain complex AI concepts in accessible, hands-on ways, while his consulting work focuses on delivering concrete, measurable outcomes for businesses. Based in London, Ben balances his technical expertise with family time and participation in the Data Science Speakers community.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonReviews with images
Felt a bit deceived!
Top reviews from the United States
- 5 out of 5 stars
An excellent book.
Reviewed in the United States on April 4, 2026This book provides a systematic introduction to how to develop agents, covering various aspects of the field. It is truly outstanding.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Amazing
Reviewed in the United States on January 17, 2026This is a great read. I enjoyed everything about this book - the content, the writing. There are a few typos, but apart from this, it is great for anyone working with LangChain.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 4 out of 5 stars
A good introduction to agenticAI
Reviewed in the United States on October 15, 2025Worth reading with the Github code on the screen
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Modern LLM Practical Guide
Reviewed in the United States on July 15, 2025Generative AI with LangChain is a comprehensive, technically rich, and highly practical guide for developers and architects building LLM applications. it elaborates LangGraph—a powerful orchestration framework built on top of LangChain—and teaches how to use it to build structured, multi-agent workflows capable of reasoning, coordination, and error recovery. One of its greatest strengths lies in demystifying the journey from prototype to production by introducing scalable design patterns that incorporate advanced techniques like retrieval-augmented generation (RAG), hybrid search, re-ranking, and fact-checking. Readers are guided through intelligent agent construction using LangGraph’s node and edge abstractions, bringing determinism and modularity to systems that are otherwise probabilistic and fragile. A major focus of the book is showing how to architect robust workflows that go beyond one-shot queries or simple chatbots. It includes examples of specialized agents for tasks such as data analysis and software development—use cases that are increasingly being adopted across industries. Moreover, the book doesn’t shy away from difficult topics like observability, monitoring, and testing in dynamic LLM environments. Concepts such as latency tracing, model output evaluation, and prompt governance are treated as essential, not optional. For teams concerned with responsible AI practices, there’s also guidance on embedding security, compliance, and ethical development into the system design from the outset. While it assumes basic Python skills, it remains friendly to intermediate readers, and the advanced topics will be particularly valuable for experienced teams working on critical production systems. Overall, this second edition serves as a field guide for anyone serious about building intelligent, scalable, and trustworthy generative AI applications. It is an essential resource for moving from lab experiments to reliable deployments, offering practical blueprints for architecting AI agents that can reason, interact, and perform in real-world enterprise environments. Whether you're working solo or as part of a cross-functional platform team, The inclusion of multi-agent coordination patterns—where multiple agents can specialize, delegate, and hand off tasks—offers a glimpse into what the future of enterprise AI may look like. this book will give you the patterns, tools, and confidence to deliver LLM-powered solutions that are not only smart, but stable and secure.
4 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Great Resource for those working for Lang Chain
Reviewed in the United States on August 26, 2025I'm working on building some AI products for work. This has been a great resource to learn how to properly leverage LangChain and LangGraph when building AI products using GenAI.
Sending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Practical, Updated Guide for Agent Development with LangChain
Reviewed in the United States on July 17, 2025I read the first edition and liked the foundational overview, but the second edition really shines when it comes to building with agents. It goes beyond concepts and dives into actual agent development, how to integrate tools, enable multi-step reasoning, and build workflows that do more than just respond to prompts. The real-world examples, especially around question answering and task automation, helped connect the dots for me. If you’re serious about using LangChain to build functional, dynamic LLM apps, this edition is a must-read.
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 5 out of 5 stars
Just getting started with this book... and already building things!
Reviewed in the United States on June 11, 2025I’ve just started reading this book and diving into the hands-on labs, but I’m really impressed! As I’m not a Python expert or a professional AI engineer, I find this book easy to follow. The explanations are clear and practical, and the labs make it easy to start building things right away. All needed is explained in a way that makes sense without being overwhelming (at least that's my view). As I'm progressing through this book, I'm learning not just what the tools do, but how and when to use them in real-world examples. Highly recommended this well-written resource to anyone curious about building stuff with LangChain.
3 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again - 2 out of 5 stars
Felt a bit deceived!
Reviewed in the United States on June 26, 2025Says “In color” but it has no color! The structure of the book is not very clear. It feels it is trying to cover all topics but there is no flow in the book or examples.


Says “In color” but it has no color! The structure of the book is not very clear. It feels it is trying to cover all topics but there is no flow in the book or examples.
6 people found this helpfulSending feedback...Sending feedback...HelpfulThank you for your feedback.Sorry, we failed to record your vote. Please try againThanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Top reviews from other countries
Cliente Amazon5 out of 5 starsGreat book, I recommend it
Reviewed in Spain on December 5, 2025The best book for learning langchain and langgraph
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Steven Clarke5 out of 5 starsPractical Read
Reviewed in Canada on June 12, 2025Only a fraction of the way through this book but it has been very helpful for understanding how to use this very powerful framework to accomplish things.
Langgraph has been especially mind blowing after writing scrappy python code to organize everything.
The book is even better when you consider how daunting and unstructured langchain’s documentation can be. Would recommend for developers looking to understand practical design patterns for AI applications.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Asma'a5 out of 5 starsWhat You Need
Reviewed in the United Kingdom on July 28, 2025Very understandable and easy to follow.
5 out of 5 starsWhat You Need
Reviewed in the United Kingdom on July 28, 2025Very understandable and easy to follow.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
B. Pohl5 out of 5 starsI recommend it
Reviewed in Germany on February 7, 2026I have read some books about agentic Ai. This one belongs to the group I recommend. It is focused on Lang chain, but also contains plenty of base knowledge to start with.
Where it could improve is to show more knowledge about agentic Ai patterns.
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again
Aiman5 out of 5 starsPretty good for beginners and intermediate
Reviewed in Germany on January 9, 2026It’s really nice book I like it and I like the fact that you get an online version of it unfortunately the examples are not that advanced so it’s good for intermediate or beginners but if you’re looking for like building a huge product this is not gonna help you it just explains the basics and the Intermediate techniques like it opens the doors for you but it doesn’t provide advanced techniques for complex use cases this is my honest review. Please note that I didn’t complete the book. I wrote this review only after reading the first three chapters, so you have to judge that for yourself
Sending feedback...Thanks, we'll investigate in the next few days.Sorry, We failed to report this review. Please try again








