# Amazon — Four layers of context engineering for production AI agents: How Deep Insight applies them in working code

- Company: Amazon (amazon.com)
- Announced: 2026-11-04T16:30:40+00:00
- Category: not stated
- Coverage: not counted
- Announcement: no
- Group: routine
- Source: https://aws.amazon.com/blogs/machine-learning/four-layers-of-context-engineering-for-production-ai-agents-how-deep-insight-applies-them-in-working-code/
- Record: https://forck.live/items/31634-four-layers-of-context-engineering-for-production-ai-agents-how-deep-insight
- Subject: Bedrock / Nova
- Models affected: Claude Sonnet 4.5
- Context window: 200K context window

Amazon's guide explains four layers of context engineering for production AI agents, using Deep Insight, an open source multi-agent data analysis solution, as the reference implementation. The layers are isolating context through multi-agent architecture, controlling it through prompts, externalizing it to the filesystem, and verifying it with independent agents and safeguards. The post says a single write-and-execute tool cuts the tokens each script adds to context by about 95 percent, and loading skills on demand shrinks the system prompt by about 97 percent. It cites Anthropic's Claude Sonnet 4.5 on Amazon Bedrock, which offers a 200K context window, and notes that a sample sales-analysis task consumes over 150K tokens across 15 minutes. Deep Insight gives each specialized agent its own context window, keeping even the Coder under 25K tokens, and passes only compressed results through a shared_state dictionary holding messages, clues, full_plan and history. The post is the second in a three-part series; the third, on deploying agents in a private network on Amazon VPC, is coming soon.

## Evidence

Verbatim from https://aws.amazon.com/blogs/machine-learning/four-layers-of-context-engineering-for-production-ai-agents-how-deep-insight-applies-them-in-working-code/:

> When production AI agents handle tasks such as data analysis and report generation, context management can become a major bottleneck. A 200K-token window sounds generous until a real-world task burns through most of it in minutes. Data analysis and report generation leave the agent failing mid-execution, losing accuracy, or driving up costs. A body of published guidance already addresses this, but the individual techniques are easier to read about than to apply. Applied together, they make a measurable difference: in the reference implementation this post walks through, a single write-and-execute tool cuts the tokens each script adds to context by about 95 percent, and loading skills on demand shrinks the system prompt by about 97 percent.
> 
> This series organizes that guidance into practices you can apply directly. Anthropic’s engineering posts, together with features built into the Strands Agents SDK, converge on four layers of context engineering: isolate context at the architecture level, control it through prompts, externalize it to the filesystem, and verify it with independent agents and safeguards.

---

Record: https://forck.live/items/31634-four-layers-of-context-engineering-for-production-ai-agents-how-deep-insight
Catalogue: https://forck.live/llms.txt
Current issue: https://forck.live/feed.md
