Do you know that LLM it’s self can’t do the complex task such as building application or writing the article with good SEO with hot topics?. LLM is a type of artificial intelligence program designed to understand, process and generate human language. Instead of truly thinking like human, LLM works through advanced math and statistical prediction.
That’s why when utilize AI to solve the complex task we need pattern for production agent system.
I will describe about five common core patterns of production agent system
ReAct / Tool Use
ReAct stands for Reasoning and Action. This pattern alternates between reasoning about what to do and which tools to use, observe the result then reasoning till the final response.

When to use it:
- The task need information or actions the model doesn’t have such as live data (search the web), private data or calculations.
- Each step result changes what next step should be
Planning
This pattern required Agent thinking about the whole job and decomposes a high level goal into an ordered list of concrete steps. An executor completes the step in order, feeding the result forward. When the step is fails or reveals new information, the plan should be revised. Pasted image

When to use it :
The tasks are complex and decomposable and you want to review the plan first before execution
Reflection / Critic
Reflections add a review step between generation and delivery. A generator produces a draft, A critic evaluates it against explicit criteria. The draft should be rewritten until quality checks pass.

When to use it:
Output quality matters more than latency for example for code review, content editing and report writing.
Routing
Routing classifies the incoming request and send to the specific handler built for that request. This patterns is how you keep each specialist simple while the system handles a wide range of input.

When to use it:
- Input fall into distinct category that need different prompts, tools or models.
- You need the cheap models for easy input request, by this model routing is the most favorite one for saving
Multi Agent / Supervisor Worker
Supervisor agents own the overall tasks. It breaks task into pieces, delegates each task to specialist worker agents. They workers run parallel and combine the result. Each worker agent has it’s own tools and loops. The supervisor decides, delegates and synthesizes.

When to use it:
- The task is too large for one context window
- Sub task has different tools or different models
- Parallelism models : instead of one agent work 3 task why not make 3 agents work each task parallel for velocity
At this point, you can combine the pattern for your specific production agent needs.

