Agent Architecture Patterns: ReAct, Plan-and-Execute, and Multi-Agent Systems
ReAct, Plan-and-Execute, and Multi-Agent Systems organize agent reasoning and execution in different ways. How each works, where each breaks, and how to combine them in production without unnecessary complexity.
Table of Contents
- 1. Introduction
- 2. Why Agent Architecture Matters
- 3. ReAct: Reasoning and Acting in an Iterative Loop
- 4. Plan-and-Execute: Separating Planning from Execution
- 5. Multi-Agent Systems: Dividing Work Across Specialized Agents
- 6. Comparing the Three Architectures
- 7. Hybrid Agent Architectures
- 8. Agent Coordination and Communication
- 9. Failure Modes and Architectural Trade-offs
- 10. Evaluating Agent Architecture
- 11. Building an Agent Architecture for Production
- 12. A Practical Decision Framework
- 13. Summary
1. Introduction
In the previous article, we introduced LLM agents and tool calling.
We established that an agent is more than an LLM with access to external functions. It is an execution system that combines model-based decisions, tools, state management, policies, and a controlled runtime.
But once an application supports multiple tools and dynamic execution, another architectural question appears:
How should an agent organize its reasoning and actions?
Consider our contract operations assistant.
A user asks:
"Investigate this contract, identify potential compliance risks, compare its clauses against company policies, and prepare a review report."
The system may need to:
- Retrieve the contract.
- Extract relevant clauses.
- Search for applicable policies.
- Compare clauses against those policies.
- Identify missing evidence.
- Retrieve additional information.
- Generate a report.
- Request human review if necessary.
There are several ways to organize this process.
One agent can repeatedly decide what to do next. Another architecture can first create a plan and then execute it. A more complex system can delegate individual responsibilities to specialized agents.
These approaches are commonly associated with three architectural patterns:
- ReAct: Reasoning and acting through an iterative loop.
- Plan-and-Execute: Creating a plan before carrying out the steps.
- Multi-Agent Systems: Distributing responsibilities across multiple agents.
They are not interchangeable, and none is universally superior.
The right choice depends on how predictable the task is, how much autonomy is required, how expensive model calls are, and how important execution control is.
2. Why Agent Architecture Matters
2.1. The same task can produce different execution strategies
Imagine that the system receives the same contract review request.
A ReAct architecture might execute:
Retrieve contract
→ Search relevant policies
→ Compare clauses
→ Discover missing information
→ Retrieve additional evidence
→ Generate reportA Plan-and-Execute architecture might first produce:
Plan:
1. Retrieve contract metadata
2. Extract relevant clauses
3. Retrieve applicable policies
4. Compare clauses against policies
5. Identify unresolved risks
6. Generate reportA Multi-Agent architecture might delegate:
Contract Review Coordinator
├── Contract Analysis Agent
├── Policy Research Agent
└── Compliance Assessment AgentAll three can solve the same task.
However, they differ in:
- How decisions are made.
- When the next action is selected.
- How execution state is maintained.
- How errors are recovered.
- How much parallelism is possible.
- How difficult the system is to debug.
- How much coordination overhead is introduced.
2.2. Architecture is a control problem
An agent architecture determines how much control belongs to the model and how much belongs to application logic.
At one end, a deterministic workflow controls nearly every step.
At the other end, an autonomous agent dynamically chooses its next actions.
Between these extremes are architectures that combine predefined plans, dynamic decisions, specialized agents, and deterministic execution.
A useful way to think about agent architecture is:
flowchart LR
A[Deterministic Workflow] --> B[Bounded Agent Step]
B --> C[ReAct Agent]
C --> D[Plan-and-Execute]
D --> E[Multi-Agent System]This is not a maturity scale.
Moving to the right does not necessarily mean building a better system. It usually means introducing more flexibility and more coordination complexity.
3. ReAct: Reasoning and Acting in an Iterative Loop
3.1. The core idea
ReAct, introduced in ReAct: Synergizing Reasoning and Acting in Language Models (Yao et al., 2022), combines reasoning and action in an iterative process. The original paper used an explicit Thought/Action/Observation text format; modern native tool calling implements the same loop without it.
The model receives the current task and available information, decides what action to take, observes the result, and then decides what to do next.
The cycle is:
- Reason about the current state.
- Select an action.
- Execute the action.
- Observe the result.
- Continue or finish.
flowchart TD
A[Task] --> B[Model Decision]
B --> C{Action}
C -->|Tool Call| D[Execute Tool]
D --> E[Observation]
E --> B
C -->|Final Answer| F[Complete]The key characteristic is that the next action is selected using the latest observation.
The system does not need to know the complete execution path in advance.
3.2. Example: Contract investigation
The user asks:
"Does contract CTR-1024 have any compliance risks?"
A ReAct agent might proceed as follows:
Iteration 1
Decision:
Retrieve the contract.
Action:
get_contract("CTR-1024")
Observation:
The contract contains 18 clauses.
The renewal date is 2027-02-15.Iteration 2
Decision:
The agent needs the applicable internal policies.
Action:
search_policy("contract renewal and termination")
Observation:
Two relevant policies were found.Iteration 3
Decision:
Compare the termination clause against the relevant policy.
Action:
compare_clause(
contract_id = "CTR-1024",
clause = "Termination clause",
policy_ids = [...]
)
Observation:
The termination notice period is shorter
than the internal policy requirement.Iteration 4
Decision:
The agent has enough evidence to report the issue.
Action:
Return the final assessment.The important part is that the agent can change its next action based on the result of the previous operation.
If the policy search returns no results, the agent might search another policy category or escalate the issue.
3.3. A simplified ReAct runtime
The following example illustrates the control loop. It assumes a normalized model adapter and tool executor.
interface AgentMessage {
role: "user" | "assistant" | "tool";
content: string;
toolCallId?: string;
toolCalls?: ModelDecision["toolCalls"];
}
interface ModelDecision {
type: "final" | "tool_calls";
content?: string;
toolCalls?: Array<{
id: string;
name: string;
arguments: unknown;
}>;
}
interface ReActDependencies {
decide(
messages: AgentMessage[],
): Promise<ModelDecision>;
executeTool(
call: {
id: string;
name: string;
arguments: unknown;
},
): Promise<string>;
}
async function runReAct(
task: string,
dependencies: ReActDependencies,
maxIterations: number,
): Promise<string> {
const messages: AgentMessage[] = [
{
role: "user",
content: task,
},
];
for (
let iteration = 0;
iteration < maxIterations;
iteration++
) {
const decision = await dependencies.decide(messages);
if (decision.type === "final") {
return decision.content ?? "";
}
messages.push({
role: "assistant",
content: decision.content ?? "",
toolCalls: decision.toolCalls,
});
for (const call of decision.toolCalls ?? []) {
const result = await dependencies.executeTool(call);
messages.push({
role: "tool",
toolCallId: call.id,
content: result,
});
}
}
throw new Error("Agent iteration limit reached");
}This example deliberately omits provider-specific message formats, authorization, schema validation, persistence, and approval handling. Those responsibilities belong to the production runtime discussed in the previous article.
3.4. Advantages
ReAct is useful when:
- The task is exploratory.
- The next step depends heavily on previous observations.
- The required tools are relatively easy to select.
- The task is not too long.
- The system needs to react to unexpected results.
It is particularly useful for investigation tasks, where the system cannot know in advance exactly what information will be needed.
3.5. Limitations
The main weakness is that decisions are made repeatedly.
This can introduce:
- More model calls.
- Higher latency.
- Increased token consumption.
- Repeated tool selection.
- Loops that revisit the same information.
- Difficulty predicting the complete execution path.
For a long task, the model may spend many iterations deciding what to do next.
This is not necessarily a reasoning failure. It is partly a consequence of the architecture.
ReAct is therefore most appropriate when dynamic adaptation is more valuable than predictable execution.
4. Plan-and-Execute: Separating Planning from Execution
4.1. The core idea
Plan-and-Execute separates task decomposition from task execution.
Instead of deciding every next action independently, the model first creates a plan.
The runtime then executes the plan, potentially using deterministic application logic or another model call for individual steps.
flowchart TD
A[User Task] --> B[Planner]
B --> C[Execution Plan]
C --> D[Plan Validator]
D --> E[Executor]
E --> F[Collect Results]
F --> G{Plan Complete?}
G -->|Yes| H[Final Response]
G -->|No| I[Replanner]
I --> EThe plan provides an explicit representation of the intended execution path.
4.2. Example: Contract review plan
The model receives:
"Review contract CTR-1024 for compliance risks."
It generates:
{
"goal": "Identify compliance risks in CTR-1024",
"steps": [
{
"id": "step_1",
"tool": "get_contract",
"arguments": { "contract_id": "CTR-1024" },
"description": "Retrieve contract metadata and clauses"
},
{
"id": "step_2",
"tool": "search_policy",
"arguments": { "query": "renewal, termination, liability" },
"description": "Find policies applicable to the contract"
},
{
"id": "step_3",
"tool": "compare_clauses",
"arguments": { "contract_id": "CTR-1024" },
"description": "Compare relevant clauses against policies",
"depends_on": ["step_1", "step_2"]
},
{
"id": "step_4",
"tool": "generate_report",
"arguments": {},
"description": "Create a report from verified findings",
"depends_on": ["step_3"]
}
]
}The runtime validates the plan before execution.
For example:
- Is
get_contractan available tool? - Are all required arguments present?
- Does the user have permission to access the contract?
- Are dependencies valid?
- Does the plan contain an unsupported operation?
- Does the estimated execution fit within the task budget?
The planner can propose a plan, but the application decides whether that plan is executable.
4.3. Represent plans explicitly
A plan should be structured data, not merely a paragraph of instructions.
type PlanStepStatus =
| "pending"
| "running"
| "completed"
| "failed"
| "skipped";
interface PlanStep {
id: string;
toolName: string;
arguments: unknown;
dependsOn: string[];
status: PlanStepStatus;
}
interface ExecutionPlan {
taskId: string;
steps: PlanStep[];
}The runtime can now manage dependencies and execution state independently of the model.
For example, compare_clauses cannot run until both contract retrieval and policy search have completed.
4.4. Planning does not mean blindly following a plan
A common mistake is assuming that once the model generates a plan, the runtime should execute every step exactly as written.
Plans are based on incomplete information.
During execution, the system may discover:
- The contract does not exist.
- The required policy is unavailable.
- A clause is missing.
- An external service is unavailable.
- A previous step produced unexpected data.
The architecture needs a replanning mechanism.
A useful approach is:
- Execute a valid step.
- Record the result.
- Check whether remaining steps are still valid.
- Replan only when new information changes the execution requirements.
This avoids repeatedly regenerating the entire plan after every successful operation.
4.5. Advantages
Plan-and-Execute is useful when:
- Tasks have multiple stages.
- The general execution structure is understandable in advance.
- The system needs progress tracking.
- Some steps can run in parallel.
- Long-running tasks need resumability.
- The execution path should be auditable.
The explicit plan also makes it easier to show users what the system intends to do.
4.6. Limitations
Planning introduces its own overhead.
The model may:
- Create unnecessary steps.
- Omit important dependencies.
- Select an unsuitable tool.
- Generate a plan that becomes invalid during execution.
- Overestimate or underestimate the work.
A plan is not proof that a task can be completed.
It is a proposed execution strategy that must be validated and monitored.
5. Multi-Agent Systems: Dividing Work Across Specialized Agents
5.1. The core idea
A multi-agent system distributes work across multiple agents.
Each agent has a defined responsibility, tool access, context, or specialization.
A coordinator or orchestrator manages the overall task.
For the contract operations assistant:
flowchart TD
U[User Request] --> O[Coordinator Agent]
O --> A[Contract Analysis Agent]
O --> B[Policy Research Agent]
O --> C[Compliance Assessment Agent]
A --> D[Contract Findings]
B --> E[Policy Findings]
D --> C
E --> C
C --> F[Risk Assessment]
F --> O
O --> G[Final Report]The coordinator does not necessarily perform every analysis itself.
It delegates responsibilities and combines the results.
5.2. Why use specialized agents?
A large task may involve several different types of work.
For example:
| Agent | Responsibility | Tools |
|---|---|---|
| Contract Analysis Agent | Extract and analyze clauses | Contract retrieval, document parser |
| Policy Research Agent | Find relevant internal policies | Knowledge base search |
| Compliance Assessment Agent | Evaluate evidence against policies | Comparison and evaluation tools |
| Coordinator Agent | Manage task and consolidate results | Delegation and state management |
This can provide clearer boundaries than one agent with dozens of tools and a large prompt.
Specialized agents can also use different model configurations.
For example:
- A smaller model may handle structured classification.
- A model with stronger reasoning capabilities may handle complex assessments.
- A model with a larger context window may process extensive evidence.
- A cheaper model may summarize intermediate results.
However, model specialization should be based on measured performance, not simply assigning different models to every agent.
5.3. Three common coordination patterns
A. Supervisor pattern
One coordinator delegates work to specialized agents.
flowchart TD
U[Task] --> S[Supervisor]
S --> A[Agent A]
S --> B[Agent B]
S --> C[Agent C]
A --> S
B --> S
C --> S
S --> R[Final Result]This is useful when there is a clear central task owner.
The supervisor can:
- Assign work.
- Track progress.
- Decide whether additional work is required.
- Resolve incomplete results.
- Produce the final response.
The main disadvantage is that the supervisor can become a bottleneck.
B. Handoff pattern
One agent transfers control to another agent when a different capability is required.
flowchart LR
A[General Agent] -->|Legal analysis required| B[Legal Agent]
B -->|Research complete| C[Report Agent]
C --> D[Final Result]This is useful when the task naturally moves between specialized responsibilities.
However, handoffs need explicit contracts.
The receiving agent must know:
- Why control was transferred.
- What information is available.
- What it is expected to produce.
- Whether it can call additional tools.
- When it should return control.
C. Parallel collaboration
Independent agents work simultaneously and return their results to a coordinator.
flowchart TD
A[Coordinator] --> B[Contract Agent]
A --> C[Policy Agent]
A --> D[Historical Review Agent]
B --> E[Aggregator]
C --> E
D --> E
E --> F[Final Assessment]This can reduce latency when tasks are independent.
For example, contract metadata, policy documents, and historical review records may be retrieved concurrently.
However, parallelism is only useful when the work can actually be performed independently.
It also introduces:
- Higher concurrent model usage.
- More complex failure handling.
- Possible conflicting results.
- Aggregation overhead.
- Increased cost.
5.4. Define agent contracts
Agents should communicate through explicit interfaces.
Avoid passing unstructured conversation transcripts as the only communication mechanism.
For example:
interface AgentRequest<TInput> {
taskId: string;
input: TInput;
context: {
tenantId: string;
deadline: string;
};
}
interface AgentResponse<TOutput> {
status: "completed" | "needs_review" | "failed";
output?: TOutput;
evidence: EvidenceReference[];
warnings: string[];
}
interface EvidenceReference {
sourceId: string;
location?: string;
excerpt?: string;
}The exact schema depends on the domain.
For a compliance assessment, the result should include evidence references, not just a natural-language conclusion.
This allows the coordinator to validate and consolidate outputs more reliably.
5.5. Multi-agent systems do not automatically improve quality
Adding agents does not guarantee better reasoning.
A multi-agent system may simply multiply the same mistakes.
For example:
- Agent A retrieves an incorrect clause.
- Agent B uses that clause as evidence.
- Agent C evaluates it against the wrong policy.
- The coordinator combines all three outputs into a confident but incorrect report.
The system has more components, but the underlying evidence is still wrong.
Multi-agent architecture is useful when responsibilities can be meaningfully separated and independently validated.
It is not a substitute for good retrieval, tool design, evaluation, or data quality.
6. Comparing the Three Architectures
The three patterns solve different orchestration problems.
| Dimension | ReAct | Plan-and-Execute | Multi-Agent |
|---|---|---|---|
| Decision strategy | Iterative | Plan first, execute later | Distributed |
| Adaptability | High | Medium to high | High |
| Execution visibility | Iteration-based | Explicit plan | Agent-level |
| Parallel execution | Possible, but not inherent | Natural for independent steps | Natural for independent agents |
| Coordination complexity | Low to medium | Medium | High |
| Model call overhead | Can be high | Planning plus execution | Often highest |
| Failure isolation | Limited | Step-level | Agent-level |
| Debugging | Trace the loop | Inspect plan and steps | Trace inter-agent execution |
| Best fit | Exploration | Structured multi-step tasks | Independent specialized responsibilities |
There is no universally correct choice.
The important question is not which architecture is most advanced.
It is which architecture provides the smallest amount of complexity necessary to solve the problem reliably.
6.1. Latency and cost considerations
Suppose the same task requires:
- Contract retrieval.
- Policy retrieval.
- Clause comparison.
- Report generation.
A ReAct agent may make several sequential model calls.
A Plan-and-Execute system may use one planning call, execute independent retrieval steps in parallel, and use additional model calls for assessment.
A multi-agent system may run several agents concurrently, but each agent may require multiple model calls of its own.
The result depends on:
- Number of model calls.
- Model latency.
- Tool latency.
- Context size.
- Parallelism.
- Retry behavior.
- Aggregation overhead.
The number of agents alone does not tell us which system is faster.
A useful approximation is:
T_total = T_model + T_tools + T_coordination + T_waitingFor sequential operations, tool latencies accumulate.
For independent parallel operations, the execution time is closer to the slowest operation rather than the sum of all operations.
However, this benefit disappears if the system introduces too much coordination or if external services become bottlenecks.
7. Hybrid Agent Architectures
In production, these patterns are often combined.
A system may use a deterministic workflow for the overall business process, Plan-and-Execute for task decomposition, and ReAct for a bounded investigation step.
Multi-agent delegation may be introduced only where responsibilities are genuinely independent.
7.1. Example architecture
Consider a contract review workflow:
flowchart TD
A[User Request] --> B[Workflow Orchestrator]
B --> C[Retrieve Contract]
C --> D[Extract Clauses]
D --> E[Planner]
E --> F[Validated Plan]
F --> G[Parallel Retrieval]
G --> H[Policy Research]
G --> I[Historical Reviews]
H --> J[Evidence Aggregation]
I --> J
J --> K[ReAct Assessment Agent]
K --> L{More Evidence Needed?}
L -->|Yes| M[Additional Tool Execution]
M --> K
L -->|No| N[Deterministic Validation]
N --> O[Generate Report]
O --> P[Human Review]Each component has a specific reason to exist.
- The workflow controls the business process.
- The planner decomposes the review task.
- Parallel retrieval reduces unnecessary sequential waiting.
- The ReAct agent investigates unresolved issues.
- Deterministic validation checks required evidence and output constraints.
- Human review handles sensitive decisions.
This architecture is more complex than a single agent.
It is justified only if the business requirements benefit from these boundaries.
7.2. Keep the control plane deterministic
A useful design principle is to keep execution control in application code wherever possible.
For example:
- The application decides which agent roles exist.
- The application determines available tools.
- The policy engine controls permissions.
- The runtime enforces execution budgets.
- The workflow owns critical business transitions.
- The model makes bounded decisions inside those constraints.
This creates a hybrid system where model flexibility does not imply unrestricted system autonomy.
8. Agent Coordination and Communication
Multi-agent systems introduce a new architectural problem: how agents exchange information.
This is not just a prompting concern.
It is a data contract and distributed execution concern.
8.1. Avoid sharing the entire conversation by default
A naive implementation may pass the full conversation history to every agent.
This can lead to:
- Large context windows.
- Higher token costs.
- Irrelevant information.
- Conflicting instructions.
- Accidental exposure of unrelated data.
- Difficult debugging.
Instead, agents should receive task-specific inputs.
For example, the Policy Research Agent may need:
{
"contract_type": "service_agreement",
"jurisdiction": "VN",
"topics": [
"termination",
"renewal",
"liability"
]
}It does not necessarily need the entire user conversation or all contract content.
8.2. Use structured intermediate results
Agents should return structured outputs that can be validated.
For example:
interface ClauseFinding {
clauseId: string;
policyId: string;
status:
| "compliant"
| "non_compliant"
| "insufficient_evidence";
explanation: string;
evidence: EvidenceReference[];
confidence?: number;
}A coordinator can inspect these results and decide whether further work is required.
Treat confidence as a hint only. Model-reported confidence is poorly calibrated, so don't route decisions on it without evaluating it first.
This is more reliable than asking agents to exchange long, unstructured explanations.
8.3. Handle conflicting results explicitly
Suppose two agents return different conclusions.
The coordinator should not simply select the most confident-sounding answer.
It should:
- Identify the conflicting claims.
- Compare their evidence.
- Check source freshness and authority.
- Request additional retrieval if necessary.
- Escalate unresolved conflicts.
The architecture should preserve the original evidence so that aggregation does not erase important differences.
8.4. Treat agent communication as untrusted input
An agent is still an LLM-based component.
Its output can contain incorrect facts, malformed data, or unsupported conclusions.
A receiving agent should validate the incoming response just as it would validate any external service response.
Agent-to-agent communication does not create a trusted security boundary.
9. Failure Modes and Architectural Trade-offs
Different patterns introduce different failure modes.
9.1. ReAct failure modes
Repeated tool calls
The agent may repeatedly retrieve the same information.
Mitigation:
- Track tool-call history.
- Detect repeated arguments.
- Enforce iteration budgets.
- Cache safe, repeatable retrieval results.
Unproductive loops
The agent may alternate between similar actions without making progress.
Mitigation:
- Define progress signals.
- Detect repeated execution states.
- Use explicit stopping conditions.
- Escalate when no progress is made.
Excessive sequential reasoning
The agent may take many iterations to complete a task that could have been planned in advance.
Mitigation:
- Use deterministic workflows for known processes.
- Use planning for multi-step tasks.
- Execute independent operations concurrently.
9.2. Plan-and-Execute failure modes
Invalid plans
The planner may generate nonexistent tools or invalid dependencies.
Mitigation:
- Validate every step.
- Resolve tool names against the registry.
- Validate input schemas.
- Check dependencies before execution.
Stale plans
A plan may become invalid after an external result changes the situation.
Mitigation:
- Revalidate remaining steps.
- Support replanning.
- Use versioned inputs and explicit execution state.
Unnecessary planning overhead
Simple requests may not need a planning stage.
Mitigation:
- Use direct execution for simple tasks.
- Introduce a planner only when task decomposition provides measurable value.
9.3. Multi-agent failure modes
Coordination overhead
Each agent adds model calls, context construction, and result aggregation.
Mitigation:
- Keep the number of agents small.
- Use deterministic delegation rules where possible.
- Avoid creating an agent for every individual tool.
Conflicting results
Different agents may interpret evidence differently.
Mitigation:
- Define output schemas.
- Preserve evidence references.
- Use explicit conflict-resolution logic.
- Require human review for unresolved high-impact disagreements.
Failure propagation
One agent may produce incorrect information that influences every downstream agent.
Mitigation:
- Validate intermediate results.
- Verify evidence against authoritative sources.
- Track provenance.
- Avoid treating agent conclusions as ground truth.
9.4. The hidden cost of complexity
A system with five agents is not necessarily five times more capable than a single agent.
It may instead require:
- More model calls.
- More state transitions.
- More prompts.
- More schema definitions.
- More integration tests.
- More observability.
- More failure recovery logic.
The architectural benefit must justify this additional operational cost.
10. Evaluating Agent Architecture
Architecture decisions should be based on measurable results.
A useful evaluation compares multiple approaches using the same tasks and evaluation criteria.
10.1. Define a representative task set
For the contract assistant, create tasks with different levels of complexity.
| Task | Complexity | Expected behavior |
|---|---|---|
| Retrieve renewal date | Low | One retrieval operation |
| Find relevant policies | Medium | Search and evidence selection |
| Compare one clause | Medium | Retrieve evidence and assess |
| Investigate multiple risks | High | Multiple retrieval and reasoning steps |
| Resolve conflicting evidence | High | Additional research or escalation |
| Prepare external notification | High | Draft, validate, and request approval |
The test set should include normal cases, incomplete information, ambiguous requests, and adversarial inputs.
10.2. Measure task quality
For each architecture, measure:
- Correct final conclusion.
- Evidence completeness.
- Tool selection accuracy.
- Argument correctness.
- Policy compliance.
- Human escalation correctness.
A system that produces a convincing report without sufficient evidence should not be considered successful.
10.3. Measure operational efficiency
Track:
- Model calls per task.
- Tool calls per task.
- Total tokens.
- Cost per successful task.
- P50 and P95 latency.
- Retry rate.
- Failure rate.
- Number of unnecessary steps.
A useful comparison is cost per successfully completed task rather than cost per model call.
A cheaper architecture that frequently produces incorrect results may be more expensive in practice.
10.4. Use execution replay
Store enough structured execution data to replay representative tasks against:
- Different models.
- Different prompts.
- Different planning strategies.
- Different tool definitions.
- Different agent configurations.
This makes architecture comparisons more objective.
It also helps identify whether an improvement comes from better model reasoning, better retrieval, or simply more execution attempts.
11. Building an Agent Architecture for Production
For our contract operations assistant, I would not start with a large multi-agent system.
A reasonable initial architecture is:
flowchart TB
U[User] --> API[Application API]
API --> W[Workflow Orchestrator]
W --> R[Contract Retrieval]
R --> P[Plan-and-Execute]
P --> V[Plan Validator]
V --> X[Tool Executor]
X --> S[Business Services]
S --> X
X --> P
P --> A[Bounded ReAct Assessment]
A --> X
A --> D[Deterministic Validation]
D --> H[Human Approval]
H --> O[Final Report]
W --> ST[Task State Store]
X --> AU[Audit and Observability]
A --> AUThis architecture deliberately combines deterministic control with bounded model autonomy.
11.1. Start with one agent
The initial implementation should have:
- One agent runtime.
- A small tool registry.
- A deterministic workflow for known business steps.
- A bounded ReAct loop for investigation.
- Explicit task state.
- Policy-controlled execution.
- Human approval for sensitive actions.
This is enough to solve many practical business problems.
11.2. Introduce planning when tasks become longer
When tasks require multiple dependent operations, introduce an explicit planning layer.
The plan should be:
- Structured.
- Validated.
- Persisted.
- Observable.
- Replannable.
Do not let the planner execute arbitrary tools directly.
11.3. Introduce specialized agents only when justified
A specialized agent is worth introducing when it provides a meaningful boundary, such as:
- A different permission set.
- A distinct knowledge domain.
- A separate evaluation standard.
- A different model requirement.
- An independent task that can run concurrently.
- A separately deployable or independently managed capability.
If two agents use the same tools, same context, same policies, and same evaluation criteria, separating them may provide little value.
11.4. Keep the runtime provider-independent
The agent runtime should not be tightly coupled to one LLM provider.
Use a normalized model interface that supports:
- Tool calls.
- Text responses.
- Structured outputs.
- Usage information.
- Timeouts.
- Provider errors.
- Model-specific capabilities.
This allows the application to select models based on task requirements without changing the orchestration architecture.
The same principle applies to agent configuration.
A model provider, model, temperature, token budget, and tool permissions should be configurable independently for each agent role.
12. A Practical Decision Framework
Before selecting an architecture, ask what the task actually requires.
12.1. Choose ReAct when
- The next action depends on newly discovered information.
- The task is exploratory.
- The execution path is difficult to predict.
- The number of steps is relatively small.
- Dynamic adaptation matters more than explicit upfront planning.
12.2. Choose Plan-and-Execute when
- The task contains several identifiable stages.
- Progress tracking matters.
- Dependencies should be visible.
- Independent steps can run in parallel.
- Long-running execution needs to resume safely.
12.3. Choose Multi-Agent when
- Responsibilities are genuinely distinct.
- Specialized capabilities or permissions are needed.
- Independent tasks can execute concurrently.
- Separate agents can be evaluated independently.
- Coordination benefits outweigh additional complexity.
12.4. Use a deterministic workflow when
- The process is already known.
- Business rules define the execution order.
- The same operations are performed repeatedly.
- Predictability and auditability are more important than dynamic tool selection.
A compact decision tree:
flowchart TD
A[New AI Task] --> B{Is the process deterministic?}
B -->|Yes| C[Workflow]
B -->|No| D{Are there clear multi-step dependencies?}
D -->|Yes| E[Plan-and-Execute]
D -->|No| F{Does the next action depend on observations?}
F -->|Yes| G[ReAct]
F -->|No| H[Direct LLM or Workflow]
E --> I{Are responsibilities independently specialized?}
G --> I
I -->|Yes| J[Consider Multi-Agent]
I -->|No| K[Keep a Single Agent]The decision tree is a starting point, not a strict architectural rule.
A production system may combine multiple patterns.
The important part is to introduce complexity only when there is a measurable reason.
13. Summary
ReAct, Plan-and-Execute, and Multi-Agent Systems are different ways of organizing agent execution.
ReAct is useful when the system needs to adapt continuously to new observations.
Plan-and-Execute is useful when tasks have multiple identifiable stages and execution progress needs to be managed explicitly.
Multi-Agent Systems are useful when responsibilities can be divided across genuinely specialized components.
In production, these patterns can be combined with deterministic workflows and policy-controlled execution.
The most important lessons are:
- Do not use an agent when a deterministic workflow is sufficient.
- Do not introduce planning unless task decomposition provides value.
- Do not create multiple agents merely to make the architecture look more sophisticated.
- Treat plans and agent outputs as proposals that require validation.
- Keep permissions, execution budgets, and critical business transitions under application control.
- Evaluate architecture using task quality, reliability, latency, and cost.
Ultimately, a good agent architecture is not the one with the most autonomy or the largest number of agents.
It is the one that solves the problem with the least unnecessary complexity while remaining reliable, observable, and controllable.
Next article: Building a Reliable Agent Runtime: State Machines, Checkpointing, Recovery, and Execution Control.
We will move from agent reasoning patterns into runtime engineering: how to persist execution state, recover interrupted tasks, manage checkpoints, handle retries, and make long-running agents reliable in production.
- ReAct agent
- Plan-and-Execute
- Multi-agent systems
- AI agent orchestration
- Agent coordination
- Agent workflow
- Production AI architecture
- LLM agent design