Optimizing AI Agent Context Quality
Birgitta Böckeler explores the distinction between codified and ambient context in agentic software development. Learn how to apply the CAFES framework to improve signal-to-noise ratios, resolve data conflicts using code as a source of reality, and implement deterministic security controls for enterprise AI systems.
The Context Quality Imperative
In the rapidly evolving landscape of agentic software development, the primary bottleneck is no longer model capability but context quality. Birgitta Böckeler, Principal Engineer at Unblocked, argues that the industry must move beyond treating all data as generic "context" and instead distinguish between two distinct categories: codified and ambient context. Codified context consists of deliberately authored, reusable assets such as skills, rules, and architecture documents, which require version control and evaluation. Ambient context, conversely, is dynamic environmental data from Slack, PRs, and wikis, which requires real-time retrieval and reconciliation. Conflating these two leads to inefficient workflows and degraded agent performance.
The CAFES Framework
To operationalize context quality, Böckeler introduces the CAFES framework (Clarity, Actionability, Fidelity, Efficiency, Security). Fidelity and Efficiency are critical for ambient context, where agents must trust the truth of the data and maintain a high signal-to-noise ratio. Without proper filtering, agents suffer from "context overload," where excessive data distracts the model, or "context starvation," where fragmented MCP servers prevent the agent from accessing relevant information. The framework emphasizes that security is an overarching constraint, not an afterthought, requiring deterministic controls that operate independently of the LLM's probabilistic nature.
Strategic Implementation
Organizations must implement a context engine that ingests, evaluates, assembles, and observes ambient data. A key strategic advantage in software delivery is the use of code as a "source of reality." When conflicts arise between documentation and chat logs, the current state of the code often provides the definitive answer. Additionally, deriving expert graphs from commit history allows systems to weight information based on author authority. Security must be handled via least-privilege access controls applied before data reaches the agent, preventing prompt injection and data leakage. By treating context as a managed product with its own lifecycle, engineering teams can significantly reduce rework and improve the autonomy of their AI agents.
Conclusion
The future of agentic coding depends on the precision of context engineering. Teams must adopt structured frameworks to manage the complexity of multi-source data, ensuring that agents operate with high-fidelity, secure, and relevant information tailored to specific workflow stages.
Key insights
Action items
Quotes
“Overwhelming the agent with context, that's always going to be bad. It's going to have too much context. It's not going to listen to the right pieces.”
“So fidelity is how much can the agent trust the truth of the context that it gets. And efficiency is what's the signal to noise ratio”
“In the software delivery domain, we have this big advantage of having that piece of truth or at least reality in the middle of it that can really help make, yeah, settle a lot of or put a lot of balance into this system.”