Free AI diagnosis: 30 minutes, and you leave with a plan

Glossary

What is context engineering? Explained

A plain definition of context engineering, what an AI agent sees when it works, the core moves and how it differs from related terms.

Last reviewed

Definition

Context engineering

Context engineering is the practice of deciding exactly what an AI model or agent sees while it works: instructions, the request, documents, history, memory and tools. This is what context engineering means in one sentence.

In short: Choosing what the AI sees at each step.

Our data

What buyers see in this search

The first page of Google for «what is context engineering», counted by type of result.

CriterionResults
Articles by companies that sell a product or service5 of 8
Social and blog-platform posts2 of 8
Forums and Q&A threads1 of 8
Titles that answer this exact search8 of 8
Google features on the pageAn AI Overview, People also ask, videos

The 8 organic results on the first page of Google, United States, desktop, measured with DataForSEO on October 29, 2026. Types only: no company or product is named.

Side by side

What goes into an agent's context

Each row is one element of the working set.

CriterionWhat it holdsWho controls itBusiness example
InstructionsRole, rules and toneThe team building the agentRules for how to answer customers
The requestWhat was asked right nowThe person using the agentA question about an order
Retrieved documentsFiles fetched for this taskThe system, from your dataA policy page or contract
History and memoryEarlier steps and saved notesThe agent setupWhat the customer said last week
Tools and resultsActions available and their outputThe team, then the toolA calendar lookup result

What is context engineering in plain words

  1. 01

    Gather

    Collect the information that could matter.

  2. 02

    Select

    Pick only what this step needs.

  3. 03

    Pack

    Place it inside the context window.

  4. 04

    Act

    The model works with what it sees.

  5. 05

    Refresh

    Update the context for the next step.

An AI model can only consider a limited amount of text at once. That limit is called the context window.

Anthropic defines the practice as the art and science of curating what goes into that limited window from a constantly changing universe of possible information.

Think of it as packing a briefcase for one meeting. You bring what the task needs, and you leave the rest at the office.

For an agent that works across many steps, this packing happens again and again, so the choices add up.

What goes into an agent's context

  • Instructions

    Rules and role the agent follows.

  • The request

    What the person asked for now.

  • Documents

    Files pulled in to answer well.

  • History and memory

    Earlier steps and saved notes.

  • Tools and results

    What the agent can use and what came back.

Context is more than the question you type. It is the whole working set the model reads before it answers.

Some parts are fixed by the team that builds the agent. Others change with every request, and a few come from the tools the agent calls along the way.

Deciding which of these to include, and how much of each, is the daily work. For the build side, see our AI agent development work.

Why it matters and the core moves

Overloaded context

  • Everything pasted in
  • Long history replayed
  • Every tool listed

Engineered context

  • Only what the task needs
  • History summarized
  • Few, relevant tools

Adding more text does not make an agent smarter. Too much can bury the useful part, and every extra piece costs time and money.

Gartner forecasts that by the end of 2027 more than 40% of agentic AI projects will be dropped. The causes it names are rising costs, unclear value and weak risk controls.

Careful context choices speak to the first two. Teams keep the window lean with a few habits, and a person still reviews work that carries risk.

  • Give less information, but better information
  • Summarize long histories instead of replaying them
  • Keep notes outside the window and call them when needed
  • Offer only the tools the current task needs

How context engineering differs from prompt engineering

Prompt engineering

  • One instruction
  • Wording and examples
  • A single request

Context engineering

  • The whole working set
  • Documents, memory and tools
  • Every step of the agent

Prompt engineering is about writing a single, effective instruction. Turing College describes context engineering as architecting the whole information ecosystem around that prompt.

So a prompt is one piece of the context. Context engineering covers the whole working set.

Read the context engineering vs prompt engineering page for the full contrast, or the prompt engineering entry for the instruction side.

It also differs from retrieval-augmented generation, which is one way of fetching documents into the context, and from an AI agent, which is the system that uses the context.

FAQ

Context engineering questions

  • Neither replaces the other. A good prompt is still part of the context. Context engineering covers more: documents, memory and tools. Agents that run many steps lean on it most.
  • Context engineering for AI agents means choosing what the agent reads at each step of a task. Because agents act across many steps, what they see keeps changing and needs managing.
  • The context window is the limited amount of text a model can consider at one time. Everything the agent needs for a step has to fit inside it.
  • No. Extra text can hide the useful part and raises cost. Teams aim for the smallest set of information that lets the agent do the job well.
  • Yes. Anthropic warns that more agent autonomy raises costs and lets small errors compound, so risky steps still belong with a person. See human in the loop.

Next step

Find out what it would save you.

A free 30-minute call: you leave knowing which processes to automate first.