Your Agent Is Wasting Tokens and You Don't Know It - Erik Hanchett, AWS
Source
youtube.com
Author
AI Engineer
Date
Context
A large ToolAn operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.Full definition → response can keep costing TokenA piece of text, such as a word, part of a word or a punctuation mark, that a language model represents as numbers and handles as a unit.Full definition → after the call that produced it, because later agent steps may carry it forward as conversation history. Erik Hanchett, speaking as an AWS developer advocate, proposes storing bulky results separately and returning a smaller summary to the model. Talk.
Hanchett applies the same idea to long conversations: keep a limited recent window and summarize older material. That reduces repeated input but also removes detail, a trade-off the talk explicitly notes. The useful starting point is to inspect what each loop actually resends before treating the model's price as the whole cost problem.
Terms in this piece · Glossary
Tool — An operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.
Token — A piece of text, such as a word, part of a word or a punctuation mark, that a language model represents as numbers and handles as a unit.
Inference — Using a trained model to produce an output from a supplied input.
Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.