Context Engineering

Build consistent, accurate, predictable AI systems

Published by Manning
Distributed by Simon & Schuster

LIST PRICE $59.99

PRICE MAY VARY BY RETAILER

Free shipping when you spend $40. Terms apply.

Buy from Other Retailers

About The Book

Get the eBook free when you register your print book at Manning.

The responses from large language models (LLMs) are more accurate, consistent, and explainable when you provide specific relevant information, or context, to support your prompts. Context engineering is the discipline of selecting, organizing, updating, compressing, and prioritizing the precise context a model needs to generate accurate responses. This book shows you how to combine well-designed prompts with smart search, content filtering, and advanced RAG techniques incorporating many types of stored data to create reliable responses in your AI applications.

Because context engineering is typically implemented programmatically, automation is essential as applications evolve from simple prompts to workflows, agents, and agentic systems. Context engineering is particularly critical with the rise of autonomous agents and context windows that can take in a million or more tokens. Irrelevant or poorly selected context raises the chance of hallucinations, brittle agents, and unpredictable outputs. In Context Engineering, author Boni García helps you design an AI’s information environment with the same rigor as your codebase. It unifies every part of the context stack—including RAG, memory, and harness engineering—into one coherent discipline.

The book takes you hands on with the entire context engineering stack. You'll learn how to use tools such as DSPy, LangChain, CrewAI, and LlamaIndex to build context-aware AI applications with frontier models from OpenAI, Anthropic, and Google. Because each chapter builds intuition first and ends with a practical hands-on section grounded in real tools, you’ll come away thinking like a system designer who knows exactly what enters the context window, what stays out, what gets retrieved just in time, and what becomes persistent memory or state.

What's inside

• Design instructions and agent skills to govern model behavior
• Ground responses with RAG and external knowledge retrieval
• Integrate tools and the Model Context Protocol (MCP)
• Manage memory and state in agents and agentic systems
• Orchestrate multi-agent coordination and interoperability
• Deliver production-ready AI systems through evaluation, observability, governance, and operations

About the reader

For AI engineers, data scientists, and engineering managers familiar with the basics of LLMs and agents.

About the author

Boni García is an Associate Professor at Universidad Carlos III de Madrid with extensive experience in software engineering, test automation, and applied AI. He is a tech lead on the Selenium project, creator and maintainer of WebDriverManager and Selenium Manager, and author of several books on Java. His current research focuses on the intersection of software engineering and AI—exploring how large language models, agents, and context-aware systems are reshaping how modern software is built.

About The Author

Boni García is an Associate Professor at Universidad Carlos III de Madrid with extensive experience in software engineering, test automation, and applied AI. He is a tech lead on the Selenium project, creator and maintainer of WebDriverManager and Selenium Manager, and author of several books on Java. His current research focuses on the intersection of software engineering and AI—exploring how large language models, agents, and context-aware systems are reshaping how modern software is built.

Product Details

  • Publisher: Manning (November 24, 2026)
  • Length: 393 pages
  • ISBN13: 9781633434257

Browse Related Books

Resources and Downloads

High Resolution Images

BACK TO TOP