Which Context Data Types Drain AI Agents Most?

Large language model (LLM) prompts with extensive context windows, historical conversation logs, and complex environmental state data are the primary culprits for costly re-transmission. System prompts alone, if duplicated across turns, can account for significant token consumption, with one example showing 80,000 tokens spent on repetition over 20 turns.

The top 3

  1. Costliest Context: Massive Token Windows: The sheer volume of tokens in large context windows, especially with premium models, is the primary cost driver; filling a 1M-token input can cost up to $10.00 on advanced LLMs like Claude Fable 5, a 71x spread compared to cheaper alternatives.
  2. Structured Data's Token Tax: JSON & Code: Structured data types such as JSON objects and code snippets consume a disproportionately high number of tokens due to granular tokenization (e.g., every brace, bracket, and indentation), making them less efficient and more costly than natural language prose in an AI agent's context window.
  3. Verbose Logs' Hidden Cost: Redundant Security Data: Highly detailed and often repetitive security logs (e.g., system events, network traffic, debugging output) create excessive tokens, forcing AI agents to process vast amounts of low-signal information. This significantly increases input costs and latency, as every token is billed, even if it's redundant.

Sources

Open the full topic