From the source
Amazon's guide documents three composable strategies used to build a production agent for Flightscape that handles 20 MB+ JSON payloads on Amazon Bedrock AgentCore.
- The Training Schedule Optimization agent verifies crew training schedule assignments against business rules, but with 40+ tools and megabyte-scale JSON inputs, average request latencies exceeded 15 seconds across most calls.
- Every tool call injected its full payload into the model context, inflating token counts and costs, and on larger datasets the context window filled up before the agent could finish reasoning.
- The first strategy moves heavy artifacts such as request JSON, response JSON and validation data to Amazon S3, so AgentCore memory persists only stable references.
- When a tool returns an oversized list or dictionary, the agent stores the full result in S3 and passes the model a compact summary with a handle, which the model can expand using get_result_page_tool().
- Together, the optimizations reduced token consumption by up to 71% and cut average latency by up to 80% across benchmark runs on a representative 23 MB payload.






