Loops all the way down
Yesterday, I explained how an LLM simply guesses one token at a time.
So what then are “AI agents” or “agent swarms” or even “agent civilisations” (that one was the term-du-jour last week)?
An agent is just computer code. Basically, just another loop written by a human that keeps asking an LLM the same question: “here’s the situation so far, what do I do next?” It then takes whatever the LLM suggested and does it: run a command, call an API, or use some other tool it’s been wired up to touch. It then feeds the result back to the LLM and asks the “what do I do next?” question again. Ask, do something, repeat; that’s it. That’s what an “autonomous AI agent” is. It’s the same old chat with tools attached at one end. Plausible texts become plausible actions – a chatbot with a crowbar.
As with a chat session, there’s no memory; every single prompt includes the entire history so far. After a while, the prompt gets gigantic and the model’s answers get worse. At some point, it even gets too big to fit in memory (or “context” in AI-speak).
The fix the AI boffins came up with is to split things out. Instead of one enormous conversation, they spin up a smaller loop with a single, narrowly defined job and have it report its one simple result back to the main loop. Do that enough, and you get lots of little loops running side by side, blissfully unaware of what their other little brother and sister loops are up to.
That’s what they’re calling a “swarm”. It’s no sci-fi hive mind or emergent brain; it’s just task splitting to save memory.
When you read breathless coverage about agent swarms coordinating, it’s just a big stack of separate prompt loops, each one guessing the next token, unaware of the other loops in the room, and reporting back to the same, single LLM thread.
Colin
PS: Yes, I’m massively simplifying yet again. Real agent frameworks have retries, error handling, tool schemas, and more jargon than a McKinsey PowerPoint.