What are AI Agents, Really? › The Core Metaphor: Agents Are State Machines
Michael BrenndoerferMay 27, 20251 min read
What are AI Agents, Really? › The Core Metaphor: Agents Are State MachinesOne section · Sections in this article2 / 13 ↓
Sections in this article13
To understand agents, it helps to first understand the concept of a state machine.
## What is a State Machine?
A state machine is a system that:
- Is always in one of a finite number of states
- Moves between states based on inputs
- Executes logic within each state
## Deterministic vs. Non-Deterministic
- Deterministic: A given state and input always leads to exactly one next state, similar to a vending machine.
- Non-Deterministic: A given state and input can lead to multiple possible next states, like a choose-your-own-adventure game.
Agents fall into the second category. They are non-deterministic state machines, because LLMs can produce different results for the same input. This variability adds flexibility, creativity, and adaptability.
<Figure
src="/images/content/Example_of_a_Turing_machine.svg"
alt="State machine of the Nondeterministic Turing machine"
caption="State machine of the Nondeterministic Turing machine"
invertOnDark={true}
/>
If you want to understand why LLMs are non-deterministic, see [this article](/writing/why-llms-are-not-deterministic).