Agent Patterns
Agents are systems where the LLM controls the flow. The developer provides tools and constraints; the LLM decides what to do.
When to use agents instead of workflows:
- The required steps are unknown at design time
- The task needs to react to unexpected observations
- You need open-ended tool use and dynamic decision-making
- The workflow conditional logic has become too complex to hardcode
Agentic RAG
RAG where the agent plans retrievals, decomposes queries, routes across sources, reflects on sufficiency, and enforces citation-bound answers.
Event-Driven
Agents triggered by queue or stream events rather than HTTP requests.
Long-Horizon
Multi-session agent tasks that span hours to weeks; checkpoint-and-resume across crashes, deploys, and external waits.
Multi-Agent
Supervisor-worker delegation across multiple autonomous agents.
Plan & Execute
LLM creates a full plan upfront, then executes each step sequentially.
RAG
Retrieval-augmented generation: retrieve relevant context before generating.
ReAct
Reason-act loop: the LLM reasons, calls a tool, observes, and repeats until done.
Reflection
LLM critiques its own output and self-improves through structured feedback.
Routing
Intent classification dispatches inputs to specialized handlers.
Saga
Long-running, multi-step business processes that need compensation when an intermediate step fails.