Context Duplication & Recursive Calls: Top Cost Drivers

The primary technical reasons for high multi-agent token costs include context re-billing at every agent handoff and the recursive nature of agent loops. Each agent often resends the full context window, leading to non-linear cost accumulation as information flows between agents and through iterative processes.

The top 3

  1. Agent Loops' O(N²) Cost: Why Bills Explode: Naive AI agent loops re-bill the entire conversation history on every call, causing input token costs to grow quadratically (O(N²)) with each step, leading to a 20-step agent run consuming over 10x the tokens a simple per-step estimate suggests.
  2. Recursive Traps: The Price of Agent Overthinking: AI agents can get trapped in reasoning or retry loops, making redundant calls without progress; for instance, ambiguous tool feedback can cause an agent to make 14 calls instead of 2, leading to substantial token waste and escalating costs over time.
  3. Top 3 Context Duplication Scenarios Driving Up LLM Bills: Key scenarios for context duplication include agents maintaining full, independent conversation histories, redundant data fetching from external sources across multiple agents, and inefficient shared memory designs that force repeated re-ingestion of the same information into each agent's context window.

Sources

Open the full topic