Choose an AI workflow before building an agent
Match a task to a fixed workflow first, then add an agent loop only when the work needs one.
Published · 1 source · Resume reading
Anthropic recommends starting with the simplest workable approach and adding complexity when it improves results. [1]
Try one model call first
Give the model relevant context and examples. Define a useful result before adding orchestration. [1]
Match the task to a workflow
Anthropic describes five patterns. [1]
- Prompt chaining divides work into fixed steps with checks between them.
- Routing sends different inputs to specialized handlers.
- Parallelization handles independent parts or compares several attempts.
- Orchestrator-workers lets a model divide work whose subtasks are not predictable.
- Evaluator-optimizer uses feedback to revise a result.
Choose the pattern around your task's uncertainty. [1]
Add an agent loop only where needed
Anthropic says agent loops can cost more and compound mistakes. Test the tool boundaries and stopping conditions before using one on consequential work. [1]
For coding tools, the guide reports that absolute file paths avoided mistakes caused by a changed working directory. Require them in file-editing tools. [1]
Keep this guide
Filed under AI agents
Sources
- Anthropic: Building effective agentsanthropic.com
Next in this stack
Keyword STARTER
Write skill metadata an agent can recognize
Keyword CODEXMEM
Enable and inspect local Codex memories
Keyword HERMESPRO
Keep Hermes project context and memory useful