BXUP Track progress & test yourself — free
Cloud & Solutions Architecture · Playbook · Core · ~4 min read
CLOUD & SOLUTIONS ARCHITECTURE · PLAYBOOK · CORE

Workflow vs Agent — the Five Composable Patterns

Most "we need an agent" requests need a workflow. This playbook applies the industry's shared design vocabulary — prompt chaining, routing, parallelization, orchestrator–workers, evaluator–optimizer — to classify a use case and select the simplest pattern that works, with full autonomy reserved for cases that actually justify it.

Tier: Core · Hands-on time: ~30 minutes

Anthropic's "Building Effective Agents" pattern taxonomy has become the de-facto agent design vocabulary — mirrored in Spring AI documentation and echoed in the AWS Agentic AI Lens design principles — which makes it the rare piece of this fast-churning field an architect can standardize on. The taxonomy's core discipline is the point: workflows (predefined code paths with LLM steps) before agents (LLM-directed control flow), and the simplest pattern that clears the requirement wins.

When to use

  • A stakeholder or RFP asks for "an AI agent" and the actual requirement has not been classified yet.
  • An agentic design is ballooning and needs to be re-derived from the simplest viable pattern.
  • A design review needs shared vocabulary so "agent" stops meaning five different things in one meeting.
  • Skip AI when the task is a single well-defined transformation — one prompt with structured output is not a pattern decision, it's a function call.

Prerequisites

  • A concrete use case with inputs, outputs, and the decision points in between written down.
  • The five-pattern taxonomy at hand (Anthropic's essay or the track's summary) — this playbook assumes the vocabulary, Common Core taught the mechanics.
  • A chat assistant to stress the classification.
  • Honest failure-cost information: what happens when the system is wrong, and who notices.

The workflow

  1. Write the task as steps and decisions, without AI words. Inputs, transformations, decision points, outputs, and error paths — as if specifying it for a junior engineer. If you cannot enumerate the steps, note where the genuine open-endedness lives; that is the only place agency might belong.

  2. Classify against the five patterns, in escalating order. Prompt chaining — fixed sequence, each step's output feeds the next; fits decomposable tasks with a known order. Routing — classify the input, dispatch to a specialized path; fits heterogeneous inputs with distinct handling. Parallelization — independent subtasks fan out and aggregate (sectioning or voting); fits volume and multi-perspective checks. Orchestrator–workers — a central LLM decomposes dynamically and delegates; fits tasks where subtasks cannot be predicted upfront. Evaluator–optimizer — one LLM generates, another critiques in a loop; fits tasks with clear evaluation criteria and value in iteration. A true agent — LLM-directed control flow with tools — is the escalation past all five, justified only when the path genuinely cannot be predetermined.

  3. Make the AI attack your classification. Rajesh is classifying the Meridian Retail order-status feature the RFP calls an "agent":

    I've classified a use case and want you to attack the classification.
    
    Use case: customer asks about an order; system looks up order status,
    shipping events, and return eligibility; composes an answer; escalates
    to a human when the account has an open dispute.
    
    My classification: routing (query type -> one of three fixed lookup
    paths) + prompt chaining (lookup -> compose -> policy check). No agent:
    the tool sequence is predictable per query type.
    
    Attack it three ways:
    1. What inputs would break the fixed paths and genuinely require
       dynamic tool selection?
    2. What is the cost of misclassification at the router, and how would
       I measure router accuracy?
    3. If volume of edge cases grows, what is the trigger that would
       justify escalating to orchestrator-workers or a real agent?
    Do not upgrade the design for elegance. Simpler wins ties.
    
  4. Price each candidate pattern. More autonomy costs more everywhere: tokens per request (agent loops multiply calls), latency (sequential loops stack), testability (predefined paths are testable; emergent paths need evals), and failure surface (pb-38's blast-radius work grows with agency). Put rough multipliers next to each candidate.

  5. Choose the simplest pattern that clears the requirement — and write down the escalation trigger. The design says: pattern chosen, patterns rejected and why, and the measurable condition (edge-case rate, new task classes, router accuracy floor) that reopens the decision. This makes "we chose the simple thing" defensible rather than timid.

  6. Sketch the selected pattern with its control points. Even a workflow gets drawn: where the LLM steps sit, where deterministic code owns control flow, where structured outputs constrain interfaces, and where a human gate sits if failure costs demand one.

  7. Name it correctly in every artifact. If it is routing plus chaining, the design doc says so — "agent" appears only where LLM-directed control flow actually exists. Vocabulary discipline is what makes the next review faster.

Verify before you trust it

  • The classification survives the edge-case list. Take the ten weirdest real inputs you can find and trace each through the chosen pattern on paper; if more than a couple genuinely need dynamic control flow, re-classify honestly.
  • Autonomy is justified in writing. Anywhere the design grants LLM-directed control flow, the doc states why no fixed pattern sufficed — reviewed by someone who did not write it.
  • Cost multipliers are sanity-checked. Estimate tokens-per-request for the chosen pattern versus the next simpler one with a real example prompt; if the chosen pattern is 5x the cost, the requirement had better be worth it.
  • The taxonomy is cited from source. Pattern names and definitions in your design match the published taxonomy — a design review where everyone means different things by "orchestrator" wastes its hour.
  • The escalation trigger is measurable. "If it doesn't work well" is not a trigger; "router misroutes >3% of a weekly sample" is.

Restricted-environment variant

Pattern classification needs no client data — describe the use case abstractly (task shape, decision points, failure costs) and the exercise works in any approved assistant, or fully offline with a local model via Ollama. The MSA discipline bites at the sketch stage: real system names, API surfaces, and client vocabulary stay out of external tools; keep the annotated diagram in client-approved tooling. Where an engagement's deliverable includes this classification, the pattern worksheet with justifications is itself client work product — produce it inside the client boundary.

Key Takeaway:

Classify before you build: five named patterns in escalating order, the simplest one that clears the requirement, autonomy justified in writing, and a measurable trigger for revisiting — that is the whole discipline.

This is the free reading view. Open BXUP to track your progress, run the hands-on labs, and prove it with original, exam-pattern assessments.
© Anvi Innovate · BXUP — Be Exponentially Upskilled · BXUP is an independent learning platform, not affiliated with or endorsed by AWS, Microsoft, Google, NVIDIA, IBM, Salesforce, Databricks, Oracle or Anthropic. All trademarks belong to their respective owners. · bxup.in