Lesson 5 of 5·10 min read

When Agents, When Workflows?

Not every problem needs an AI agent. Sometimes a traditional workflow — deterministic, predictable, cheaper — is the better choice. The decision framework in this lesson helps you choose the right architecture.

The Decision Framework

Answer four questions to find the right solution:

Question 1: How variable is the input?

  • Low (forms, structured data): → Workflow
  • Medium (semi-structured, some variants): → Workflow with LLM steps
  • High (free text, unpredictable formats): → Agent

Question 2: How complex is the decision logic?

  • If-then rules sufficient: → Workflow
  • Multiple factors to weigh, but predictable: → Workflow with LLM classification
  • Context-dependent, discretion needed: → Agent

Question 3: How many tools/systems are involved?

  • 1–2 systems, fixed sequence: → Workflow
  • 3–5 systems, partly variable sequence: → Hybrid
  • 5+ systems, dynamic selection: → Agent

Question 4: How critical is determinism?

  • Exact same result every time required: → Workflow
  • Similar result acceptable: → Agent with guardrails
  • Creativity/variation desired: → Agent

The Complexity Matrix

Simple LogicComplex Logic
Structured Input✅ Workflow⚡ Workflow + LLM
Unstructured Input⚡ LLM Pipeline🤖 Agent

When Workflows Win

Workflows are better when:

  • Compliance requirements demand exact reproducibility
  • Costs must be minimal (no LLM API call needed)
  • Latency is critical (real-time processing)
  • Volume is very high (millions of events/day)
  • The process rarely changes and is well-documented

When Agents Win

Agents are better when:

  • Inputs are unpredictable (natural language, variable formats)
  • Decisions are context-dependent (no fixed rule tree possible)
  • Tool selection must be dynamic (which tool when?)
  • Error handling must be creative (independently finding alternative paths)
  • The process changes frequently and must remain flexible

Hybrid Approach: The Best of Both Worlds

In practice, the most common 2026 architecture is a hybrid:

  1. Workflow backbone: Deterministic steps for routing, validation, logging
  2. Agent nodes: LLM-based decisions where flexibility is needed
  3. Human-in-the-loop: Manual checkpoints for critical decisions

Practical Tip: Model the process as a workflow first. Everywhere you write "it depends," place an agent node.

📝

Quiz

Question 1 of 3

Wann ist ein klassischer Workflow einem AI Agent vorzuziehen?