AI Agent and workflows

Agents are systems where LLMs dynamically direct their own processes and tool usage.

Verified

On this page

Definition

Agents are systems where LLMs dynamically direct their own processes and tool usage, maintaining control over how they accomplish tasks. Workflows are systems where LLMs and tools are orchestrated through predefined code paths. Some customers define agents as fully autonomous systems that operate independently over extended periods, using various tools to accomplish complex tasks.

Others use the term to describe more prescriptive implementations that follow predefined workflows. Anthropic categorizes these variations as agentic systems, but draws an important architectural distinction between workflows and agents. The basic building block of agentic systems is an LLM enhanced with augmentations such as retrieval, tools, and memory.

Anthropic says its current models can actively use these capabilities, generating their own search queries, selecting appropriate tools, and determining what information to retain.

At a glance

Agents are typically just LLMs using tools based on environmental feedback in a loop, and their operation runs as follows.

Diagram: Agents begin their work with either a command from, or interactive discussion with, the human user. > During execution, agents need to gain "ground truth" from the environment at each step, such as tool call results or code execution, to assess progress. > Agents can pause for human feedback at checkpoints or when encountering blockers.1Agents begin their work with either a commandfrom, or interactive discussion with, the human user.2During execution, agents need to gain "groundtruth" from the environment at each step, suchas tool call results or code execution, toassess progress.3Agents can pause for human feedback atcheckpoints or when encountering blockers.

How it works

Anthropic states that the autonomous nature of agents means higher costs and the potential for compounding errors. Tools enable Claude to interact with external services and APIs by specifying their exact structure and definition in the API. Prompt chaining decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one.

Routing classifies an input and directs it to a specialized followup task. In parallelization, sectioning breaks a task into independent subtasks run in parallel. In parallelization, voting runs the same task multiple times to get diverse outputs.

In the orchestrator-workers workflow, a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results. It is topographically similar to parallelization, and the key difference is flexibility: subtasks are not pre-defined but determined by the orchestrator based on the specific input. In the evaluator-optimizer workflow, one LLM call generates a response while another provides evaluation and feedback in a loop.

Example

One example in the source is a coding agent that resolves SWE-bench tasks, which involve edits to many files based on a task description. For coding, code solutions are verifiable through automated tests. Agents can iterate on solutions using test results as feedback.

However, whereas automated testing helps verify functionality, human review remains crucial for ensuring solutions align with broader system requirements. In a separate tool-design example for its SWE-bench agent, Anthropic found that the model made mistakes with tools using relative filepaths after leaving the root directory. The team changed that tool to always require absolute filepaths and reported no errors with this method in that example. Another example is Anthropic's "computer use" reference implementation, where Claude uses a computer to accomplish tasks.

Sources

This page is written from the official sources below. Open them to check the original text.

Verified ·

This page is written by AI from the official sources above and checked automatically. This site has not tested it. Found a mistake? Tell us.