Your Agent Is Wasting Tokens and You Don't Know It - Erik Hanchett, AWS
Source
AI Engineer
Author
AI Engineer
Date
Terms in this piece · Glossary
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
inference — Running a trained model to get answers — the phase where AI is actually used, as opposed to trained.
context window — The maximum amount of text a model can consider at once — its working memory for the current conversation or task.
Why it matters
Three few-line changes that cut AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → running costs without touching prompts or switching models: cache prompts, route trivial calls off the expensive model, and stop tool loops running longer than they need to.