Context Providers
A thin layer between agents and tools that fixes context pollution, scope collisions, and prompt bloat.
One of the most underrated problems in agentic systems isn't the model — it's the context. As agents grow more capable, the surface area of what they "know" at any given moment explodes. Context providers are my answer to this.
A context provider is a lightweight abstraction that sits between the agent runtime and the tools it can call. Instead of passing raw state into every tool invocation, the provider resolves only the context that tool actually needs — nothing more, nothing less.
This solves three concrete problems I've run into building large-scale multi-agent systems:
- Context pollution — agents inheriting irrelevant state from upstream tasks.
- Scope collisions — two parallel agents writing to the same context keys.
- Prompt bloat — the system prompt growing unbounded as context accumulates.
The implementation is intentionally boring. A context provider is just a function that receives a request and returns a typed dictionary. What makes it powerful is the discipline it enforces: every tool must declare its context dependencies explicitly.
We've been running this pattern in production at Agno for six months. Token counts dropped 40%. Agent reliability went up. Debugging became tractable again.
If you're building with agents at scale, the context layer deserves as much attention as the model layer. Start there.