When to Use
- Deciding whether a problem is a workflow, a single agent, or a multi-agent system
- Refactoring an overengineered AI system back to the simplest architecture that works
- Planning LangChain solutions where latency, cost, context size, or error tolerance matter
- Choosing between deterministic control flow and autonomous decision-making
Critical Patterns
Pattern 1: Start with workflows
- If you can write the steps in advance, it is a workflow.
- Use workflows for stable, repeatable processes that are easy to test and debug.
- Workflows can still include routing, parallel fan-out/fan-in, evaluator loops, and orchestrator-worker patterns when the control flow is predetermined.
Pattern 2: Tools are capabilities, not agents
- A tool is something the system can do; an agent is the decision maker.
- Ten APIs behind one model is still a single agent, not multi-agent.
- Add tools before adding another decision maker.
Pattern 3: Use one agent when the path is dynamic
- Choose a single agent when the next step depends on what the system discovers at runtime.
- Single agents work best when tasks are tightly coupled, global context matters, and the tool set is manageable.
- Rule of thumb: keep one agent under about 10-20 tools; beyond that, tool selection and context quality tend to degrade.
Pattern 4: Escalate to multi-agent only for real constraints
- Use multi-agent systems when you need true parallelism, separate contexts, external agent interoperability, or hard security/data boundaries.
- Split agents when one context cannot hold the required tools and instructions without hurting quality.
- Do not split just because it sounds sophisticated.
Pattern 5: Keep multi-agent systems orchestrated
- Prefer one orchestrator plus explicit handoffs.
- Avoid free-form peer-to-peer chatter between agents.
- Share artifacts through clear contracts, not hidden conversational state.
Decision table
| If this is true |
Use this |
Why |
| You can define the full step sequence up front |
Workflow |
Predictable, cheap, testable |
| The path depends on discoveries made at runtime, but one context can manage it |
Single agent |
Autonomy without coordination overhead |
| Tasks are independent, tool sets diverge, or boundaries must stay separate |
Multi-agent |
Parallelism, modularity, separation |
Code Examples
Example 1: Workflow
# Fixed control flow: classify -> route -> draft -> validate
def handle_ticket(ticket):
category = classify(ticket)
team = route(category)
draft = draft_response(ticket, team)
return validate(draft)
Example 2: Single agent with tools
from langchain.agents import create_agent
agent = create_agent(
model="gpt-5.4-mini",
tools=[search, retrieve, validate],
system_prompt="Use tools to solve the task step by step."
)
Example 3: Multi-agent with an orchestrator
# Orchestrator delegates research to one agent and writing to another.
research_agent = create_agent(...)
writing_agent = create_agent(...)
orchestrator = create_agent(...)
Commands
uv add langchain langgraph
Resources
- Related skill: See langchain-agents for implementation patterns after the architecture choice is made.
Source: ColRuDev/job-candidate-matcher — distributed by TomeVault.
1---2name: colrudev-job-candidate-matcher-langchain-agent-architecture3description: When to Use4---56## When to Use78- Deciding whether a problem is a workflow, a single agent, or a multi-agent system9- Refactoring an overengineered AI system back to the simplest architecture that works10- Planning LangChain solutions where latency, cost, context size, or error tolerance matter11- Choosing between deterministic control flow and autonomous decision-making1213## Critical Patterns1415### Pattern 1: Start with workflows1617- If you can write the steps in advance, it is a workflow.18- Use workflows for stable, repeatable processes that are easy to test and debug.19- Workflows can still include routing, parallel fan-out/fan-in, evaluator loops, and orchestrator-worker patterns when the control flow is predetermined.2021### Pattern 2: Tools are capabilities, not agents2223- A tool is something the system can do; an agent is the decision maker.24- Ten APIs behind one model is still a single agent, not multi-agent.25- Add tools before adding another decision maker.2627### Pattern 3: Use one agent when the path is dynamic2829- Choose a single agent when the next step depends on what the system discovers at runtime.30- Single agents work best when tasks are tightly coupled, global context matters, and the tool set is manageable.31- Rule of thumb: keep one agent under about 10-20 tools; beyond that, tool selection and context quality tend to degrade.3233### Pattern 4: Escalate to multi-agent only for real constraints3435- Use multi-agent systems when you need true parallelism, separate contexts, external agent interoperability, or hard security/data boundaries.36- Split agents when one context cannot hold the required tools and instructions without hurting quality.37- Do not split just because it sounds sophisticated.3839### Pattern 5: Keep multi-agent systems orchestrated4041- Prefer one orchestrator plus explicit handoffs.42- Avoid free-form peer-to-peer chatter between agents.43- Share artifacts through clear contracts, not hidden conversational state.4445### Decision table4647| If this is true | Use this | Why |48|---|---|---|49| You can define the full step sequence up front | Workflow | Predictable, cheap, testable |50| The path depends on discoveries made at runtime, but one context can manage it | Single agent | Autonomy without coordination overhead |51| Tasks are independent, tool sets diverge, or boundaries must stay separate | Multi-agent | Parallelism, modularity, separation |5253## Code Examples5455### Example 1: Workflow5657```python58# Fixed control flow: classify -> route -> draft -> validate59def handle_ticket(ticket):60 category = classify(ticket)61 team = route(category)62 draft = draft_response(ticket, team)63 return validate(draft)64```6566### Example 2: Single agent with tools6768```python69from langchain.agents import create_agent7071agent = create_agent(72 model="gpt-5.4-mini",73 tools=[search, retrieve, validate],74 system_prompt="Use tools to solve the task step by step."75)76```7778### Example 3: Multi-agent with an orchestrator7980```python81# Orchestrator delegates research to one agent and writing to another.82research_agent = create_agent(...)83writing_agent = create_agent(...)84orchestrator = create_agent(...)85```8687## Commands8889```bash90uv add langchain langgraph91```9293## Resources9495- **Related skill**: See [langchain-agents](../langchain-agents/SKILL.md) for implementation patterns after the architecture choice is made.9697---98> Source: [ColRuDev/job-candidate-matcher](https://github.com/ColRuDev/job-candidate-matcher) — distributed by [TomeVault](https://tomevault.io).99<!-- tomevault:4.0:skill_md:2026-06-16 -->