5 Agentic Design Patterns
Just as software engineering has "Singleton" and "Factory", Agent Engineering has patterns.
1. The ReAct Pattern
Reason + Act. The agent thinks, decides on an action, executes it, and observes the result. This is the default loop for most agents.
2. The Map-Reduce Pattern
Great for analyzing large documents.
- Map: 10 agents read 10 pages each and summarize.
- Reduce: 1 agent reads the 10 summaries and writes a final report.
3. The Reflector Pattern
An agent generates a draft. A second agent (Reflector) critiques it. The first agent revises.
4. The Router Pattern
A lightweight classifier agent decides which expert tool to call. "Is this a math problem or a history question?"
5. The Dynamic Memory Pattern
The agent queries its long-term memory store before acting, updating its context window with relevant facts.
Master these, and you master agents.