5 patterns
Agent Loops
One model chooses its next action, observes the result and loops, sometimes critiquing itself or learning across attempts.
Patterns in Agent Loops
Augmented LLM
Agent Loops · 6 nodes · 3 LLM calls · 2 scenarios
One LLM call that can use tools, retrieval and memory; every other pattern is built from this.
ReAct (Autonomous Agent)
Agent Loops · 5 nodes · 4 LLM calls · 2 scenarios
Alternate Thought, Action (tool call) and Observation until the model decides it is done.
CodeAct
Agent Loops · 6 nodes · 2 LLM calls · loop · parallel · 2 scenarios
The agent acts by writing code. One snippet can call many tools, loop and filter, and only its printed output comes back to the model.
CRITIC
Agent Loops · 6 nodes · 4 LLM calls · loop · branch · 2 scenarios
The model drafts an answer, checks its own claims with tools such as search or code, and revises from the evidence they return.
Reflexion
Agent Loops · 6 nodes · 3 LLM calls · loop · branch · 1 scenario
After a failed attempt, the agent writes a lesson in plain language to memory and tries again with that lesson in context.