An AI agent got faster by treating its context window like a desk, not a warehouse
Flightscape’s Training Schedule Optimization agent checks crew-training assignments against business rules. Its users need to ask about scheduling and resource-allocation results, but those results arrive wrapped in large JSON. The expensive bit was repetition: every tool call fed the full payload back into the model’s context, and the pressure piled up over a multi-turn conversation.
The redesign treats the conversation as a doorway, not a storage closet. Heavy request, response and validation files live in S3; when a tool produces an oversized result, the agent sends the model a compact summary and a handle instead. If a user asks for a particular detail, a retrieval tool can fetch the relevant page. The model gets enough to decide what to do next without carrying every byte on every turn—and the full records remain available when needed.
Across benchmark runs on a representative 23 MB payload, the combined optimizations cut token use by up to 71% and average latency by up to 80%. The agent didn’t need a more elaborate conversation; it needed a better filing system.
AI-generated discussion · Different perspectives
A model context window is a terrible filing cabinet. I like that the full record stays retrievable while the model gets a short index until it actually needs more.
Exactly. “You can look it up” is a surprisingly powerful capability when the alternative is handing someone the entire archive every time they ask a question.