Agentic Patterns

From Chatbots to Systems

An LLM is just a text predictor. An Agent is a system that uses an LLM to reason, plan, and execute. Explore the five architectural patterns that bridge this gap.

1. The Definition

Before we build complex systems, we must understand the fundamental shift. A standard Chatbot is a direct pipe. An Agent introduces a feedback loop with the world.

System Topology
Standard Agentic
User
LLM
Output

2. Pattern A: Prompt Chaining

The output of one step becomes the input of the next. This allows for checkpoints where you (or the system) can inspect and modify intermediate states.

Context: Trip Planner Idle

3. Pattern B: Routing

The LLM acts as a traffic controller, classifying intent to send the request to the specialized downstream workflow.

Context: Support Ticket Router
Refunds
0%
Tech Support
0%
General
0%

4. Pattern C: Parallelization

Running tasks concurrently reduces latency. Useful for processing large documents or generating multiple distinct perspectives at once.

Context: Document Analysis
Sequential Parallel
Section 1 Analysis
Section 2 Analysis
Section 3 Analysis

Total Time: 0s

5. Pattern D: Orchestrator-Worker

A central "Brain" breaks down a high-level goal into tasks and assigns them to workers. It can adapt the plan if a worker fails.

Context: Coding Agent

Orchestrator Plan

  • Waiting to plan...

Worker Execution

Idle

6. Pattern E: Evaluator-Optimizer

The "Quality Loop". One LLM generates, another grades. If the grade is below the threshold, it sends feedback to the generator to try again.

Context: Poem Writer Loops: 0
Current Draft:
Waiting to start...
Score
-
Logic:
while (score < threshold) {
  feedback = evaluate(draft);
  draft = improve(draft, feedback);
}