Build production-ready LLM applications and advanced agents using Python, LangChain, and LangGraph
Ben Auffarth, Leonid Kuligin

#AI
#LangChain
#LLM
#Python
#ChatGPT
#Data_Science
فراتر از مستندات پایهای LangChain بروید؛ با پوشش دقیق و فنی از رابطهای LangGraph، الگوهای طراحی برای ساخت عاملهای هوش مصنوعی، و معماریهای مقیاسپذیر مورد استفاده در محیطهای تولیدی — مناسب برای توسعهدهندگان پایتون که در حال ساخت برنامههای هوش مصنوعی مولد (GenAI) هستند.
این ویرایش دوم به بزرگترین چالش شرکتها در حوزه هوش مصنوعی میپردازد: انتقال از نمونههای اولیه به محیط تولید. این کتاب بهطور کامل بهروزرسانی شده و آخرین پیشرفتها در اکوسیستم LangChain را پوشش میدهد و نحوه توسعه، استقرار و مقیاسدهی سیستمهای مدرن هوش مصنوعی در محیطهای سازمانی را به تصویر میکشد. در این ویرایش، تأکید ویژهای بر معماریهای چندعاملی (Multi-Agent)، گردشکارهای قدرتمند LangGraph و خطوط پردازشی پیشرفتهی نسل تقویتشده با بازیابی (RAG) قرار گرفته است.
در این کتاب الگوهای طراحی برای ساخت سیستمهای مبتنی بر عاملها را خواهید آموخت و پیادهسازی عملی معماریهای چندعاملی برای وظایف پیچیده را بررسی خواهید کرد. کتاب شما را از طریق تکنیکهای استدلالی مانند Tree-of-Thoughts، تولید ساختیافته (Structured Generation) و واگذاری وظایف بین عاملها (Agent Handoffs) راهنمایی میکند و مثالهایی عملی برای مدیریت خطا ارائه میدهد. فصلهای گستردهتر درباره تست، ارزیابی و استقرار، نیازهای برنامههای مدرن LLM را برطرف کرده و نشان میدهند که چگونه سیستمهای هوش مصنوعی امن، منطبق با قوانین و مسئولانه طراحی کنید. این نسخه همچنین بخشهای مربوط به RAG را با راهنماییهایی در زمینه جستجوی ترکیبی (Hybrid Search)، رتبهبندی مجدد (Re-ranking) و خطوط پردازشی بررسی صحت اطلاعات (Fact-checking Pipelines) به منظور افزایش دقت خروجی گسترش داده است.
چه در حال گسترش گردشکارهای موجود باشید و چه قصد طراحی سیستمهای چندعاملی را از صفر داشته باشید، این کتاب عمق فنی و دستورالعملهای کاربردی موردنیاز برای طراحی برنامههای LLM آماده برای موفقیت در محیطهای تولید را ارائه میکند.
آنچه خواهید آموخت:
مخاطبین این کتاب: این کتاب برای توسعهدهندگان، پژوهشگران و تمامی علاقهمندانی است که قصد آشنایی بیشتر با LangChain و LangGraph را دارند. با تأکید ویژه بر الگوهای استقرار سازمانی، این کتاب برای تیمهایی که در حال پیادهسازی راهکارهای LLM در مقیاس گسترده هستند، بسیار ارزشمند است. در حالیکه نسخه اول بر توسعهدهندگان فردی تمرکز داشت، این ویرایش به تیمهای مهندسی و تصمیمگیرندگانی اختصاص یافته که استراتژیهای LLM را در سطح سازمانی مدیریت میکنند. آشنایی مقدماتی با زبان Python الزامی است و آشنایی با یادگیری ماشین به بهرهگیری بیشتر از این کتاب کمک خواهد کرد.
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
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.
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.
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.









