Let’s assume we don’t know anything about:
We just know how to call an LLM.
Most beginners build AI systems like this:
async function runAgent() {
const plan = await planner()
const data = await fetchData(plan)
const result = await analyze(data)
return result
}
Or they use a while loop for agents.
Everything runs inside one function.
When it finishes → done.
If it crashes → everything is lost.
Suppose: