liveBook · Manning

Context engineering

Context engineering is the deliberate selection, organization, and management of information supplied to an AI system to support effective task performance.

How 2 Manning books explain it

Build an AI Agent (From Scratch)

The discipline of designing which information is provided to a language model, when it is provided, and how it is represented for task completion.

How it is used
Guides what an LLM agent receives on each call as tools and conversation state change.
How deep it goes
Defines five strategies and shows an execution-state-to-request boundary, while leaving detailed strategy implementations to later components.
Examples
Uses a curated LlmRequest and workspace-based skill documents to illustrate selective disclosure of state and tool instructions.
What you can do after
Build it from scratch by selecting model-visible state, then adding retrieval, memory, planning, and workspaces to an agent loop.

Read how Build an AI Agent (From Scratch) explains context engineering →

Introduction to Generative AI, Second Edition

Context engineering is the systematic assembly and structuring of prompts, instructions, history, memory, retrieved information, tools, and output constraints needed for a model to complete a task.

How it is used
Frames reliable AI output as a system-level task of assembling and structuring all relevant model inputs.
How deep it goes
Defines the expanded scope and design decisions, but stops short of implementation procedures or technical internals.
Examples
Uses system instructions, queries, histories, memories, retrieved documents, tool definitions, and formatting constraints as examples.
What you can do after
Apply it by selecting, excluding, structuring, and timing the information supplied to a language model.

Read how Introduction to Generative AI, Second Edition explains context engineering →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.