Agents in Production
Lesson 1 of 6Advanced 9 min

Anatomy of an agent

An agent is a model using tools in a loop. Most products need a workflow; reach for full autonomy only when the path can't be scripted.

In this lesson you'll

  • Describe the reason–act loop
  • Tell workflows from agents
  • Pick the simplest pattern that solves the task

ReAct showed that interleaving reasoning with actions, so the model thinks, calls a tool, reads the result and thinks again, beats reasoning or acting alone on question answering and interactive tasks [1]. Toolformer showed models can learn when an API call will help [2], and Reflexion showed agents can improve across attempts by writing verbal feedback on their own failures into memory [3]. Those three ideas, a loop, tools and feedback, are the anatomy of every agent shipped today.

Workflows versus agents

Anthropic draws a useful line: workflows orchestrate models and tools through predefined code paths, while agents direct their own process and tool use. Their advice is to find the simplest solution that works and add complexity only when it measurably helps [4].

  • Prompt chaining: fixed steps, each feeding the next.
  • Routing: classify the input, then send it to a specialised handler.
  • Parallelisation: run independent subtasks or votes at once.
  • Orchestrator–workers: a lead model splits work and delegates it.
  • Evaluator–optimiser: one model drafts, another critiques, and they loop [4].

In Kojen

The Orchestrator is a prompt-chaining workflow: clean → train → evaluate → deploy, with outputs flowing forward and a failed step stopping the pipeline. The Kojen Agent is a true agent that chooses its own tools, and asks before deleting anything.

Key takeaways

  • An agent is a model, tools and a loop.
  • Prefer a workflow when the steps are known.
  • Add autonomy only when evaluation shows it helps.

Practise in the dojo

Chain clean → train → evaluate in the Orchestrator and watch outputs flow between steps.

Build a pipeline

Check your understanding

Score 70 or more to complete the lesson. Progress is saved in this browser.

1. What distinguishes an agent from a workflow, in Anthropic's framing?

Further reading

Sources

Checked against the original sources in November 2026.

  1. [1]Yao, S. et al. (2022). ReAct: Synergizing Reasoning and Acting in Language Models. ICLR 2023 · arXiv:2210.03629.
  2. [2]Schick, T. et al. (2023). Toolformer: Language Models Can Teach Themselves to Use Tools. NeurIPS 2023 · arXiv:2302.04761.
  3. [3]Shinn, N. et al. (2023). Reflexion: Language Agents with Verbal Reinforcement Learning. NeurIPS 2023 · arXiv:2303.11366.
  4. [4]Anthropic (2024). Building effective agents. Anthropic Engineering.