SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

The Difference Between Workflows and Agents, According to Anthropic's Research and Development Team

In recent years, with the performance improvements of Large Language Models (LLMs), the term "agent" has been frequently discussed. While a system that autonomously performs multiple steps beyond a single prompt call is often called an agent, the reality is that few people truly understand the clear distinction between it and a "workflow."

According to Anthropic's research and development team, "Everything is being called an agent, but in reality, we need to draw a line between them and workflows." Specifically, they suggest that "an agent is a form where the LLM decides for itself how many times to execute a prompt to complete a task."

In this article, we will explain in detail the concept of agents, their differences from workflows, actual development examples, and future prospects.


1. Differences between agents and workflows


1-1. What is a workflow?

First, a workflow refers to a "mechanism that connects several LLM calls in a predetermined order." For example, the following flow is a typical case.

  1. Classify the user's question (LLM call A)

  2. Generate an appropriate response based on the classification result (LLM call B)

  3. Format and output the generated response (LLM call C)

As shown, the characteristic of a workflow is that it proceeds along pre-defined rails. Each step is completed as a single task, which has the advantage of being simple and easy to manage.

1-2. What is an agent?

On the other hand, an agent differs significantly in that "humans do not strictly decide in advance how far the task will continue; the model itself makes repeated judgments as it proceeds." For example, when answering a user's inquiry, an agent behaves as follows:

  1. Understand the user's intent

  2. Call external tools (such as web searches or code execution) as needed to acquire information

  3. If it determines that another tool is needed, it proceeds to execute the next action

  4. If it determines that the answer is complete, it outputs it and finishes

In this process, the LLM (the agent) dynamically decides "how many times to call external tools" and "when to consider the answer finalized." This is the "autonomy" unique to agents.

2. Key points and examples of agent implementation


2-1. Pitfalls developers often fall into

Barry, a member of Anthropic's Applied AI team, says he faced the wall of "the model behaving in ways I don't understand" many times during agent development. For example, he mentioned that in a benchmark environment called "OSWorld," the agent repeatedly generated incomprehensible code, making debugging difficult.

“For a while, I would just watch the model's output and often find myself tilting my head, wondering, ‘Why are you taking these steps?’ Eventually, I started adopting an approach of ‘thinking as if I were Claude myself.’”

The key is recognizing that “models operate with different contexts and amounts of information than humans.” By clearly writing tool descriptions and environment settings in a format that is “easy for the model to understand” rather than “for humans,” you can reduce wasted steps and improve the accuracy of the deliverables.

2-2. The Utility of Code Generation Agents

One area where agents are attracting attention is “code generation”.According to Erik from the research team, one reason code generation agents are excellent is that they can be verified through testing.

“Unlike simple text, code has a strict pass/fail criterion: whether or not it passes tests. If you can create a loop where the model generates code, tests it, and then corrects it if it fails, you can automatically guarantee a certain level of quality.”

However, he also notes that in real-world projects, test cases are often insufficient, which can easily become a factor that limits agent performance. The current reality is that “ultimately, a human must review it,” but “because there are tests, it is easier to automate than other tasks.”

2-3. The Potential of Multi-Agent Environments

Additionally, Barry feels great potential in multi-agentenvironmentswhere agents interact with each other. He mentioned that he has conducted internal experiments where he had “multiple Claudes talk to each other to play reasoning games like Mafia or Werewolf.”

“It is truly fascinating to see behaviors and reasoning patterns that humans didn't anticipate when multiple agents pursue their own goals in the same environment. While it hasn't directly led to productive tasks yet, I feel like I've caught a glimpse of a future where ‘models cooperate and compete to solve tasks.’”

3. Excessive Expectations and Realistic Outlooks


3-1. BtoC Agents are “Somewhat Excessive”

In the world, the image of “agents that automate everything” is leading the way, and there are movements to completely entrust tasks like travel reservations and schedule management to them. However, Erik points out that “consumer-facing agents for things like travel reservations are still being overly hyped.”

“If you consider the effort required to convey specific instructions and preferences, it is often faster to book travel yourself than to leave it entirely to an agent.”

Also, because there are many tasks that “require checking before finalization,” there is the problem that human effort cannot be reduced to zero in the end. Of course, there is a high possibility that in the future, agents will learn user preferences and past data and evolve to a state where they can be fully trusted, but at this moment, it is still at a stage closer to an “ideal.”

3-2. High Expectations for Enterprise Business Automation

On the other hand, in applications where agents automate a large volume of “tasks with somewhat clear evaluation criteria,” their use is already spreading. For example,

  • automation of reception and customer support

  • automation of unit testing and documentation updates for code

  • large-scale data collection and mining tasks

Tasks that require vast resources for humans to perform are beginning to be executed at a scale 10 or 100 times greater by agents. It can be said that the strength of agents is that “if the cost is low, you can process a volume of tasks that was previously impossible.”

4. Advice for Developers


4-1. Thorough Measurement and Feedback Loops

Erik cites 'mechanisms to measure results and verify improvements' as the most important point when starting agent development.

“You absolutely need to measure how well the agents you've built are performing. If you continue development without setting measurement metrics, you might end up with something overly complex, only to realize later that a simple workflow would have been sufficient.”

He suggests that starting with tasks that have clear pass/fail criteria, such as code generation or web searches, makes it easier to utilize tests and logs, thereby facilitating an improvement cycle for the agents.

4-2. Careful Tool Descriptions and Environment Design

When having an agent use external tools, it is important not to assume that 'because humans understand it, it's fine,' but rather to 'write it explicitly so the model can understand it too.' Barry also says this:

“It's easy to think that if a feature is for developers, it doesn't need an explanation, but the model can only read parameter names and documentation as they are.
If the contents remain a black box, it's easy for the model to get confused, wondering, 'Should I call A or B?'”

In other words, for tools and API functions that you have an agent use, you need to clearly describe 'what to input and what kind of output is expected.' This is the same for human programmers, but in the case of agents, since it becomes part of the prompt text itself, there is a significant benefit to providing thorough documentation.

While the concept of agents is attracting attention, their effective use is still in its infancy. It is advisable to understand the clear differences from workflows and start with tasks that have a 'reason why they must be agents.' Agents are particularly useful for tasks that meet conditions such as: (1) being easy to test, (2) having relatively small losses even if errors occur, and (3) increasing productivity as the scale grows.

On the other hand, complex consumer-facing tasks (such as travel booking) tend to be overly hyped at the moment. Nevertheless, there is plenty of potential for more advanced automation to be realized in the future by learning from user preferences and past usage history.

Moving forward, we may advance from automation with a single agent to an era of 'multi-agents,' where multiple agents collaborate and compete. There are already cases where multiple Claudes show new reasoning and strategies in text-based games like Werewolf and Mafia.

Finally, for all developers working on agent development, I strongly recommend the stance of 'starting with a simple mechanism and performing continuous measurement and improvement.' By being conscious of system design where the value of your product increases as model performance improves, you will be able to make the most of the progress in agents.


Related Articles


いいなと思ったら応援しよう!