Claude With The Anthropic Api
← All lessons
Lesson 76Claude With The Anthropic Api

Agents and workflows

Summary audio

No audio recap for this lesson.

Study notes

Core Definitions

  • Workflows and agents are strategies for handling user tasks that cannot be completed by Claude in a single request
  • You have already been creating these throughout the course (e. g. , when using tools)

Decision Rule: Workflow vs. Agent

  • Use a workflow if you have a precise idea of the task and know the exact series of steps needed
  • Use an agent if you're unsure about task details and need Claude to figure out the approach

Workflow Example: 3D Model from Image

The process:

  • User uploads an image of a metal part
  • Feed image to Claude → get detailed description
  • Feed description to Claude → use cadquery library to create 3D model
  • Generate rendering from the model
  • Feed rendering back to Claude → evaluate accuracy against original
  • If issues found, loop back to step 3; otherwise, output step file (industry standard 3D format)

Evaluator-Optimizer Pattern

  • A common workflow structure with two components:
  • Producer: generates output (Claude using cadquery to model and render)
  • Grader: evaluates if output meets criteria
  • If grader accepts output → workflow ends
  • If not → feedback loops back to producer for improvement
  • Cycle repeats until grader accepts the result

Important Clarification

  • Identifying workflows doesn't automatically do anything
  • You must still write code to implement them
  • Workflows are discussed because many engineers have found success using these established patterns
  • Learning these patterns helps you apply them to your own projects

Takeaways

  • Use workflows when you know the exact steps needed; use agents when you're unsure and need Claude to figure out the approach
  • The evaluator-optimizer pattern is a common workflow structure where a producer generates output and a grader evaluates it, looping until criteria are met
  • Workflows and agents handle tasks that cannot be completed by Claude in a single request
  • Identifying a workflow pattern doesn't automatically implement it — you must still write code to execute it
  • These established patterns help engineers solve problems systematically in their own projects
Flashcards 9 cards
Question
click to reveal · ←/→
Answer
click to flip back
Export to Anki (.tsv) ↓
Knowledge check 6 questions