<aside>
🦥
Sources
ReAct: Synergizing Reasoning and Acting
Chain-of-Thought Prompting – Nextra
Plan-and-Execute Agents – LangChain
https://www.promptingguide.ai/techniques/tot
What is a DAG?
</aside>
🦥 TL;DR
<aside>
🦥
An architecture is just the shape of how an agent thinks and acts. Same LLM, different wiring = totally different behavior.
Golden rule: pick the simplest architecture that solves your problem. Most real agents are just a ReAct loop with good tools.
</aside>
1. ReAct Agents (Reason + Act)
<aside>
🦥
- The idea: loop through Thought → Action → Observation until the task is done.
- Flow: think about what to do → call a tool → read the result → think again → repeat.
- Good for: general-purpose tool use (web search, calculators, APIs). This is the default for most agents.
- Watch out: it can loop forever or get stuck, so always set a max-step limit.
</aside>
2. CoT Agents (Chain of Thought)
<aside>
🦥
- The idea: make the model think step-by-step before answering instead of blurting out a final answer.
- Flow: "Let's reason through this..." → intermediate steps → final answer.
- Good for: math, logic, and multi-step reasoning. Often combined with ReAct (think, then act).
- Watch out: more reasoning = more tokens = more cost. Pure CoT has no tools, so it can still be confidently wrong.
</aside>
3. RAG Agents (Retrieval-Augmented Generation)
<aside>
🦥
- The idea: look it up before you answer. The agent retrieves relevant documents, then reasons over them.
- Flow: search a knowledge base → pull the most relevant chunks → generate an answer grounded in them.
- Good for: Q&A over private/company data, docs, and anything that changes often.
- Watch out: garbage retrieval = garbage answers. Your search quality matters more than the model.
- 👉 See the dedicated What is RAG? note for the deep dive.
</aside>
4. Planner–Executor (Plan-and-Execute)
<aside>
🦥
- The idea: one part makes a full plan up front, another part executes each step.
- Flow: Planner writes steps 1–5 → Executor does step 1, step 2... → (optionally) re-plan if things change.
- Good for: complex, multi-step tasks. Often cheaper/faster because the expensive "planning" model is only called once.
- Watch out: a rigid plan breaks when reality changes mid-task, so add a re-planning step for robustness.
</aside>
5. DAG Agents (Directed Acyclic Graph)
<aside>
🦥
- The idea: define the workflow as a graph of steps with clear dependencies, decided ahead of time.
- Flow: Step A → (B and C run in parallel) → D. No cycles, so it always terminates.
- Good for: predictable, repeatable pipelines where you want control, parallelism, and auditability (this is the LangGraph mindset).
- Watch out: less flexible: if you don't know the steps in advance, a ReAct loop fits better.
</aside>
6. Tree-of-Thought Agents (ToT)
<aside>
🦥
- The idea: explore multiple reasoning branches, evaluate them, and keep the best path (like a chess player weighing options).
- Flow: generate several possible next thoughts → score them → expand the promising ones → backtrack if needed.
- Good for: puzzles, planning, and search problems with many possible solutions.
- Watch out: expensive, you're running the model many times. Overkill for everyday tasks.
</aside>
How to Choose (cheat sheet)
| If you want to… |
Reach for |
| Build a normal tool-using agent |
ReAct |
| Answer questions over your own data |
RAG |
| Handle a long, complex multi-step task |
Planner–Executor |
| Run a predictable, auditable pipeline |
DAG |
| Solve a puzzle with many possible paths |
Tree-of-Thought |
| Just improve raw reasoning quality |
Chain-of-Thought (add it to any of the above) |