Leanpub Header

Skip to main content

Systems Thinking for Agentic AI

A Software Architect’s Guide to Building Reliable LLM and Agent Systems

This book is 100% completeLast updated on 2026-07-09

An LLM is not an AI system.

Systems Thinking for Agentic AI shows software engineers and architects how to design reliable AI applications with prompts, RAG, tools, memory, orchestration, guardrails, evaluation, observability, and runtime control.

Move beyond chatbot demos and learn how to build production-ready agentic AI systems you can reason about, measure, debug, operate, and improve

Minimum price

$14.99

$24.99

You pay

Author earns

$

Also available for 1 book credit with a Reader Membership

PDF
EPUB
About

About

About the Book

Build real AI agent systems, not fragile demos.

Systems Thinking for Agentic AI is a practical architecture book for software engineers, backend developers, technical leads, and software architects who want to design production-ready applications with large language models.


LLMs are powerful, but an LLM alone is not a system. Real AI applications need prompts, retrieval, tools, memory, orchestration, guardrails, evaluation, observability, and runtime control working together inside clear engineering boundaries.


This book explains how to move from simple chatbot experiments to reliable AI-enabled software systems. It focuses on the production realities that matter after the demo works: latency, cost, failure handling, tool execution, structured outputs, testing, tracing, safety controls, and maintainability.


Who this book is for

This book is for software engineers, backend developers, technical leads, and software architects who want to build practical AI systems. You do not need a machine learning background. If you already build backend services with APIs, distributed systems, and system design in mind, this book helps you extend that skill set into AI-powered systems.


What you will learn

You will learn how LLMs process language through tokens, embeddings, and transformers, how to control model behavior with prompting and structured output, how to connect LLMs to production systems through tools and MCP, how to build RAG pipelines, and how to design agent workflows with planning, memory, orchestration, and controlled execution.


The book also covers guardrails, validation, permissions, human approval boundaries, evaluation, hallucination reduction, regression testing, observability, performance, cost, scaling, retries, fallbacks, and an end-to-end Code Review Agent implementation with Spring Boot.


Many developers know how to call an AI API. Far fewer know how to design a reliable system around it. That gap is where many AI projects fail.


This book treats AI as software architecture, not magic.

Author

About the Author

Ediz Najim

Ediz Najim is a software architect and technical leader with nearly two decades of experience designing and building distributed systems, microservices, and production-grade backend platforms.

His work focuses on event-driven architecture, reliability, performance, and the practical engineering of AI-enabled software systems.

In Systems Thinking for Agentic AI, he brings a software architecture perspective to LLM applications, RAG, tool orchestration, agent runtimes, guardrails, observability, and production reliability. His writing is aimed at engineers, architects, and technical leaders who want to move beyond AI demos and design systems that can operate under real-world constraints.

Contents

Table of Contents

Table of Contents

  • Preface
  • Acknowledgments
  • How to Read This Book
Part I — Foundations
  • Chapter 1: From AI to Agent Systems
  • Chapter 2: LLM Internals and Output Generation
  • Chapter 3: Prompt Engineering in LLM Systems
Part II — LLM Engineering
  • Chapter 4: LLMs as System Components
  • Chapter 5: RAG Systems
  • Chapter 6: Agent Fundamentals and Behavior
  • Chapter 7: Tool Orchestration and MCP
  • Chapter 8: Planning and Execution Control
  • Chapter 9: Memory in Agent Systems
Part III — Production Architecture
  • Chapter 10: Agent System Architecture
  • Chapter 11: Reliability and Safety in AI Systems
  • Chapter 12: Performance and Cost Optimization
Part IV — Real System Design
  • Chapter 13: Multi-Agent Systems
  • Chapter 14: Evaluation in Agent Systems
  • Chapter 15: Observability in AI Systems
  • Chapter 16: End-to-End Agent System Design
  • Chapter 17: Implementing the Code Review Agent
Part V — Looking Forward
  • Chapter 18: The Future of Agent Systems
  • About the Author
  • Glossary
  • Bibliography

Get the free Community Edition

You can get the free Community Edition in PDF or EPUB just by sharing your name and email address with the author, or you can just click this link to read a shorter sample online...

 

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub