Free developer tool

Free Agentic Workflow Pattern Picker

An agentic workflow pattern is a proven way to connect LLM calls and tools: prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer, or a fully autonomous agent loop. Answer six questions about your task and this picker recommends the simplest pattern that fits, explains why, and gives you a Mermaid diagram, gates and stop conditions, typical failure modes, a rough cost estimate and pseudo-code. It runs in your browser; nothing is sent anywhere.

How are the steps known?
Do inputs fall into distinct types?
Can work run in parallel?
Does output need a quality check?
How much human approval?
Latency and cost budget?

Recommended pattern

Prompt chaining

A fixed sequence of LLM calls, each working on the previous output, with checks between steps.

Rough cost: about 2 to 5 LLM calls per run, versus 1 for a single prompt. Token use usually grows faster than call count because context is passed along.

Why

  • The steps are fixed and known, so a chain of simpler calls with checks between them beats one big prompt.

Gates and stop conditions

  • Programmatic gate after each step: stop or retry when the output fails a check
  • Stop the chain on the first failed gate instead of passing bad output on
  • Human approval before irreversible actions: sending, deploying, paying, deleting

Typical failure modes

  • An early mistake flows into every later step
  • Latency adds up across sequential calls
  • Steps drift out of sync when one prompt changes

Mermaid diagram

flowchart TD
  IN([Input])
  IN --> S1[LLM step 1]
  S1 --> G1{Gate: passes check?}
  G1 -->|no| X[Stop or retry]
  G1 -->|yes| S2[LLM step 2]
  S2 --> S3[LLM step 3]
  S3 --> OUT
  OUT[Result] --> HU
  HU{Human review} -->|approve| DONE
  HU -->|reject| IN
  DONE([Output])

Paste into a GitHub or GitLab markdown block fenced with ```mermaid, Notion, or mermaid.live to see the flow.

Pseudo-code

// Prompt chaining
async function run(input) {
  const outline = await llm(`Outline: ${input}`);
  if (!passesCheck(outline)) throw new Error("gate 1 failed");
  const draft = await llm(`Write from this outline: ${outline}`);
  const result = await llm(`Edit for tone and accuracy: ${draft}`);
  if (!(await humanApproves(result))) return null;
  return result;
}

12 agentic workflow examples

Load a worked example to see which pattern fits and why. Each one sets the answers above.

  • Customer support triage

    Routing

    Billing, technical and refund requests each get their own prompt; refunds need approval.

  • Pull request code review

    Parallelization

    Security, correctness and style reviewers read the same diff at once.

  • Research report

    Orchestrator-workers

    The questions to research depend on the topic; the report must cite sources.

  • Invoice data extraction

    Prompt chaining

    Extract fields, validate totals, then normalize to your schema.

  • Blog content pipeline

    Prompt chaining

    Outline, draft and edit, then an editor pass against a style guide.

  • Literary translation

    Evaluator-optimizer

    A critic model checks nuance and tone and sends notes back.

  • Content moderation

    Parallelization

    Three independent judgments; flag when the majority says unsafe.

  • Fix a GitHub issue

    Autonomous agent

    Read code, edit, run tests and iterate until they pass.

  • Multi-file feature change

    Orchestrator-workers

    Which files change depends on the request; each file is a worker task.

  • Cheap vs strong model routing

    Routing

    Easy questions go to a small model, hard ones to a large model.

  • Meeting notes to action items

    Single augmented LLM call

    One call turns a transcript into owners, tasks and dates.

  • Browser task automation

    Autonomous agent

    Navigate a site, fill forms and check results; a person approves each step.

Agentic workflow patterns at a glance

Single augmented LLM call

One model call with retrieval, tools or memory. No workflow at all.

Use when: The task is one well-defined step. Try this first; add a workflow only when it measurably falls short.

Prompt chaining

A fixed sequence of LLM calls, each working on the previous output, with checks between steps.

Use when: The task splits cleanly into fixed subtasks. Trades latency for accuracy by making each call easier.

Routing

A classifier call sends each input to a specialized prompt, model or tool.

Use when: Inputs fall into distinct categories that are better handled separately, and classification is reliable.

Parallelization

Several LLM calls run at once: sectioning splits independent subtasks, voting runs the same task several times.

Use when: Subtasks are independent (sectioning) or you need more confidence from several attempts (voting).

Orchestrator-workers

A central LLM breaks the task into subtasks at run time, hands them to worker calls and synthesizes the results.

Use when: You cannot predict the subtasks in advance, such as which files a code change touches or which sources a report needs.

Evaluator-optimizer

One LLM generates, another evaluates against criteria and gives feedback, in a loop.

Use when: You have clear evaluation criteria and feedback measurably improves the result, like a human editor would.

Autonomous agent

An LLM in a loop that plans, calls tools, reads results from the environment and decides when it is done.

Use when: Open-ended problems where the number of steps cannot be predicted and you trust the model to act in a sandbox.

Pattern names follow Anthropic's guide Building effective agents (December 2024). Call counts in the picker are rough estimates.

How to choose an agentic workflow pattern

  1. 1. Describe how the steps are known

    Say whether the task is one step, a fixed sequence, subtasks that depend on the input, or open-ended.

  2. 2. Answer the routing, parallel and quality questions

    Note whether inputs come in distinct types, whether work can run in parallel, and whether output must pass clear criteria.

  3. 3. Set oversight and budget

    Choose how much human approval you need and how tight latency and cost are. These set step caps and refinement rounds.

  4. 4. Copy the diagram and pseudo-code

    Paste the Mermaid diagram into your design doc and adapt the pseudo-code, including its gates and stop conditions.

Agentic workflow FAQ

What is an agentic workflow?

An agentic workflow is a system where LLM calls and tools are connected through code paths you define, such as a chain of prompts, a router or a generate-and-review loop. An agent is the open-ended case, where the model itself decides which tools to call and when it is done.

What are the main agentic design patterns?

The common workflow patterns are prompt chaining, routing, parallelization (sectioning and voting), orchestrator-workers and evaluator-optimizer, plus autonomous agents for open-ended tasks. Anthropic describes these in its December 2024 guide "Building effective agents". Andrew Ng groups agentic design patterns as reflection, tool use, planning and multi-agent collaboration.

What is the difference between an agentic workflow and an AI agent?

In a workflow, your code fixes the path: which calls run, in what order and when to stop. In an agent, the model directs its own process in a loop, choosing tools from what it observes. Workflows are more predictable and cheaper; agents handle tasks whose steps cannot be listed in advance.

When should I not use an agent?

When a single well-prompted LLM call, or a fixed workflow, solves the task. Agents add latency, cost and compounding errors. Start with the simplest pattern, measure it, and add steps only when results improve.

What is the difference between orchestrator-workers and parallelization?

Parallelization runs subtasks you defined in advance at the same time. Orchestrator-workers lets a central LLM decide the subtasks at run time from the input, then combines the workers' results.

How do I stop an agentic loop from running forever?

Give every loop a hard cap (maximum steps or refinement rounds), an explicit pass condition such as tests passing or an evaluator approving, and a human checkpoint before any irreversible action.

Run your pattern as a deterministic workflow

Once you know the pattern, Tornic runs it: chained, routed or looped steps with gates and stop conditions, on the Claude Code, Codex or Cursor CLI you already pay for.

Explore Tornic

Related free tools