
An agent reads a customer email asking to change the quantity on an order to 400. It extracts the number perfectly, updates the order and sends a confirmation. The order had shipped two days earlier. Nothing was wrong with the model. What was missing was context, and that is the problem context engineering for AI agents is meant to solve.
Context engineering for AI agents is the practice of deciding what an agent knows at each step of its work. Most guides cover the technical half of that: instructions, tools, memory and retrieval. This guide covers the half that decides whether an agent survives in an enterprise: the process context. What it is, why agents fail without it, where it comes from, how to build it, how to govern it and how to measure whether an agent has enough of it.
Context engineering is the discipline of curating everything that enters an AI model's working memory while it runs: system instructions, examples, tool descriptions, retrieved documents and the history of the task so far. Anthropic's engineering team describes it as the natural progression of prompt engineering, because agents that work over many steps need their whole working state managed, not just a well-written instruction.
Context is also finite. The more a model is given, the harder it becomes to find what matters, an effect researchers call context rot. So the craft is selection: the smallest set of information that makes the right action most likely.
For an agent that answers questions, that selection is mostly about documents. For an agent that acts inside a business process, it is mostly about the case in front of it.
Prompt engineering is about writing a good instruction. Context engineering is about everything the model sees, at every step, including what it learned two steps ago and what it is about to retrieve next.
The shift happened because of agents. A chatbot answers once. An agent runs in a loop: it reads, decides, calls a tool, reads the result and decides again. Every turn adds information that could be useful or could be noise. A prompt is written once. Context is assembled again at every step.
That is why the term spread so quickly once agents moved from demos to real work. The question stopped being "how do I phrase this?" and became "what does the agent need to know right now?"
For an agent that handles real operational work, context comes in two layers. Most of the public guidance covers the first. Most production failures come from the second.

Technical context is what the model sees in a single call: the system prompt and examples, the tools and MCP servers it can use, its notes from earlier steps and the documents retrieved at runtime. Engineering this layer well keeps an agent focused, fast and affordable. It is where frameworks, model providers and most tutorials put their attention, and rightly so.
Process context is what the business knows about the case in front of the agent:
A language model cannot infer the state of an order from one email. Someone has to give it.
Gartner's March 2026 research on the context layer for AI agents makes the same split. It names three core components: semantics, which captures what business concepts mean; operational state, which captures what is happening right now; and provenance, which records where information came from and how decisions were made. Most context engineering guidance is about semantics and retrieval. Operational state is where enterprise agents fail.
Go back to the order that had already shipped. The agent had excellent technical context. It read the email, understood the request and called the right tool. It simply did not know which order was meant, that the order had left the warehouse, or that changes for this customer above a certain value need approval.
The same pattern shows up wherever work arrives as messages:
These are not model failures. They are context failures.
The numbers point the same way. In Confluent's 2026 Data Streaming Report, which surveyed 4,625 IT leaders, 32% of organisations had agentic AI in production. Among those, 77% reported stalled projects, and data quality and governance problems ranked among the top obstacles alongside skills and model reliability. Gartner expects over 40% of agentic AI projects to be cancelled by the end of 2027, citing escalating costs, unclear business value and inadequate risk controls. An agent that cannot see the process cannot be trusted with it, and an agent nobody trusts does not get to scale.
Process context does not live in one system. The order is in SAP, the customer in Salesforce, the change request in a shared mailbox and the reason for the exception in someone's reply. Assembling it means reading all of those sources and tying them to the same case.
That is the job of process intelligence. It reconstructs how work actually runs from the communication and system data a business already has, and links every message and record to the case it belongs to. The result is a context graph: a real-time, AI-constructed map of how a business process actually unfolds, built from the messages, transactions, CRM records and ERP objects that make up the operational reality of an enterprise.
Process maps answer: how should this work? Context graphs answer: how does this work? For an agent, only the second question is useful.
The hard part is linking. An email rarely carries the order number in a clean field. A follow-up arrives from a different person, in a different language, three days later. Tekst calls the capability that follows one case across email, ERP and CRM Universal Tracing. Without it, an agent sees a stream of unrelated messages. With it, the agent sees a case. As Servaas Strobbe, Head of Product at Tekst, puts it: "If you don't capture what happens in email and documents, you're automating guesswork."
Two neighbouring approaches are often mistaken for process context. Retrieval-augmented generation fetches documents that resemble the question. That helps an agent with knowledge, such as a policy or a product sheet, but it does not tell it the state of a live case. A knowledge graph describes what things are and how they relate: this customer, these products, that contract. It does not describe what is happening to them this week.
Both have their place in the technical layer. Neither replaces a reconstructed view of the process.
Process context can be built step by step, and the work starts before any agent is deployed.
Teams that follow this order usually find that the agent itself becomes the easy part. The work is in making the process visible and keeping that picture current.
Context is not only about giving an agent more. It is also about giving it the right amount, and recording what it used. One of the three themes behind Gartner's 2027 trends is governing the autonomous agent platform: the context, controls, identity and security that trustworthy autonomy needs.
For operations, governance comes down to four questions. Which cases may this agent see, and which data within them? Which actions may it take on its own, and up to what value or risk? When must it stop and hand over to a person? And can you show afterwards what it saw and why it acted?
Process context makes all four answerable, because the agent works on a defined case rather than on whatever happened to land in its prompt. Approval steps belong in the flow of work. At Tekst, for example, uncertain cases go to a person in the Sidepanel, which shows the email, the extracted data and one button to approve, and an automation built from an AI assistant through the Tekst MCP is only published after a person confirms it.
An agent that cannot explain what it saw cannot be audited. An agent that cannot be audited does not get access to SAP.
Context gaps are measurable, and it pays to measure them before blaming the model. Five signals are worth tracking:
Take a baseline of how the process runs today before the agent goes live. Without it, there is no way to tell whether the agent improved the process or just moved the work around.
In October 2026 Gartner listed AI context platforms among its top strategic technology trends for 2027. Seen from operations, the reasoning is clear: as agents gain autonomy, what they know about the business decides how far they can be trusted. That turns context from a developer concern into an operational one.
A context platform for operations needs to do three things. It has to reconstruct the process from the systems and communication where it runs. It has to keep that picture current as work changes. And it has to make it available to agents in a controlled way. The Model Context Protocol has become a common way to handle that last part, which is why a growing number of enterprise software vendors now offer MCP servers. Tekst offers one too, so AI assistants such as Claude, ChatGPT or Copilot can work with the process context Tekst builds.
This is also where agentic process automation comes in. Process intelligence supplies the context, agents act on it, and the outcome of every action flows back into the picture of the process. Seeing and doing, in one loop.
Start with one process where work arrives as messages and the cost of a wrong action is visible: an order inbox, a claims queue or a customer service mailbox. Map how it really runs before deciding what an agent should do in it. Full process visibility is typically possible in under 10 days.
Then ask one question for every step the agent would take: what would an experienced colleague need to know before doing this? The answer is the process context your agent needs. Engineer that first, and the prompt becomes the smallest part of the problem.