My Account Log in

1 option

CONTEXT ENGINEERING FOR MULTI-AGENT SYSTEMS : move beyond prompting to build a context engine, a... transparent architecture of context and reasoning.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Rothman, Denis.
Language:
English
Subjects (All):
Systems engineering.
Multiagent systems.
Physical Description:
1 online resource
Place of Publication:
[S.l.] : PACKT PUBLISHING LIMITED, 2025.
Summary:
Build AI that thinks in context using semantic blueprints, multi-agent orchestration, memory, RAG pipelines, and safeguards to create your own Context Engine Free with your book: DRM-free PDF version + access to Packt's next-gen Reader* Key Features Design semantic blueprints to give AI structured, goal-driven contextual awareness Orchestrate multi-agent workflows with MCP for adaptable, context-rich reasoning Engineer a glass-box Context Engine with high-fidelity RAG, trust, and safeguards Book Description Generative AI is powerful, yet often unpredictable. This guide shows you how to turn that unpredictability into reliability by thinking beyond prompts and approaching AI like an architect. At its core is the Context Engine, a glass-box, multi-agent system you'll learn to design and apply across real-world scenarios. Written by an AI guru and author of various cutting-edge AI books, this book takes you on a hands-on journey from the foundations of context design to building a fully operational Context Engine. Instead of relying on brittle prompts that give only simple instructions, you'll begin with semantic blueprints that map goals and roles with precision, then orchestrate specialized agents using the Model Context Protocol. As the engine evolves, you'll integrate memory and high-fidelity retrieval with citations, implement safeguards against data poisoning and prompt injection, and enforce moderation to keep outputs aligned with policy. You'll also harden the system into a resilient architecture, then see it pivot across domains, from legal compliance to strategic marketing, proving its domain independence. By the end of this book, you'll be equipped with the skills to engineer an adaptable, verifiable architecture you can repurpose across domains and deploy with confidence. *Email sign-up and proof of purchase required What you will learn Develop memory models to retain short-term and cross-session context Craft semantic blueprints and drive multi-agent orchestration with MCP Implement high-fidelity RAG pipelines with verifiable citations Apply safeguards against prompt injection and data poisoning Enforce moderation and policy-driven control in AI workflows Repurpose the Context Engine across legal, marketing, and beyond Deploy a scalable, observable Context Engine in production Who this book is for This book is for AI engineers, software developers, system architects, and data scientists who want to move beyond ad hoc prompting and learn how to design structured, transparent, and context-aware AI systems. It will also appeal to ML engineers and solutions architects with basic familiarity with LLMs who are eager to understand how to orchestrate agents, integrate memory and retrieval, and enforce safeguards.
Contents:
Intro
Context Engineering for Multi-Agent Systems
Move beyond prompting to build a Context Engine, a transparent architecture of context and reasoning
Contributors
About the author
About the reviewers
Table of Contents
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Join our Discord and Reddit Space
Share your thoughts
Free Benefits with Your Book
How to Unlock
1
From Prompts to Context: Building the Semantic Blueprint
Understanding context engineering
Level 1: The basic prompt (zero context)
Level 2: The better context (linear context)
Level 3: The good context (goal-oriented context)
Level 4: The advanced context (role-based context)
Level 5: The semantic blueprint
SRL: from linear sequences to semantic structures
Building an SRL notebook in Python
The main function: visualize_srl
Defining the semantic roles
The plotting engine: _plot_stemma and canvas setup
Dynamic positioning and drawing the stemma (graph)
Running SRL examples
Example 1: Business pitch
Example 2: Technical update
Example 3: Project milestone
Engineering a meeting analysis use case
Layer 1: Establishing the scope (the "what")
Layer 2: Conducting the investigation (the "how")
Layer 3: Determining the action (the "what next")
Summary
Questions
References
Further reading
Get This Book's PDF Version and Exclusive Extras
2
Building a Multi-Agent System with MCP
Architecting the MAS workflow with MCP
Building an MAS with MCP
Initializing the client
Defining the protocol
Message format
Transport layers
Protocol management
Building the agents
Creating the helper function
Defining the Researcher agent
Defining the Writer agent
Building the Orchestrator
Running the system
Error handling and validation
Building robust components for the LLM
Validating MCP messages
Adding agent specialization controls and validation
The final Orchestrator with a validation loop
Running the final robust system
The evolution of AI architecture
Tools for building agent systems
Further reading
Subscribe for a free eBook
3
Building the Context-Aware Multi-Agent System
Architecting a dual RAG MAS
Phase 1: Data preparation
Phase 2: Runtime execution analysis
RAG pipeline data ingestion (context and knowledge)
Installation and setup
Initializing the Pinecone index
Data preparation: the context library (procedural RAG)
Data preparation: the knowledge base (factual RAG)
Helper functions for chunking and embedding
Process and upload (upsert) data
Context library
Knowledge base
Building the context-aware system
Defining the agents
Notes:
OCLC-licensed vendor bibliographic record.
ISBN:
9781806690053
OCLC:
1552039529

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account