Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

AI comparison

AI agent vs workflow

A workflow runs steps you wrote in advance, using a model at some of them; an agent lets the model choose the steps, which is more flexible and harder to predict.

Agent and Workflow side by side
AspectAgentWorkflow
Who chooses the next stepThe modelYour code
PredictabilityLower; paths vary between runsHigh; the same steps each time
TestingHarder; judge the trajectory and end stateEasier; test each step
CostVaries with how many steps it takesKnown in advance

Choose Agent when

  • The steps depend on what is found along the way
  • The task is open-ended, such as investigating a bug
  • You can bound it with limits on steps, spend and tools

Choose Workflow when

  • You can write the steps down
  • Reliability and cost matter more than flexibility
  • Each step must be checked or approved

Learn it hands-on

These free lessons teach it with commands to run in a lab and checked tasks. Read them whole with no account.

Related terms

AI agent
An AI agent is a program in which a language model chooses its own next step, calling tools in a loop until the task is done or it is stopped.
Agent loop
The agent loop is the cycle at the heart of an agent: send the conversation to the model, run any tool it asks for, add the result, and repeat.
Multi-agent system
A multi-agent system splits a task between several AI agents, each with its own role, tools and context, coordinated by code or by another agent.

← All AI terms