AWS Machine Learning

AWS details four context engineering layers for AI agents

Long agent tasks such as data analysis and report writing can fill a model's context window within minutes. In Part 2 of a series, AWS Machine Learning walks through one open source project to show how that pressure can be managed in code.

Published: Source checked:

What the post describes

The post groups context management into four layers and demonstrates each in Deep Insight, an open source multi-agent data analysis solution built on the Strands Agents SDK and Amazon Bedrock AgentCore. Each layer is presented as covering gaps left by the one before it.

The example task is a request to analyze sales data and produce a DOCX report. According to the post, such a task runs through several stages and consumes over 150K tokens across about 15 minutes, which is why a single context becomes a problem.

Confirmed details and reported figures

The post gives concrete settings: output budgets of 1,000–1,500 tokens for the Coder, 800 for the Validator and 1,000 for the Reporter; a shared state that stores only four items; and a conversation manager that summarizes the oldest 50 percent of messages while keeping the 10 most recent.

The savings numbers are reported by the authors about their own reference implementation: about 95 percent fewer tokens added per script by the write-and-execute tool, about 97 percent smaller system prompt through on-demand skills, and up to 90 percent lower input token cost with prompt caching on repeated calls. The post says the 95 percent figure is based on one example.

Limits and practical impact

The excerpt contains no independent benchmark, no accuracy comparison and no pricing or regional availability information, so the percentages should be read as illustrations, not guarantees. Part 3, about moving Deep Insight from development to production, is only announced as coming soon.

For teams building agents, the useful takeaway is the order of defenses: split work across agents, constrain outputs, move bulky content to files, then add independent checks. Teams can test each step against their own workloads before relying on the quoted savings.

← All AI news