The Evolution of AI Agents: Seven Stages of the Software Loop
From the 1950s to now: how software loops evolved into AI agents. Each stage added one capability the one before it lacked, and only the last one survives the process running it.
By Mark Fussell, co-founder and CPO of Diagrid.
Published · Updated
AI agents are the latest stage in a 70-year evolution of the software loop. Each stage moved control of the loop somewhere new: to the operating system, the kernel, the controller, and now the language model. The agent loop made the next step probabilistic. The final stage, agentic durable execution, makes the loop survive the process running it.

These are stages, not eras. The decades overlap: Unix event loops were maturing while Windows GUIs shipped, and games stayed stateful throughout. The sequence is architectural, not chronological — each stage adds a capability the one before it lacked.
What each stage added
- reactive
- stateful
- asynchronous
- goal-oriented
- probabilistic
- durable
The history of AI agents in seven stages
(Go to chapters)Agentic orchestration vs. agentic durable execution
Agentic orchestration is the coordination of AI agents, tools and model calls toward a goal: which agent acts next, which tool it calls, and what happens with the result. Traditional workflow orchestration assumes the path is known in advance and drawn as a flowchart. Agentic orchestration cannot make that assumption, because a model chooses the next step at runtime.
That difference changes what the runtime has to guarantee. When the path emerges as the agent runs, you cannot recover from a crash by rerunning a known sequence. You need to know which steps already ran, which side effects already happened, and where to resume. That is the guarantee agentic durable execution provides, and it is why Stage 7 exists.
In practice, agentic orchestration decides what happens next and agentic durable execution guarantees it happens exactly once, even across process, container and machine failures. Production agents need both. See how Diagrid approaches AI agent orchestration.
Definitions
- Software loop
- A program structure that keeps running, repeatedly checking for new input or new state and deciding what to do next, instead of executing a fixed sequence once and exiting.
- Message loop (message pump)
- The `while (GetMessage(...))` cycle at the heart of a classic Windows GUI application. It keeps the application alive while the operating system delivers mouse clicks, key presses, resize events, repaint requests, timers and shutdown notifications, and dispatches each into a handler.
- Game loop
- A continuous cycle - process input, update the world, render - that advances on every iteration whether or not the player acts, and carries a model of the world forward from one iteration to the next.
- Event loop
- A cycle in which a process waits for the runtime to report which sources of work are ready, handles those, and returns to waiting. Unix provided `select` then `poll`; Linux added `epoll` in the early 2000s.
- Control loop (reconciliation loop)
- A loop that continuously compares desired state with actual state and acts to close the gap. It has no final step: it is outcome-oriented rather than path-oriented.
- Agent loop
- The cycle at the core of most AI agent frameworks: observe the current context, reason about what to do next, choose an action, execute it, observe the result, update the context, repeat until the goal is judged complete. It is the layer of an AI agent architecture where control actually lives, and it is what people are asking about when they ask how do AI agents work.
- Stateful AI agents
- Agents whose behaviour depends on context accumulated across iterations rather than on a single prompt. AI agent state management is the operational half of that: deciding where the accumulated context lives, and whether it survives the process holding it.
- Durable execution
- An execution model in which the logical progress of a task is persisted outside the process running it, so the task can be suspended, recovered and continued - correctly, without repeating completed side effects - after a crash, restart or redeployment. A durable execution engine is the runtime that provides it, and the AI agent execution guarantees it offers - deterministic replay, exactly-once handling of side effects, crash recovery that resumes rather than restarts - are what distinguish it from persistence alone.
- Agentic durable execution
- Durable execution applied to the dynamic, probabilistic execution model of AI agents, where the path through the work emerges as the agent reasons, acts, waits, retries and changes direction.
- Checkpointing
- Periodically persisting state so it can be reloaded. Necessary but not sufficient: checkpointing alone does not provide failure detection, and does not guarantee correct recovery around external side effects or ambiguous failure boundaries.
Frequently asked questions
All seven chapters
- Chapter 1Before the Loop: When Programs Were Mostly LinearA deterministic, readable order of operations
- Chapter 2The Windows Message Loop: How Applications Became ReactiveLong-lived, reactive processes
- Chapter 3The Game Loop: When State Started Carrying ForwardContinuously evolving state, carried forward
- Chapter 4The Linux Event Loop: Making the Loop About Waiting for WorkEfficient waiting across many sources of work
- Chapter 5The Kubernetes Control Loop Changed the QuestionContinuous reconciliation toward an outcome
- Chapter 6The Emergence of the Agent LoopA dynamic, probabilistic next action
- Chapter 7The Loop Escapes the Process: Agentic Durable ExecutionLogical execution that outlives process, container and machine
Related reading
ArticleWhat is agentic durable execution?The definition, and how it differs from durable execution for workflows.Read article
ArticleCheckpoints are not durable executionWhy LangGraph, CrewAI, Google ADK and others fall short in production.Read article
ArticleFrom deterministic to agentic: durable AI workflowsA step-by-step example with Dapr.Read article- GuideAI agent orchestration with DiagridRun agents as durable, verifiable workflows.Read guide