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...

Agents that cannot retrieve will hallucinate about your business. Retrieval that cannot act is just a search box. Get both halves of the .NET AI stack — the Microsoft Agent Framework, RAG, MCP, GraphRAG, evaluation gates, and Azure deployment. 1,268 pages, 44 chapters, 174 runnable projects in C# 14 and .NET 10.
Bought separately
$86.98
Minimum price
$54.99
$74.99
About the Bundle
Two books, one stack.
Building AI Agents with C# and .NET 10 teaches you to build and orchestrate agents on the Microsoft Agent Framework — tools, workflows, multi-agent systems, and the runtime concerns that decide whether an agent survives contact with production.
Production-Grade RAG with C# and .NET teaches you to ground them in your own data — embeddings, chunking, hybrid retrieval, reranking, GraphRAG, evaluation gates, prompt-injection defense, and an EU AI Act-aware Azure deployment.
They are two halves of the same problem. An agent without retrieval is fluent and confident about a business it knows nothing about. Retrieval without an agent stops at the search box — it finds the passage but never acts on it. Together you get a system that can look something up, reason about what it found, and then do something with it.
In the bundle:
Both books are written for the same reader — a .NET developer with a few years of C# who wants to ship something real rather than a demo — and neither assumes you have read the other. Start with whichever problem is in front of you.
Most AI material is written for Python. This is the .NET path, end to end.
About the Books
Between the launch of ChatGPT and the GA release of the Microsoft Agent Framework in April 2026, a new class of .NET applications emerged: programs that hold a language model in one hand and a set of tools in the other, and decide for themselves how to string them together to reach a goal. The framework is ready. The guidance mostly isn't — it lives scattered across API docs, conference talks, and GitHub samples pinned to preview builds that broke last Tuesday.
Building AI Agents with C# and .NET 10 is the picture on the puzzle box. Nineteen chapters take you from your first LLM call in C# to a production-hosted, observability-instrumented, safety-filtered multi-agent system, all on the stable, generally available surface of Microsoft Agent Framework 1.14, .NET 10 LTS, and C# 14.
You will learn how to:
Along the way you build the Contoso FAQ agent, a small but real production system that grows chapter by chapter until it ships: hosted, observable, guarded, and evaluated.
What makes this book different is discipline. Every listing compiles and runs, and every one is paired with its expected console output, so you know what success looks like before you press F5. Chapters follow an Explain–Demonstrate–Practice rhythm. Exercises come in three tiers (Basic, Intermediate, Challenge) with full worked solutions in Appendix E. The companion repository — one solution, 120 runnable projects — works against Azure OpenAI, OpenAI, GitHub Models, or a local Ollama model with a single configuration change, and ships dedicated helpers for Anthropic and Microsoft Foundry.
Written for intermediate C# developers. No AI or machine learning background required: if you can write a class, use LINQ, and wire up dependency injection, you're ready. Coming from Semantic Kernel or AutoGen? Appendices B and C are your migration maps.
Buying for a team? Volume licenses are available from 3 copies, with team pricing up to 40% off for larger groups — one purchase, one invoice, a copy for everyone.
The companion code lives at https://github.com/RachidD68/building-ai-agents-with-csharp-and-dotnet-10
Production-Grade RAG with C# and .NET is the complete guide to building Retrieval-Augmented Generation systems on the Microsoft stack — from an 80-line Hello World to a fully deployed, audited, EU AI Act-aware Azure pipeline.
Most RAG material is written for Python. This book is written for you: a .NET developer with a few years of C# experience who wants to ship something real with your company's data. Across seven parts, twenty-five chapters and 668 pages, you'll build Contoso SmartDocs, a running enterprise project that grows chapter by chapter into a production system spanning six document silos — powered by the Microsoft Agent Framework 1.14, Microsoft.Extensions.AI, Azure AI Search, Qdrant, Neo4j, and .NET 10 / C# 14.
You'll learn to:
Every chapter ships runnable code in the companion repository. Every snippet traces to a specific file. Every sample compiles; all 458 tests pass on a clean clone. The architecture is deliberately clean — small, named interfaces with swappable implementations — so what you learn maps directly onto the system you need to build, not just the one in the book.
Nine appendices round it out: worked exercise solutions, a design-pattern flashcard set, a vector database comparison, embedding benchmarks, a Python-to-.NET Rosetta Stone for readers arriving from LangChain or LlamaIndex, a debugging decision tree, prompt patterns, and the math behind RAG.
This is the production-concerns RAG book the .NET ecosystem has been missing. If you can write C#, you can ship RAG.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
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
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
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.