Behind the Craft by Peter Yang

Behind the Craft by Peter Yang

Share this post

Behind the Craft by Peter Yang
Behind the Craft by Peter Yang
Curious Beginner's Guide to AI Agents
AI Track

Curious Beginner's Guide to AI Agents

Most "AI agents" are just workflows in disguise. Here's the difference with real examples and a simple decision framework to choose what to build.

Peter Yang's avatar
Peter Yang
Jul 16, 2025
∙ Paid
16

Share this post

Behind the Craft by Peter Yang
Behind the Craft by Peter Yang
Curious Beginner's Guide to AI Agents
3
Share

Dear subscribers,

Today, I want to share a practical, hype-free guide on AI workflows and agents.

95%+ of products marketed as “AI agents” are actually just AI workflows.

There’s nothing wrong with workflows — they’re often the better choice. But you deserve to know the difference so you can build the right solution.

In this beginner-friendly post, I’ll cover:

  1. The difference between AI workflows and agents

  2. 5 examples that show the difference in action

  3. A decision framework to choose what to build

  4. How to build AI workflows and agents

  5. 3 predictions for where this is all heading

Let’s dive in.


This post is brought to you by…Jira Product Discovery Premium

I’ve seen firsthand how difficult it is to get multiple teams to align on the same roadmap and set of priorities. Jira Product Discovery Premium aims to fix this by:

  • Giving leadership visibility across all teams with aggregated roadmaps.

  • Controlling exactly what stakeholders see with granular permissions.

  • Connecting your ideas to real outcomes with relationship mapping between opportunities, solutions, and initiatives to help you prioritize what matters.

Plus get 24/7 support, higher storage limits, and enterprise-grade platform features.

Get a 30 day free trial today


The difference between AI workflows and agents

Here’s the difference:

In an AI workflow, you define the what and the how. In an AI agent, you define the what and AI figures out the how.

Source: John Hwang

Let’s break this down in simple terms:

AI workflow

You define the steps and AI executes on one or more of the steps.

  1. Pros: More predictable, cost-effective, and easier to debug.

  2. Cons: Not ideal for tasks that have a lot of edge cases.

AI agent

You define the goal and the AI decides which path to take.

  1. Pros: Better handles complex, ambiguous tasks with a lot of edge cases.

  2. Cons: More expensive, unpredictable, and harder to control.


5 examples that show the difference in action

Let’s look at some examples to show the difference in action.

AI workflow examples

  1. Prompt chaining: Breaks tasks into steps where each AI call processes the previous step’s output. For example, a content workflow might use AI to generate a blog outline → write a first draft → create social posts.

  2. Routing: Classifies inputs and sends them down different predetermined paths. For example, an HR workflow might use AI to categorize job applications by role → route to the right hiring managers.

  3. Evaluator-optimizer: One AI generates content while another provides feedback. Most AI products use LLM-as-judge evaluation workflows where one AI generates output → another AI scores it based on predefined criteria.

Notice how humans defined every step upfront. The AI is just following instructions.

AI agent examples

  1. Deep research (e.g., from ChatGPT): Breaks a user’s research request into tasks and makes separate AI calls to research each task, adapting as it learns more.

  2. Coding agent (e.g., Replit Agent, Claude Code): Turns a user’s app request into a detailed spec and chooses the tech stack. Then creates its own task list, executes it, and tests and debugs its own code.

In both examples above, humans share a vague goal (e.g., “build an app to help parents find kid-friendly places”) and the AI makes decisions on how to get there.

It’s worth calling out that even the best agents still check with you to confirm their assumptions. Deep Research asks clarifying questions and Replit Agent always verifies its spec with you before starting.

Today, very few AI agents can operate without a human in the loop.


A decision tree for choosing AI workflow vs. agent

"Agent" sure sounds cooler than "workflow," but the reality is that workflows are often more useful. Answer these 4 questions to decide what to build:

1. Do you need AI?

  • ❎ No (use a non-AI workflow) if you want simple, 100% predictable outputs.

  • ✅ Yes (move to next question) if you need a LLM to summarize or generate content as part of your workflow steps.

2. Is the task complex enough?

  • ❎ No (use an AI workflow) if you can map out the steps with clear if-then logic.

  • ✅ Yes (move to next question) if you see many edge cases that would require dozens of if-then statements.

3. Is the task valuable enough?

  • ❎ No (use an AI workflow) if your budget is under $0.10 per task. Use a workflow to solve the most common path and escalate edge cases to humans.

  • ✅ Yes (move to next question) if your budget is $1+ per task. An AI agent that can plan tasks autonomously costs a lot of tokens.

4. Is there a high success rate and low cost of error?

  • ❎ No (simplify the task) if the LLM has a low success rate and errors are costly and hard to verify.

  • ✅ Yes (use an AI agent) if the LLM has a high success rate and errors can be identified before they do too much damage.

You should only build an AI agent if you answer “yes” to all four questions above.

Here’s an example from Anthropic on why AI coding makes a great agent use case:

  1. Do you need AI? Yes, coding manually is time-consuming.

  2. Is the task complex enough? Yes, there are many paths from design doc to PR.

  3. Is the task valuable enough? Yes, engineers get paid well.

  4. Is there a high success rate and low cost of error? Yes, LLMs are good at coding and you can verify code with unit tests or human in the loop before production.


Since this newsletter is about practical steps that you can apply right away, I want to dive into how to build AI workflows and agents next along with 3 predictions on where all this is heading.


How to build AI workflows

An example AI workflow for summarizing newsletters into a digest email using n8n

An AI workflow has two components:

  1. Triggers: What kicks off the process (new email, file upload, scheduled time).

  2. Actions: The predetermined sequence of actions, which can include an LLM step.

Here's an example AI workflow for creating social assets from blog posts:

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Peter Yang
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share