{
  "id": 18147130,
  "title": "Four layers of context engineering for production AI agents: How Deep Insight applies them in working code",
  "url": "https://urgent.news/2026/11/04/four-layers-of-context-engineering-for-production-ai-agents-how-deep",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-04T16:30:40.000Z",
  "source": {
    "name": "AWS Machine Learning",
    "slug": "aws-machine-learning",
    "url": "https://aws.amazon.com/blogs/machine-learning/four-layers-of-context-engineering-for-production-ai-agents-how-deep-insight-applies-them-in-working-code/"
  },
  "original_language": "en",
  "account": "When production AI agents handle complex tasks like data analysis and report generation, managing context can quickly become a major issue. The 200K-token window available to LLMs like Anthropic Claude Sonnet 4.5 becomes quickly depleted, causing the agent to fail, produce inaccurate results, or incur higher costs. A collection of published guidance exists to address this, but implementing the techniques together can be challenging. By combining them, measurable improvements can be achieved, such as reducing the number of tokens added to context by 95% using a single tool and shrinking the system prompt by 97%. This series of articles organizes that guidance into practical steps you can follow. Anthropic provides several techniques to tackle lengthy tasks, which are grouped into four layers of context engineering. Each layer addresses the limitations of the previous layers, forming a layered discipline to efficiently manage context. Layer 1 focuses on isolating context through multi-agent architecture, using a separate context window for each specialized agent. Deep Insight employs a hierarchy of agents: Coordinator, Planner, Plan Reviewer, Supervisor, and Tool Agents (Coder, Validator, Reporter, Tracker, Auditor). By assigning each agent its own context, the Coder agent, which uses the most tokens, remains under 25K tokens total. Each agent only receives the information it needs and communicates its progress to other agents. The key to successful isolation is minimizing information shared between agents. Deep Insight achieves this by using a Python dictionary, shared_state, to store only four key pieces of information: messages - the previous agent's final message (not the entire conversation history); clues - compressed summaries collected from each agent; full_prompt - the original user prompt; and full_context - a list of all agent outputs.",
  "summary": "In production AI agents, context management is the real bottleneck. This post presents a four-layer context engineering framework (architecture, prompts, file-based tools, and verification agents), implemented in working code from Deep Insight, an open source multi-agent data analysis solution on the Strands Agents SDK and Amazon Bedrock AgentCore.",
  "key_points": [
    "Deep Insight employs a four-layer context engineering system to manage AI agent context.",
    "Layer 1 isolates context using multi-agent architecture with specialized agents.",
    "Coder agent uses only 25K tokens, minimizing context depletion."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}