🧭 Roadmap

02. Agent architectures

Why architecture matters

Once you understand what an agent is, the next question is:

How is the system organized internally?

Different agent architectures exist because different tasks need different control styles.

Common patterns

1. Single-step with tools

This is the simplest form.

User request
   ↓
LLM
   ↓
Maybe call one tool
   ↓
Return answer

Use this when tasks are small and mostly predictable.

2. ReAct

ReAct means:

  • Reason
  • Act

The agent alternates between thinking and using tools.

Thought → Action → Observation → Thought → Action → Final answer

This is one of the most important agent patterns.

Use it when the task needs search, iterative checking, or recovery from uncertainty.

3. Plan-and-execute

Here the system first makes a plan, then executes it step by step.

Goal
  ↓
Create plan
  ↓
Execute step 1
Execute step 2
Execute step 3
  ↓
Finish

Use it when the task is long and benefits from decomposition.

4. Router architecture

A top-level controller decides which sub-system or specialist should handle the task.

Example:

  • math questions → math agent
  • research tasks → search agent
  • coding tasks → code agent

This is useful when one general agent would become too messy.

5. Multi-agent architecture

Multiple agents collaborate.

Examples:

  • planner agent
  • researcher agent
  • critic agent
  • executor agent

This can improve modularity, but it also adds latency, complexity, and coordination overhead.

Architecture comparison

Architecture Best for Tradeoff
Single-step tools Fast, simple tasks Limited flexibility
ReAct Dynamic tool use Can loop too much
Plan-and-execute Long tasks Planning may be brittle
Router Specialized handling Needs routing quality
Multi-agent Complex collaboration Harder to debug

Practical advice

Start simple.

A good progression is:

  1. single-step tool use
  2. ReAct
  3. plan-and-execute
  4. multi-agent only if clearly needed

Many systems become over-engineered because they use multi-agent design too early.

Next

Continue to Tool calling.