Compare Architectures
Side-by-side: use case, requirements, latency, cost, strengths, weaknesses, failure modes, example — and when to choose each.
Workflow vs AgentSingle agent vs Multi-agentRAG vs Fine-tuningVector search vs BM25Function calling vs MCPDirect API integration vs MCPPlan-then-execute vs ReActShort-term memory vs Long-term memoryLLM-as-judge vs Deterministic evaluatorsHuman-in-the-loop vs Human-on-the-loopSupervisor vs PipelinePrompt caching vs Semantic cachingRouter vs SupervisorFramework vs No framework
| Workflow | Agent | |
|---|---|---|
| Use case | Steps are known in advance; the LLM fills in individual steps | Steps are only discoverable at runtime from intermediate results |
| Requirements | A state graph or plain code with explicit transitions | A loop, tools, termination criteria, and a budget |
| Latency | Predictable: fixed number of calls | Variable: 2 to N calls depending on the path taken |
| Cost | Bounded and easy to forecast per run | Unbounded without hard limits; long tails dominate |
| Strengths | Testable, debuggable, deterministic control flow | Handles open-ended tasks and unforeseen branches |
| Weaknesses | Cannot adapt to inputs the graph did not anticipate | Harder to test; every run can take a different path |
| Failure modes | Rigid graph forces wrong branch on edge cases | Loops, runaway cost, drifting arguments, silent wrong tool |
| Example | Invoice intake: extract → validate → route → post | Debug a failing CI job by reading logs and trying fixes |
| Choose this when | Choose a workflow when you can draw the steps on a whiteboard before running it; most business processes qualify. | Choose an agent only when the next step genuinely depends on results you cannot enumerate ahead of time. |