Agent loop debugger
Step through a real tool-calling episode, watch the context fill, and drag reliability to see p^n collapse.
- USER GOAL
Goal: “Which of our 3 suppliers delivered fastest last month, on average?”
Every observation is appended — the loop pays for its own history on every subsequent model call.
Task success ≈ p^n: at 95% per step, a 1-step run completes 95% of the time — and a 12-step run only 54%.
The loop is the whole mechanism
An agent is a language model in a cycle: the model emits a structured tool call, a runtime executes it against a real system, and the observation is appended to the context for the next decision. That repeats until the model produces a final answer. Every hosted agent product is this loop with different tools, prompts and stopping rules.
The context tape in the instrument shows the cost that is easy to miss. Each observation is appended, so every subsequent model call re-reads the entire history. A long episode does not just take more steps — each step is more expensive than the last.
Why long tasks fail
If each step succeeds with probability p, an n-step task completes with probability of roughly p to the power n. At 95% per step a twelve-step task finishes barely half the time. Drag the reliability slider and the curve collapses faster than intuition suggests.
That arithmetic is the argument for pushing control flow out of the model. Explicit orchestration — state machines, retries at known checkpoints, evaluation on trajectories rather than final answers — shortens the chain the model is responsible for, which is the only lever that moves p^n meaningfully.