AWS and Flightscape report that three changes to a large-JSON agent reduced tokens by up to 71% and average latency by nearly 80%.
AWS and airline-operations platform Flightscape describe three ways to reduce the context and response-time burden of an AI agent working with large JSON data. In a November 17, 2026, technical post, the teams report testing the techniques on Flightscape’s Training Schedule Optimization agent, which checks crew-training assignments against business rules and handles more than 40 tools.
The agent uses LangGraph with Amazon Bedrock AgentCore. Before optimization, requests often took more than 15 seconds, and repeatedly passing large payloads into the model consumed tokens and could fill the context window. The test workload included a representative 23 MB payload, within a system designed for inputs exceeding 20 MB.
The first change moves large request, response and validation artifacts into Amazon S3, leaving AgentCore memory to store references and lightweight session information. The second stores oversized tool-result lists and returns a small sample and handle; the agent can request specific pages when it needs more data. The third replaces large nested dictionaries with compact descriptions, such as counts and samples for lists and key counts for nested objects. Full data remains retrievable from storage.
In a five-question conversation, AWS reports token use fell from about 289,500 to 82,900, while average trace latency dropped from 15.4 seconds to 3.1 seconds. Across 100 sample questions, tokens declined from 23.6 million to 8.5 million and average trace latency from 7,930 to 2,461 milliseconds. For the heaviest single query, reported turn latency fell from about 165 seconds to 9.9 seconds.
These are results from the teams’ specific benchmarks, not a general performance guarantee. The approach is aimed at agents that repeatedly handle large structured data: it keeps full records available while sending the model only summaries or slices needed for a particular turn.

