Agentic Engineering from First Principles All chaptersLecturesLabDownload the book
Part I · What Is an Agent?

Chapter 4: Workflows vs Agents

Central questionWhen should software decide the path in advance, and when should a model decide the path at runtime?

Lecture

Chapter principle

Use the least autonomy necessary to obtain the adaptability the task requires.

Key takeaways

Experiments

Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.

Experiment 7: Workflow vs agent

When should the programmer fix the path, and when should the model choose it?

The same job built twice: turn a report into an English summary line. The workflow follows steps the programmer wrote: fetch, translate if the language field is not English, format. The agent gets the same three tools, and a real model chooses each step. Both handle an English report, a French one, and a Spanish one whose language field wrongly says English. Translation is a model call in both. This is a recorded run. Timings vary between runs.

All the code for this chapter: github.com/agentic-engineering-book/code

This is Chapter 4 of Agentic Engineering from First Principles: thirty chapters, a case study and fifty-nine executable experiments, from a single model call to controlled, self-improving agents.
Download the bookBrowse all chapters
← Chapter 3: The Agent LoopChapter 5: Tools →