Agentic Architectures
Agentic Loop Cost Simulator
Model the $O(N^2)$ quadratic cost of compounding context. As your agents think, call tools, and observe outcomes, every turn feeds previous history back into the LLM context.
Simulation Variables
Adjust sliders to re-calculate compounding costs in real time.
Number of Tool-Call/Thought cycles in the execution graph.
Tokens consumed describing function declarations to the API.
Total tokens of documentation injected in the first step.
API/Database output tokens returned to the agent context.
Single Session Cost $0.048 100% simulated
Daily Operations $241.25 At configured volume
Monthly Run-Rate $7,237.50 Projected 30-day billing
Compounding Context Growth ($O(N^2)$)
Input Tokens (Compounding) Output Tokens (Linear)
💡 The Mathematics of Agent Loops
Unlike standard single-turn completion calls, an agent loop runs iteratively. On each loop step, the agent's past thought outputs and tool observations are concatenated back into the model context. Consequently, the input tokens grow linearly by step, leading to a quadratic $O(N^2)$ growth in total input tokens. This explains why running a 5-step agent loop is up to 5–10× more expensive than a single-turn chat completion.