Agentic AI Engineering · Module 06 of 16

Workflows vs Agents

Real production systems are often neither 'all workflow' nor 'all agent'. A reliable design keeps predictable steps deterministic and gives an agent only the uncertain decision points it actually needs.

Engineering focus: Deterministic workflows, agentic branches and hybrid control flow

In plain English

What problem are we solving?

Real production systems are often neither 'all workflow' nor 'all agent'. A reliable design keeps predictable steps deterministic and gives an agent only the uncertain decision points it actually needs.

Framework names come later. First understand what the application is doing and where its control boundaries belong.

Running case · Operations Investigator

Across the course, imagine an assistant that investigates operational problems using narrow tools. The design progressively adds plans, specialist agents, approvals, reliability controls and MCP while keeping model output separate from execution authority.

Learning objectives

By the end of this module, you should be able to:

  • Recognize deterministic, agentic and hybrid control flow.
  • Place agentic decisions inside explicit application boundaries.
  • Design an escalation path when neither a workflow nor an agent should continue automatically.

Workflows are strongest when the path is known

Validation pipelines, invoice generation, backups and fixed deployment sequences benefit from explicit control flow. Their predictability makes them easier to test, replay and audit.

Agents are strongest at bounded uncertainty

Investigation, research and triage can require choosing the next step from evidence that did not exist when the program started. That is where agentic control can add value.

Hybrid is often the production answer

A deterministic workflow can collect inputs, validate identity and set budgets; an agent can investigate within a narrow box; then deterministic code can verify the result, request approval and publish the outcome.

Unknown does not mean 'give the agent everything'

When the system cannot classify a request safely, escalation to a human or a fail-closed path is a valid outcome. Autonomy is not the default fallback for uncertainty.

Worked examples

Hybrid incident flow

receive incident
→ validate request              # workflow
→ gather baseline telemetry     # workflow
→ choose next diagnostic        # bounded agent
→ validate proposed tool call   # workflow/policy
→ verify result                 # workflow
→ summarize                     # model
  • Deterministic controls surround the uncertain step.
  • The agent does not own authentication, authorization or final execution policy.

Known job stays simple

nightly backup
→ snapshot
→ verify
→ retain
→ report
  • The steps are known and testable.
  • Adding an autonomous planner here usually increases risk without adding value.
Try it · core lab · account-free

Route tasks to workflow, agentic investigation or human review

Goal: Use explicit policy to choose the simplest adequate control flow for several tasks.

Before you start

  • Python 3 only. The classifier is intentionally deterministic so the architecture decision is visible.
STEP 1

Run the routing lab

python3 public/labs/agentic-ai/06_workflows_vs_agents.py
STEP 2

Inspect the three routes

Known tasks use a workflow, diagnostic uncertainty uses a bounded agentic branch, and unsupported requests fail closed to human review.

STEP 3

Change one scenario

Add a new task and decide what evidence would justify an agentic branch.

Verify

  • Fixed tasks never enter the agentic branch.
  • An unknown task escalates rather than receiving unrestricted autonomy.

Expected outcome

  • You can explain why hybrid control often improves reliability.
  • You can defend the boundary around the agentic step.

Break / fix · diagnose

  • If every task becomes agentic, inspect the policy that identifies known deterministic jobs.
  • If unsupported tasks execute automatically, verify the fail-closed escalation branch.
Production view

Production agent platforms commonly wrap model decisions in deterministic services for identity, policy, budgets, persistence, approval, verification and audit.

Avoid these traps

Common mistakes

  • Turning an entire business process agentic because one step is uncertain.
  • Assuming a workflow cannot contain an LLM step.
  • Using an agent as the fallback for every unknown request.
  • Letting the agent decide its own authorization boundary.
Knowledge check

Explain the control decision, not just the vocabulary.

Open every answer only after committing to your own answer. Opening all four answers records knowledge-check activity in My Learning.

1A deployment pipeline always runs validate → build → scan → deploy. Is it an agent because one scan summary uses an LLM?

No — it is still a deterministic workflow with an AI step because the control path is predefined.

2Where should an agentic step live in a hybrid system?

Inside explicit application boundaries — deterministic code should still handle controls such as identity, policy, budgets and verification.

3What is a valid response to an unsupported or unsafe request?

Escalate or fail closed — uncertainty does not require giving the agent more authority.

4Why prefer deterministic flow for known steps?

It is easier to test, replay, secure and audit when the required sequence is already known.

My Learning

Record your progress for this module.

Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.

Not started

Attempt the core lab and knowledge checks before marking the module complete.