Artificial Intelligence
#AI agents
#Amazon Bedrock
#AWS
#token optimization

AWS Reports Lower Token Use in JSON Agent Tests

Makzit AI News·Source: AWS ML Blog··4 min read
A conceptual editorial scene illustrating "AWS Reports Lower Token Use in JSON Agent Tests" (Artificial Intelligence) — AWS says three changes to a Flightscape crew-scheduling agent reduced token use and latency in its t

AWS says three changes to a Flightscape crew-scheduling agent reduced token use and latency in its tests by storing large artifacts in S3 and returning compact, retrievable tool results.

What happened

AWS has described changes to a crew-scheduling agent built for Flightscape, an airline operations platform. The agent uses LangGraph and Amazon Bedrock AgentCore to answer questions about crew assignments, scheduling and resource allocation. AWS says it handles JSON payloads larger than 20 MB and uses more than 40 tools; before optimization, average request latency exceeded 15 seconds across most calls. The company identified repeated inclusion of large payloads in the model context as a source of token use and delay (AWS ML Blog).

AWS reports three changes. First, it moved large artifacts such as request, response and validation data to Amazon S3, while AgentCore memory retains references rather than the heavy payloads. The distinction matters: AWS says live graph state still contains parsed domain objects for tool execution, even though persisted session state is lightweight. Second, tools handling large lists return a count, a sample and a handle to the full result; the agent can retrieve selected pages when needed. Third, oversized dictionaries are represented by compact descriptions of their fields, with full data available through a handle (AWS ML Blog).

In AWS’s comparison using the same questions and dataset, a five-question conversation used about 289,500 tokens before the changes and about 82,900 afterward, while average trace latency fell from 15.4 to 3.1 seconds. Across 100 sample questions, AWS reports token use declining from 23.6 million to 8.5 million, and average trace latency from 7,930 to 2,461 milliseconds. These are results reported by AWS from its benchmark runs, not independently verified measurements (AWS ML Blog).

Why it matters

The design separates access to a complete dataset from what the model receives at the start of a tool interaction. Rather than repeatedly placing an entire large result in context, the agent can begin with a smaller representation and fetch details as needed. AWS’s figures suggest this approach can reduce context load in its tested scheduling workload; they do not establish that other agents will achieve comparable savings (AWS ML Blog).

Practical impact

For developers, this is an architectural change, not just a prompt adjustment. AWS lists an S3 bucket, AgentCore memory for session-state persistence, and a LangGraph-based agent or equivalent framework with tool-calling support among the prerequisites. Implementations also need a way to store artifacts, retain and resolve references, and expose retrieval tools. Teams would need to decide which fields belong in the initial summary and how users or the agent request additional pages (AWS ML Blog).

For users, the intended benefit is more responsive exploration of large scheduling results. The trade-off is that an initial answer may contain only a sample or structural summary; getting specific records can require another retrieval step. AWS does not report how often that extra step occurs across user tasks (AWS ML Blog).

Limitations

This report relies on a single vendor-authored source and cannot independently corroborate its performance claims. AWS describes comparisons on its own agent, questions and dataset, including a representative 23 MB payload, but does not show that the results generalize to other workloads, models or deployments. The post also does not provide a full cost comparison that accounts for storage and retrieval, or quantify the engineering and operational effort required to maintain artifact storage and paging. Its results should therefore be read as a report about this implementation, not a general performance guarantee (AWS ML Blog).

Sources

Automated Report: This article was drafted with AI assistance based on the sources below. There is no human review step.

Comments

Sign in to join the conversation.

Loading comments…