Home icon

Reducing token costs and latency in Amazon Bedrock AgentCore JSON workloads

Machine Learning Blog



This article describes three optimization strategies for reducing token consumption and latency in Amazon Bedrock AgentCore agents handling large JSON workloads, demonstrated through a production crew-management agent for Flightscape.

  • Persist lightweight session state in AgentCore memory while offloading heavy artifacts to Amazon S3 using content-addressed references
  • Implement on-demand result paging for large tool outputs, returning compact summaries with handles instead of full lists
  • Compact oversized dictionary outputs with structural descriptors showing field types and samples rather than complete content
  • Achieved 71% token reduction and 80% latency improvement on 23 MB payloads through combined strategies
  • Full payloads remain accessible via handles when deeper inspection is needed, preserving reasoning capability

These composable strategies enable production agents with dozens of tools to handle multi-megabyte datasets efficiently while maintaining full data access and reasoning capability across extended conversations.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Nov 17
2026
Securely exposing Amazon Bedrock AgentCore Runtime
Nov 10
2026
Amazon Bedrock AgentCore now offers a Web Search API
Nov 11
2026
Introducing the Web Search API on Amazon Bedrock AgentCore
Oct 28
2026
Building an Agentic AI Platform on Amazon Bedrock AgentCore

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.