Workflow or agent: who picks the next step?

A lot of 'AI agents' in demos are fixed workflows with a language model dropped into a few steps. That's often the right design. It's just not the same thing as an agent.

A quick test. An agent has a loop, tools and state. The model picks the next step, takes it, looks at the result and decides again. It can search, run code, call APIs, read and write files. And it keeps track of what it has done so far.

If your code fixes the order of the steps, it's a workflow. If the model chooses the next step based on what just happened, it's an agent.

The difference has a price. Agents can handle open-ended tasks, but they cost more, run slower and fail in stranger ways. Workflows are cheaper and easier to test. I'd start with a workflow and use an agent only for the steps where the path really can't be known in advance.

A good first agent is small: one goal, three or four tools, a hard limit on steps, and a log of every action.

What's the smallest task you've given an agent that worked end to end?

#AIAgents#GenerativeAI#AI#MachineLearning

New notes go out on LinkedIn first. Building something with AI? We can help.

Diagram card: Workflow or agent: who picks the next step?