The beauty is in the simplicity:
1. One loop - while (true)
2. One step at a time - stopWhen: stepCountIs(1)
3. One decision - "Did LLM make tool calls? → continue : exit"
4. Message history accumulates tool results automatically
5. LLM sees everything from previous iterations
This creates emergent behavior where the LLM can:
- Try something
- See if it worked
- Try again if it failed
- Keep iterating until success
- All without explicit retry logic!
The summary is
The beauty is in the simplicity: 1. One loop - while (true) 2. One step at a time - stopWhen: stepCountIs(1) 3. One decision - "Did LLM make tool calls? → continue : exit" 4. Message history accumulates tool results automatically 5. LLM sees everything from previous iterations This creates emergent behavior where the LLM can: - Try something - See if it worked - Try again if it failed - Keep iterating until success - All without explicit retry logic!