The next big unlock for enterprise agents isn't a smarter model. It's better context.
Enterprise AI agents fail on context more often than on models. 2026 data, the token budget, tools for every layer, and what you can run locally.
Anthropic changed one thing about how Claude Opus 4 saw its tools, and its accuracy on internal MCP evaluations went from 49% to 74%. The weights were identical. The only difference was what sat in the context window when the model made its choice.
That result is the clearest single argument I know for where enterprise agents are stuck. Most teams I meet at workshops are still waiting for the next model to fix their agent. The bigger lever, and the one they control, is the information the agent gets to see: which documents, which tools, which memories, which permissions, and in what order.
> Key takeaways > - Published before/after tests show large gains from changing only the context: tool selection 49% → 74% (Opus 4), complex tool parameters 72% → 90%, RAG retrieval failures 5.7% → 1.9%. > - A five-server MCP setup spends ~55K tokens on tool definitions before the agent reads your request. On a 32K local context window, that does not fit at all. > - Vendors converged on this in 2026: Fivetran, Neo4j, Microsoft and Starburst each announced a "context layer" product between September and November, most of it still in preview. > - Most layers of the context stack (parsing, indexing, embeddings, reranking, memory, MCP) run well on your own hardware. That is the part of enterprise AI you can actually own. > - Models still matter: Opus 4.5 without tool search beat Opus 4 with it. Better context is the cheaper lever, not the only one.
The evidence: same model, different context
The most useful data here comes from teams that changed the context and held the model fixed. Anthropic has published several of these tests.
In every one of these published tests the model stayed the same; only what it could see changed.
- Tool search. Instead of loading every tool definition up front, the agent searches a catalogue and loads only the handful it needs. On Anthropic's internal MCP evaluations, Claude Opus 4 went from 49% to 74% and Opus 4.5 from 79.5% to 88.1%. Total context used before work began fell from about 77K tokens to about 8.7K (Anthropic's own totals).
- Tool use examples. Adding worked examples of how to call a tool, not just its JSON schema, took accuracy on complex parameter handling from 72% to 90% in Anthropic's internal testing.
- Programmatic tool calling. Letting the model write code that calls tools and returns only the result, instead of pouring every intermediate result into the window, cut average token use on complex research tasks from 43,588 to 27,297 (37%).
- Contextual retrieval. Prepending a short, generated explanation to each chunk before indexing it, then combining embeddings with BM25 keyword search, cut the top-20 retrieval failure rate from 5.7% to 2.9%. Adding a reranker took it to 1.9%: 67% fewer failed retrievals, with the same generator model.
One more data point from the same company is worth knowing. When Anthropic analysed what made its multi-agent research system good on BrowseComp, token usage alone explained 80% of the variance in performance. Spreading a task across several sub-agents, each with its own clean context window, beat cramming everything into one.
All of these are vendor-reported, on vendor-chosen evaluations. They measure different things, so don't compare the rows with each other. But the direction is consistent, and nobody had to wait for a new model.
What changed in 2026: the industry caught up
The idea isn't new. What changed this year is that analysts, surveys and product launches all started saying the same thing.
- MIT NANDA's 2025 "GenAI Divide" report, as reported by The Register, found 95% of enterprise organisations getting zero return from their AI efforts, and put it down to systems that cannot retain data, adapt or learn over time, not to the models.
- A Redis survey of IT and AI infrastructure leaders found 73% agree that navigable context systems are becoming the line between experimental and production AI, and 94% call compounding system intelligence essential for production maturity while only 4% have achieved it. Redis sells context infrastructure and does not publish its sample size, so treat these as a signal, not a census.
- Thoughtworks moved context engineering to "Adopt" on its Technology Radar in April.
- Product launches. Fivetran announced a Context Layer in September, in limited public preview. Neo4j announced a Context Engine in October, in private preview. In November, Microsoft introduced Microsoft IQ (Work IQ, Fabric IQ, Foundry IQ and Web IQ, with more than 350 third-party connectors; some parts generally available, others in preview), and Starburst introduced Context Studio for its Enterprise Context Layer, in private preview.
When the largest platform vendors all rename their data products after the same idea in the same quarter, the idea has reached the budget line.
What "context" means for an agent
Prompt engineering was about wording one request. Context engineering is about everything the model sees at each step of an agent loop. Forrester's definition is a good one: designing, orchestrating and delivering structured, relevant and timely context to AI systems so their outputs are accurate, grounded and compliant.
In practice, six things compete for the same window:
- Instructions: the system prompt, policies, house rules.
- Tools: the definitions of everything the agent can call.
- Retrieved knowledge: chunks from documents, tickets, wikis, databases.
- Memory: what the agent learned about this user or task in earlier sessions.
- State: the conversation so far, tool results, the plan.
- Permissions: not text in the window, but they decide which of the above should be there at all.
Every one of these costs tokens, and every token you add makes the others a little harder for the model to use.
Six ways context breaks
| Failure | What you see | Evidence | Fix |
|---|---|---|---|
| Context rot | Answers degrade as the window fills, well before the limit | Chroma tested 18 models and found reliability fell as input length grew | Retrieve less, compact history, split work across sub-agents |
| Lost in the middle | The fact is in the prompt and the model still misses it | Accuracy is highest when the relevant passage sits at the start or end | Rerank and put the best evidence first; cut the rest |
| Tool bloat | Wrong tool chosen; window half full before the task starts | 58 tools ≈ 55K tokens of definitions | Load tools on demand; fewer, better-described tools |
| Stale context | Confident answers from last week's data | Redis: 69% of the most mature organisations still feed decisions with stale data | Store a timestamp with every chunk; re-index on change events |
| Ungoverned access | The agent can read or do more than the user could | Stacklok: security is the top obstacle to MCP adoption, named by 64% of software leaders | Check permissions at retrieval time with the caller's identity; log every retrieval |
The common thread: each failure looks like the model being stupid, and none of them is fixed by a bigger model.
The token budget nobody draws
Here is the exercise I now run at the start of every agent workshop. Before anyone writes a prompt, we add up what the agent will carry into each call.
Tool definitions alone can fill a local model's window before the user has typed a word.
Anthropic measured a realistic setup: GitHub (35 tools, ~26K tokens), Slack (11 tools, ~21K), Sentry, Grafana and Splunk. That's 58 tools and about 55K tokens of definitions before the conversation starts. Adding Jira alone adds ~17K. The largest overhead Anthropic says it has seen was 134K tokens.
On a 200K hosted window, 55K is uncomfortable. On a local model it's often fatal. The KV cache that holds the context lives in the same VRAM as the weights and grows with every token, which is why our own can-i-run checks assume an 8K context by default and why many consumer setups stop at 32K. On a 32K window those five servers don't fit at all.
How much depends on the model's attention design. Llama 3.1 8B needs 4.29 GB of KV cache at 32K and 17.18 GB at 128K, on top of its weights. Newer sliding-window designs are far cheaper: Gemma 4 12B needs 2.65 GB at 128K. Either way, every token you waste on tool definitions is memory you can't spend on the task, which is why context discipline matters even more on your own hardware than in the cloud.
Try it with your own setup:
Context Budget Calculator: five MCP servers, three windows
GitHub, Slack, Sentry, Grafana and Splunk, with 55,000 tokens of tool definitions, plus a 1,500-token system prompt, retrieval, memory, history and room for the answer: 67,700 tokens before the question.
| Window | Share used | Fits? |
|---|---|---|
| 32K | 206.6% | No, over by 34,932 |
| 128K | 51.7% | Yes |
| 200K | 33.9% | Yes |
With tools loaded on demand (four per task), the same agent needs 16,200 tokens.
Approximate, measured by Anthropic with Claude's tokenizer (Nov 2025). Your model's tokenizer will differ.
Open the calculator with this setup →The tool adds up instructions, tools, retrieved chunks, memory and history, shows what's left for reasoning and output, and uses our compute module to tell you whether the resulting context still fits next to your model on your GPU. Flip "load tools on demand" to see what tool search or skills would save.
A note on the numbers: Anthropic's token counts use Claude's tokenizer. Qwen, Llama and Gemma tokenizers count differently, so treat the presets as estimates and measure your own servers if the margin is tight.
The context stack, layer by layer
When vendors say "context layer", they mean some combination of seven jobs. You don't need all seven on day one, but it helps to know which one is failing.
Every layer below the managed platforms has an open-licence or self-hostable option.
| Layer | Job | Self-hostable examples | Managed examples |
|---|---|---|---|
| 1. Ingest & parse | Turn PDFs, tickets and tables into clean text | Docling, Unstructured (library), Apache Tika | Most platforms bundle this |
| 2. Index & store | Vectors, keywords and metadata, kept fresh | Qdrant, pgvector, Chroma | Managed vector DBs |
| 3. Retrieval | Embed, search (dense + BM25), rerank | Qwen3-Embedding, Qwen3-Reranker, EmbeddingGemma, BGE-M3 | Hosted embedding APIs |
| 4. Semantics & graph | Entities, metrics, relationships, business definitions | Neo4j, Microsoft GraphRAG, LightRAG | Neo4j Context Engine, Fabric IQ |
| 5. Memory | Facts learned across sessions, with time | Mem0, Zep / Graphiti, Letta | The same vendors' cloud tiers |
| 6. Access protocol | One way to reach tools and data | MCP (spec 2026-07-28), Agent Skills, tool search | Every major agent platform |
| 7. Governance | Identity-aware access, audit, freshness checks | MCP gateways, row-level security in your DB | Microsoft IQ (permission-aware retrieval, MCP policies) |
Two standards hold the middle of this together:
- MCP is now the default way agents reach tools and data. Its 2026-07-28 spec made the protocol stateless, so any request can hit any server behind a plain load balancer, and Anthropic reported more than 400 million monthly SDK downloads in July 2026.
- Agent Skills handle procedural knowledge with progressive disclosure: only a skill's name and description sit in the window until the task needs it. When Anthropic donated the standard to the Agentic AI Foundation in October, more than 70 platforms supported it, with 1 million skills published and nearly 280 million installs.
A small example from this site: the LLMConfigurator MCP server answers "does this model fit this GPU?" with a deterministic calculation from our compute module instead of letting the model guess at VRAM. That's context engineering in miniature: replace a fuzzy thing the model might hallucinate with a precise thing it can look up. See how to connect the MCP server.
The local angle: the context layer is the part you can own
Open-weight models keep getting closer to the frontier, and they are interchangeable in a way your context isn't. Your documents, tickets, definitions, permissions and memories are the asset. They're also the part with the most regulatory risk.
The good news for anyone who cares about sovereignty: almost the whole stack runs on modest hardware.
- Embedding and reranking models are small. Qwen3-Embedding and Qwen3-Reranker come in 0.6B, 4B and 8B sizes under Apache-2.0; EmbeddingGemma has 300M parameters.
- Vector stores and parsers are ordinary server software. Qdrant, pgvector, Docling and Tika run in containers next to the rest of your stack.
- Local hosts speak MCP. LM Studio has been an MCP host since version 0.3.17, and Open WebUI has connected to MCP servers natively (over Streamable HTTP) since version 0.6.31.
One caution that gets lost in sovereignty debates: if you retrieve locally but generate with a hosted model, the retrieved chunks still leave the building. Local retrieval reduces how much you send, because you send only what the task needs, but it doesn't make a hosted call private. For the most sensitive data, run the whole loop, model included, on your own hardware. For everything else, a hybrid is reasonable: local parsing, indexing, retrieval and permission checks, then the minimum necessary context to whichever model does the reasoning.
If you're sizing a box for this, the retrieval side is light; the generator model and its context window are what decide the GPU. By our compute module, Qwen3.8 27B at Q4_K_M with a 128K context needs 26.3 GB, fits 32 GB, so a single 32 GB card is enough:
And if you want to test a long-context setup before buying, rent a GPU for an afternoon:
Rent GPUs on RunPod → Rent GPUs on Vast.ai →This page contains affiliate links.
For the deployment side, see our sovereign AI deployment guide and the step-by-step local RAG guide.
A seven-step context checklist
- Draw the budget first. Add up instructions, tools, retrieval, memory and history before writing a prompt. Reserve room for the answer.
- Load tools on demand. Tool search, skills or a router. Fewer tools in the window, each with a clear description and one worked example.
- Retrieve with two methods, then rerank. Dense embeddings plus BM25, a reranker on top, and a short contextual header on every chunk.
- Put the best evidence first and cut the rest. Ten mediocre chunks are worse than three good ones.
- Timestamp everything. Every chunk and memory carries "as of". Re-index on change events, not on a weekly cron.
- Enforce permissions at retrieval time. The agent queries with the user's identity, and every retrieval is logged. Never filter after the model has seen the data.
- Debug the context, not just the model. When an agent fails, log exactly what was in its window. Most of the time the answer is right there.
Where this argument is weaker
I'd be overselling it if I stopped there.
- Models still matter. In the same Anthropic test, Opus 4.5 without tool search (79.5%) beat Opus 4 with it (74%). A better model and better context stack; you want both.
- Most of the evidence is vendor-reported. Anthropic's numbers come from internal evaluations. Redis, Stacklok and the context-layer vendors sell the thing they surveyed. All of it points the same way, but none of it is independent replication.
- Context layers cost something. Every retrieval, rerank and tool search adds latency and moving parts. If your knowledge base is under about 200,000 tokens (about 500 pages), Anthropic's own advice is to skip RAG and put it all in the prompt with caching.
- Governance is the slow part. Stacklok's December 2025 survey of software leaders found 45% of their organisations running MCP servers in limited or broad production, and security was the top obstacle, named by 64%. Connecting agents to data is easy; deciding who may see what is the real project.
Frequently asked questions
What is context engineering?
Context engineering is the practice of deciding what an AI agent sees at each step: instructions, tool definitions, retrieved documents, memory, conversation state and the permissions that govern them. Prompt engineering words one request; context engineering designs the whole information environment the agent works in.
Is context engineering just RAG with a new name?
No. Retrieval is one layer. Context engineering also covers which tools are loaded, how memory is stored and expired, how history is compacted, how work is split across sub-agents, and how permissions decide what may enter the window at all.
Do bigger context windows make context engineering unnecessary?
No. Chroma's tests on 18 models found reliability falls as input grows, well before the stated limit, and models use information at the start and end of a prompt better than the middle. A bigger window gives you more room to make mistakes. Below about 200,000 tokens of knowledge, putting everything in a cached prompt can still be the simplest option.
How many tokens do MCP tool definitions use?
Anthropic measured about 55K tokens for 58 tools across GitHub, Slack, Sentry, Grafana and Splunk, and about 17K for Jira alone, using Claude's tokenizer. Other tokenizers differ. Loading tools on demand with tool search brought Anthropic's example from about 77K to about 8.7K tokens before work began.
Can I build a context layer entirely with local, open-weight tools?
Yes. Parsing (Docling, Tika), storage (Qdrant, pgvector), embeddings and reranking (Qwen3-Embedding, Qwen3-Reranker, EmbeddingGemma), memory (Mem0, Letta) and MCP all run on your own hardware. If you then send the retrieved context to a hosted model, that context leaves your network, so keep the generator local for the most sensitive data.
Do I need a managed platform like Microsoft IQ?
Not to start. Managed platforms bundle connectors, a knowledge graph and identity-aware access, which helps if you already live in that cloud. A team with one well-defined use case can get far with a vector store, a reranker, a handful of MCP servers and strict permission checks.
What should I measure to know if my context is the problem?
Log the full context of every failed agent run and review it. Track retrieval failure rate (did the right chunk make the top results?), tokens spent on tools versus task, the age of the data used, and how often the agent picked the wrong tool. If those look bad, a model upgrade won't fix them.
Sources (22)
- Introducing advanced tool use on the Claude Developer Platform, Anthropic, checked 2026-11-28
- Introducing Contextual Retrieval, Anthropic, checked 2026-11-28
- How we built our multi-agent research system, Anthropic, checked 2026-11-28
- Effective context engineering for AI agents, Anthropic, checked 2026-11-28
- Donating Agent Skills to the Agentic AI Foundation, Anthropic, checked 2026-11-28
- The 2026-07-28 Specification, Model Context Protocol, checked 2026-11-28
- Bringing MCP 2026-07-28 to Claude, Claude (Anthropic), checked 2026-11-28
- Context Rot: How Increasing Input Tokens Impacts LLM Performance, Chroma, checked 2026-11-28
- Lost in the Middle: How Language Models Use Long Contexts, Liu et al., TACL, checked 2026-11-28
- The GenAI Divide: State of AI in Business 2025, MIT NANDA, checked 2026-11-28
- The state of context engineering 2026, Redis, checked 2026-11-28
- State of Model Context Protocol in Software 2026, Stacklok, checked 2026-11-28
- Introducing the new Microsoft IQ, Microsoft (Azure blog), checked 2026-11-28
- Starburst Introduces Enterprise Context Layer for AI Agents, Unite.AI, checked 2026-11-28
- Neo4j Context Engine launches, CXOToday, checked 2026-11-28
- Announcing Fivetran Context Layer, Fivetran, checked 2026-11-28
- Technology Radar: Context engineering (Adopt), Thoughtworks, checked 2026-11-28
- Context Engineering And ContextOps: The Missing Foundation For Scaling Agentic AI, Forrester, checked 2026-11-28
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models, Qwen team, checked 2026-11-28
- EmbeddingGemma: Powerful and Lightweight Text Representations, Google, checked 2026-11-28
- MCP in LM Studio, LM Studio, checked 2026-11-28
- Open WebUI docs (MCP support), Open WebUI, checked 2026-11-28