Skip to content

< CollectionsArticle

Building effective agents.

Building effective agents

Anthropic · 2024

Read the article (opens in a new tab)

Start with the simplest thing that works. Most problems need a workflow, not an agent.

8 sections · 16 problems

0 of 16 done

Start Next: 01 Make Your First Model Call

Fig. 1. The orchestrator splits the work into three streams. They run at once, and the merge gate opens only when the slowest arrives.

Section 01

The augmented LLM

0 of 3

The article: The building block is a model with retrieval, tools and memory.

  1. 01Make Your First Model Callimplement · easy
  2. 02Dispatch a Model's Tool Callimplement · easy
  3. 03Remember What Mattersimplement · medium

Section 02

Prompt chaining

0 of 2

The article: Split a task into steps, each call working on the last one's output, with checks in between.

  1. 04Get the JSON Out of a Model's Replyimplement · easy
  2. 05Validate LLM Structured Outputimplement · easy

Section 03

Routing

0 of 2

The article: Classify the input and send it to the prompt or model made for it, easy questions to a smaller model.

  1. 06Route a Question to the Right Toolimplement · medium
  2. 07Try the Small Model Firstoptimize · medium

Section 04

Parallelization

0 of 2

The article: Run independent subtasks side by side, or run the same task several times and vote.

  1. 08Run Tools in Parallel, With Timeoutsimplement · medium
  2. 09Ask Five Times, Keep the Majorityimplement · medium

Section 05

Orchestrator-workers

0 of 2

The article: A central model breaks the task down, hands the pieces to workers and combines what they return.

  1. 10Fan Out to Workers and Mergeimplement · medium
  2. 11Hand Off to a Specialist Agentimplement · medium

Section 06

Evaluator-optimizer

0 of 2

The article: One call writes, another evaluates, and they loop until the evaluation passes.

  1. 12Ask Again When the JSON Is Wrongimplement · medium
  2. 13Score an Answer with an LLM Judgeimplement · medium

Section 07

Agents

0 of 2

The article: An agent is a model using tools in a loop on feedback from its environment, with a condition that stops it.

  1. 14Build a Tool-Calling Agent Loopharness · medium
  2. 15Stop the Loop Inside a Dollar Budgetimplement · medium

Section 08

Prompt engineering your tools

0 of 1

The article: Spend as much care on the interface between the agent and its tools as on the prompt.

  1. 16Turn a Function Into a Tool Specimplement · medium
All collections