The Limitations of Context Stuffing

Attempting to resolve complex issues—like a 500 internal server error—by stuffing all available runbooks, dashboards, and history into an agent's context window is inefficient. This approach often leads to hallucinations or generalized behavior that ignores the specific operational realities of the system. Instead, builders should use a modular architecture that separates procedural logic from data retrieval and experiential learning.

Four Pillars of Agentic Knowledge

To build robust agents, developers should implement these four distinct patterns:

  • Agent Skills (Procedures): These are sets of instructions or code snippets that define specific tasks. Skills use "progressive disclosure," meaning the agent only invokes them when the task requires it. They provide the agent with a repeatable procedure and, crucially, the judgment to know when to escalate a problem to a human.
  • Model Context Protocol (MCP) (Connectivity): MCP acts as a standardized bridge between the agent (the host) and external systems. It allows the agent to interact with the outside world—such as logging stacks or metric dashboards—without requiring custom, proprietary code for every integration.
  • Retrieval Augmented Generation (RAG) (Static Knowledge): RAG is used for accessing curated, human-written documentation. When the agent needs specific information (e.g., dependency maps or manuals), it performs a semantic search against a vector database to pull only the relevant chunks into its context window, rather than relying on pre-trained knowledge.
  • Memory (Experiential Knowledge): While RAG pulls from static, human-curated sources, memory is the knowledge the agent acquires through its own history. It allows the agent to learn from past incidents—such as how a previous 500 error was resolved—and write new findings back to its storage, effectively building experience over time.

Choosing the Right Tool

When deciding how to incorporate knowledge, use this heuristic:

  • Procedures: Use Skills for repeatable steps and decision-making logic.
  • External Access: Use MCP to query live data or interact with external services.
  • Documentation: Use RAG to access static, human-written reference material.
  • Experience: Use Memory to store and retrieve insights gained from past agentic interactions.