Home · Blog · Agents
Explainer · Agents

An AI agent is a loop. A graph is a loop with a map.

The word “agent” carries a lot of mystique it has not earned. Underneath every one of them is four lines of control flow. Once you can see the loop, you can see what actually matters — and it is none of the things in the demo.

12 SEP 2026 · 8 MIN READ · OPPERMIND PTY LTD
TL;DR. An agent is: look at the state, decide an action, take it, check the result, repeat until done. That is the whole thing. Tools, memory, planning and reflection are attachments to one of those four steps. A “graph” is the same loop with the allowed paths drawn explicitly — it does not make the agent cleverer, it makes it inspectable. What decides whether an agent is safe to run is not the loop; it is the six things you put around it.

Read enough agent marketing and you would think something new had been discovered. Autonomous. Reasoning. Multi-step. Self-correcting. Agentic.

Here is the thing underneath all of it:

while not done:
    state  = observe()
    action = decide(state)
    result = act(action)
    done   = check(result)

That is an agent. Everything you have read about is a modification to one of those lines. If that feels like a let-down, good — the let-down is the point, because once the mystique is gone you can ask sensible questions about the parts that matter.

Where the loop came from

The version of this that made the current wave possible was written down in a 2022 paper called ReAct. Its contribution was to interleave the model’s reasoning with its actions rather than doing all the thinking first. In the authors’ words, “reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information.”

Translate that back to the loop: decide() now produces a short thought and an action, and observe() reads the world back in after each one. The reason this mattered is that it gave the model a way to notice it was wrong mid-task and change course, instead of confidently finishing a plan built on a bad first step.

A year later, Reflexion added a memory between attempts: agents that “verbally reflect on task feedback signals, then maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials.” In loop terms: when check() fails, write a note about why, and feed the note into the next decide(). Still the same loop. One more attachment.

The graph is the loop with a map

The next thing vendors sell you is a graph. Nodes, edges, state machines, a diagram with arrows. It sounds like an upgrade from the loop.

It is the loop. The difference is that decide() is no longer free to pick any action from anywhere; it can only move along edges you have drawn in advance. Node A can go to B or C. Node C can retry itself twice and then must go to D. D is a human. That is a graph.

Why bother, if it is the same thing? Because a loop where the model can do anything is very hard to reason about, and a loop where the paths are explicit is not. You can test each edge. You can put a gate on a specific transition. You can look at the diagram and say “there is no path from send the invoice back to edit the amount” and know it is true. A graph does not make the agent smarter. It makes it legible, and legibility is what lets you trust it with something that matters.

So the honest framing is: the loop is the engine, the graph is the map, and the map only matters once the destinations have consequences.

What it is called What it actually is Which line of the loop it changes
Tool use / function callingActions that reach outside the modelact()
PlanningDeciding several steps ahead, then re-decidingdecide()
MemoryCarrying results from earlier passes into later onesobserve()
Reflection / self-correctionWriting down why a check failed and reading it next timecheck()decide()
Multi-agentOne loop whose action is “run another loop”act()
Graph / state machineThe loop with allowed transitions drawn explicitlyConstrains decide()
WorkerThe loop on a schedule, with the six controls belowEverything around it

The six things that actually matter

None of these are inside the loop. All of them decide whether you can run it while you are in a meeting.

1. A hard budget

A loop with no exit condition runs forever, and a loop that pays per pass runs forever expensively. Set a maximum number of iterations and a maximum spend, and treat hitting either as a failure to investigate, not a limit to raise.

2. A definition of done

check() is the line most people leave vague. “Until the task is complete” is not a stop condition. “Until the file exists, opens, and passes these three assertions” is. If you cannot write the done-test as something a script could evaluate, the agent cannot know when to stop, and it will either quit early or never.

3. A gate before anything irreversible

Sending, paying, deleting, publishing, signing. Draw the graph, find every edge that cannot be undone, and put a human on it. Everything before the gate can be fully autonomous. Everything after it is a person’s decision with the agent’s work attached.

4. State as artefacts, not chat

If the only record of what the agent did is a transcript, you cannot audit it, resume it, or hand it to somebody else. Each pass should leave a real thing behind — a document, a row, a file — so the state of the work is the work, not a story about the work.

5. A log of every action and why

Not for compliance theatre. For the Tuesday morning when a run went wrong and you need to know whether the spec was bad, the input was bad, or the check was bad. Those need different fixes, and without the log you will guess.

6. A stop button that works

A human must be able to halt the loop between passes, at any time, without negotiating with it. This sounds obvious. Ask a vendor to demonstrate it before you believe it.

What this means when you are buying one

Once you know the shape, the vendor conversation gets short. What stops it? What does one pass cost? What does it leave behind? What happens when a step fails? Which transitions have a gate? Show me the stop button.

A product that answers all six cleanly is selling you a worker. A product that answers with a demo is selling you a loop and letting you find out what is around it later.

The plain-English version of what a worker does on a real job — and the privacy obligations that come with running one in Australia — is in what an autonomous AI worker actually does. If you are commissioning one to be built, question ten in the questions to ask before you sign is this article compressed into a paragraph.

Where Oppermind fits

Oppermind’s Autonomous Workers are this loop with the six controls built in rather than bolted on: scheduled or event-triggered runs, a dry-run preview before anything executes, human approval gates on the transitions you mark, every step persisted as a real artefact in a real editor, and a run log you can read afterwards. The Workspace Agent modes are the same loop in a single conversation, delivering documents, sheets, decks and designs straight into their editors instead of as text.

If you want to build one rather than read about one, the Academy’s build your first AI worker is eighteen minutes and ends with a worker that runs. Choosing a chat mode and reasoning depth is the shorter piece on when a single pass is enough and when you want the loop.

Free with no card, then Starter A$9.95, Pro A$29.99 and Pro Plus A$59.99 a month. Unlimited documents, spreadsheets, decks and designs on every plan.

Whatever you’re here to make, make more of it.

The honest caveat

Knowing that an agent is a loop does not make the hard parts easy. Writing a done-test that is actually testable is difficult. Deciding which transitions deserve a gate requires understanding the work. And the model inside decide() still makes mistakes at a rate that is fine for a draft and unacceptable for a payment.

What the framing does is stop you being impressed by the wrong things. The loop is table stakes. The graph is a diagram. The six controls are the product.

Frequently asked questions

What is an AI agent, in one sentence?

A loop: look at the current state, decide the next action, take it, check what happened, and go again until a stop condition is met. Everything else — tools, memory, planning, reflection — is something you attach to one of those four steps.

What is the difference between an agent and a chatbot?

A chatbot runs the loop once: one input, one output, and it waits for you. An agent keeps looping without you, taking actions between turns and reading the results. The model may be identical; the difference is who decides when to stop.

What is an agent graph and why do people use one?

A graph is the same loop with its possible paths drawn explicitly: named states, allowed transitions, and the conditions for each. It does not make the agent smarter. It makes the loop inspectable, testable and easier to put controls on, which is why it matters more as the stakes rise.

What actually makes an agent safe to run unattended?

Six things around the loop, not inside it: a hard budget on iterations and spend, a clear definition of done, an approval gate before anything irreversible, state persisted as real artefacts rather than chat history, a log of every action and why, and a way for a human to stop it. Missing any one is how agents get switched off after the first bad week.

Do I need to understand this to use an AI worker?

Not to use one, but it helps to buy one. Once you know an agent is a loop, the questions to ask a vendor become obvious: what stops it, what it costs per pass, what it leaves behind, and what happens when a step fails. A product that cannot answer those is a demo.

Sources

  1. Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan and Yuan Cao — ReAct: Synergizing Reasoning and Acting in Language Models (arXiv:2210.03629, submitted 6 October 2022, revised 10 March 2023): “reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information.” Accessed 12 September 2026.
  2. Noah Shinn, Federico Cassano, Edward Berman, Ashwin Gopinath, Karthik Narasimhan and Shunyu Yao — Reflexion: Language Agents with Verbal Reinforcement Learning (arXiv:2303.11366, submitted 20 March 2023, revised 10 October 2023): agents “verbally reflect on task feedback signals, then maintain their own reflective text in an episodic memory buffer to induce better decision-making in subsequent trials.” Accessed 12 September 2026.

This article is general technical explanation, not advice, and does not take account of your circumstances. The code shown is illustrative pseudocode. Third-party research is cited with its date and is the work of its authors. Oppermind platform prices are current as at 12 September 2026, are in Australian dollars, and are subject to the plan terms at checkout.

The loop is free. The controls are the product.

Autonomous Workers with dry runs, approval gates and a real artefact at every step — included in every plan.