Glean 拾遗
Daily /2026-08-06 / What Is an Agent? Agents vs Workflows

What Is an Agent? Agents vs Workflows

Source www.aihero.dev Glean’d 2026-08-06 06:00 Read 3 min
AI summary

This short post clarifies Anthropic's now-canonical distinction between agents and workflows. Both orchestrate multiple LLM calls, but workflows hard-code the sequence and termination condition in developer-written code, while agents hand tools to the LLM and let it decide which to call and when to stop. The post notes that a single LLM call is neither, and argues that workflows often outperform agents on clearly specified, repetitive tasks. Includes simple diagrams contrasting the two. A useful conceptual primer for engineers new to agent architecture.

Original · 3 min
www.aihero.dev ↗
§ 1

Ever since Anthropic dropped the article building effective agents, everyone's been talking about agents and workflows. Both agents and workflows are ways of building more powerful systems with LLMs, and they both involve orchestrating multiple calls to the LLM.

A workflow does this through predetermined steps where you have one LLM call which goes to another call which goes to another call. These predetermined steps are written in code by the developer.

Workflow Diagram

The code itself decides when to stop the program, when to call the next LLM. It's all written into the code itself.

自从 Anthropic 发布《构建高效 Agent》一文以来,所有人都在讨论代理(agent)和工作流。代理和工作流都是利用 LLM 构建更强大系统的方式,两者都涉及对多次 LLM 调用的编排。

工作流通过预定的步骤来实现:一个 LLM 调用接着另一个调用,再接着下一个调用。这些预定步骤由开发者用代码编写。

Workflow Diagram

代码本身决定何时停止程序、何时调用下一个 LLM。一切都写在代码里。

§ 2

An agent, though, doesn't use predetermined steps. It calls an LLM and gives it a bunch of tools, different options of things that it can do next. The LLM decides which tool to call and then responds to the result of those tools.

Agent Diagram

The LLM itself decides when to stop the program when it thinks it's finished. In other words, this is the LLM making it up as it goes along, which hands a lot more power to the LLM, but of course makes it less predictable.

然而,代理不使用预定步骤。它调用 LLM,并给它一组工具,也就是接下来可以做的不同选项。LLM 决定调用哪个工具,然后根据这些工具的结果作出回应。

Agent Diagram

LLM 自己决定在认为任务完成时停止程序。换句话说,这是 LLM 在随机应变,这赋予了 LLM 更多权力,但当然也降低了可预测性。

§ 3

Both agents and workflows involve multiple LLM calls. If you're just making one LLM call, it's not really either of those things.

The crucial difference is who decides when to stop:

Agents vs Workflows Comparison

代理和工作流都涉及多次 LLM 调用。如果你只做一次 LLM 调用,那它其实不算其中任何一种。

关键区别在于由谁决定何时停止:

Agents vs Workflows Comparison

§ 4

Agents are really good in situations where the steps to complete the task are not particularly clear, where it needs the ability to improvise to figure out its way through a difficult problem.

But workflows are great for things that need to be done the same way again and again. Workflows are often unfairly maligned because they're not as exciting and sexy as agents.

You'll often get better results from using a workflow than using an agent, as long as the task is clearly specified.

代理非常适合那些完成任务步骤不太清晰的情况,它需要即兴发挥的能力,在难题中摸索出自己的道路。

但工作流非常适合那些需要一遍遍以相同方式完成的事情。工作流常常被不公平地贬低,因为它们不像代理那样令人兴奋和时髦。

只要任务定义清晰,使用工作流往往能得到比使用代理更好的结果。

§ 5

For instance, you can use a workflow to parallelize work. Let's say we take in a chunk of text, we can split it into two parts, summarize each of them independently, and then summarize the summaries afterwards.

Parallel Workflow

例如,你可以用工作流来并行化处理。假设我们拿到一段文本,可以把它分成两部分,分别独立总结,之后再对摘要进行总结。

Parallel Workflow

§ 6

That's the difference between agents and workflows. I don't know whether it's me being old and boring, but I am more excited by workflows than agents.

这就是代理和工作流之间的区别。不知道是不是我这个人又老又无趣,但我对工作流的热情确实高于代理。

Open source ↗