Preface
Hello and welcome to Building Agentic Solutions with Microsoft Foundry! The goal of this book is to help you understand how to deliver AI-enabled experiences using Microsoft Foundry, a powerful platform for creating intelligent agents and applications. Whether you’re a developer, data scientist, AI engineer, or cloud architect, this book will provide you with the knowledge and skills needed to leverage Foundry’s capabilities effectively.
Who Should Read This Book
This book is intended for anyone interested in building cloud-based artificial intelligence (AI) solutions for your organization. This book was written for data scientists and AI engineers who have experience working with large language models (LLMs) and want to learn how to build agentic solutions in a cloud-based environment, specifically Microsoft Foundry. However, there is plenty of content in this book that will also be valuable for cloud engineers looking to get a better understanding of how cloud architecture should work for deploying and managing AI models and agents at an enterprise level. This book is not intended to teach you how to build and train AI models from scratch or to train your own models. Instead, it focuses on how to deploy and manage both open-source and proprietary foundation models at scale.
It seems like there are a million new AI models that come available every week, and it can be overwhelming to keep up with all the new developments. This book will also help you understand how to evaluate various models, compare their performance and costs, and determine which models are best suited for your specific use case. For those interested in building truly custom AI experiences, we’ll cover model customizations through fine-tuning and connecting to data with retrieval augmented generation (RAG) and tools. Plus, if you’re the person responsible for making sure your AI doesn’t go rogue, I’ll show you how to implement guardrails and controls to ensure that your agentic solutions are safe, ethical, and compliant with regulations and adhere to your organization’s rules.
By the end of this book, you will have a solid understanding of how to build agentic solutions using Microsoft Foundry, including all of the ins and outs of the platform’s features and some open-source frameworks that are commonly used in conjunction with Foundry. While the book is certainly centered around Foundry features, there’s a lot of conceptual knowledge in here that should help you better understand how to make informed decisions around AI in general, regardless of the platform you choose to use.
How the Book is Organized
This book is organized in a “ground-up” manner, starting with the deployment of Microsoft Foundry resources in Azure and gradually working up to deploying models and agents. Then, we build up to more advanced topics such as connecting to tools, fine-tuning, and building knowledge bases. We’ll also discuss security, governance, and management features in Foundry once you’ve learned how to use the deployment facets of the platform. In addition to the main Foundry-related content, we will also cover Foundry Local for running models locally, and we’ll discuss some open-source frameworks that are commonly used in conjunction with Foundry. The book is structured to provide a comprehensive understanding of the platform, starting from the basics and progressing to more advanced topics and configurations.
This book was finished in June 2026 and is based on the state of Microsoft Foundry and related tools at that time. Given the rapid pace of new features that are being developed for Microsoft Foundry, some of the content related to exercises, SDK code, etc. may change a bit by the time you read it. Always refer to the official Microsoft Foundry documentation for the most up-to-date information on features, functionality, and best practices.
Conventions Used in This Book
The following typographical conventions are used in this book:
- Italic
- Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width- Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold- Shows commands or other text that should be typed literally by the user.
Constant width italic- Shows text that should be replaced with user-supplied values or by values determined by context.
This element signifies a tip or suggestion.
This element signifies a general note.
This element indicates a warning or caution.
Using Code Examples
Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/colbyford/foundry-book.
If you have a technical question or a problem using the code examples, please send email to support@oreilly.com.
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example:
Building Agentic Solutions with Microsoft Foundry by Colby T. Ford (O’Reilly). Copyright 2026 Tuple LLC, 979-8-341-67332-8.
@book{ford2026_foundry,
author = {Ford, Colby T.},
title = {Building Agentic Solutions with Microsoft Foundry},
publisher = {O'Reilly Media},
address = {Sebastopol, CA},
year = {2026},
isbn = {979-8-341-67332-8}
}If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at permissions@oreilly.com.
O’Reilly Online Learning
For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit https://oreilly.com.
How to Contact Us
Please address comments and questions concerning this book to the publisher:
- O’Reilly Media, Inc.
- 141 Stony Circle, Suite 195
- Santa Rosa, CA 95401
- 800-889-8969 (in the United States or Canada)
- 707-827-7019 (international or local)
- 707-829-0104 (fax)
- support@oreilly.com
- https://oreilly.com/about/contact.html
For news and information about our books and courses, visit https://oreilly.com.
Find us on LinkedIn: https://linkedin.com/company/oreilly-media
Watch us on YouTube: https://youtube.com/oreillymedia
We have a web page for this book, where we list errata and any additional information. You can access this page at:
https://www.oreilly.com/catalog/errata.csp?isbn=9798341673328
Acknowledgments
Writing a book is a team effort, even if there’s only one author on the front cover. I am grateful to everyone who contributed to the creation of this book. First and foremost, I want to thank the Microsoft Foundry product team for building such an incredible platform and for their support throughout the writing process. I also want to thank my editors at O’Reilly, including Michelle Smith and Michele Cronin, for their guidance and feedback that helped make this book possible.
Peer review is an arduous but essential process as it helps to get perspectives (and sanity checks) from outside experts. So, thank you to my peer reviewers who had an uncanny attention to detail and provided valuable (and brutally honest) feedback: Jonah Andersson, Kushaagra Goyal, Jack Lee, Leif Håkan Silfvernagel, Malar Mangai Kondappan, and Samaresh Kumar Singh.
Thank you to my friends, Larry Baker, Bret Myers, and Jonas Elmerraji, for being a sounding board and providing support throughout the writing process. And finally, thank you to Brandon Harper for your unwavering love and support (albeit with slight judgment) as I embarked on the journey of writing this book.