Concept · Chapter 13: Agents
Workflows vs Agents
A workflow specifies control paths in code, while an agent lets a model select subsequent actions from observations.
The problem
Some tasks have predictable stages; others require exploration whose path is unknown.
The solution
Choose explicitly which transitions are programmed and which are model-selected.
The consequence
More model control adds flexibility, cost and additional failure modes.
You should understand first
- Text as Data
- Probability and Distributions
- Conditional Probability and Bayes' Theorem
- Probability of Sequences
- Language Modeling
- Vectors
- Dot Product
- Embeddings
- Attention
- Softmax
- Self-Attention
- Causal Masking
- Entropy
- Loss Functions
- Cross-Entropy Loss
- Autoregressive Next-Token Prediction
- Pretraining at Scale
- GPT-1 → GPT-2 → GPT-3
- In-Context Learning
- The Turing Test
- Symbolic AI
- Logic and Rules
- Expert Systems
- Knowledge Representation
- The Knowledge-Acquisition Bottleneck
- From Rules to Learning
- Supervised, Unsupervised and Self-Supervised Learning
- Expected Value and Variance
- Reinforcement Learning
- MDPs, Policies and Value
- Decoding: Greedy, Temperature, Top-k, Top-p
- One-Hot Encoding
- Tokenization
- Chat Templates
- System Prompts and Instructions
- Structured Outputs and Constrained Decoding
- Tool Calling
- LLM Agents
- Workflows vs Agents
Control flow is the distinction
A summary pipeline can call several models and still be a workflow: read, summarize, validate, save. Branching on a validation failure does not automatically make it an agent. A repository assistant choosing which file to inspect from a fresh error is exercising model-directed control.
The distinction is architectural, not a universal taxonomy. It follows this engineering discussion.
Combine the two
A workflow might give an agent one bounded investigation stage. An agent might call a fixed build-and-test workflow. Explicitly define each stage's input, output, authority and stop condition.
Design exercise: would a receipt parser benefit from inventing a new process for every receipt? Usually a fixed extraction-and-validation path is the first baseline to evaluate. A debugger facing an unfamiliar codebase has a stronger reason to select its next search dynamically.
What to remember
- A workflow specifies control paths in code, while an agent lets a model select subsequent actions from observations.
- Choose explicitly which transitions are programmed and which are model-selected.
- More model control adds flexibility, cost and additional failure modes.