
I always start with the simplest thing that works. Autonomous agents are exciting, but most business problems have clear steps, and clear steps should be code, not a model deciding what to do next.

The ladder
- Single LLM call. Summarise, classify, extract. Most features stop here.
- Deterministic workflow. Step A, then B, then C, with the LLM doing one job inside each step. My default.
- Agent graph. The path depends on what the model finds, like triaging a messy customer issue. I use LangGraph with typed state.
- Multi-agent. Only when work really splits across separate domains or needs parallel research, and the path can't be known upfront.
Agents never get an open-ended loop
- Step limit. A hard cap on how many steps the graph can take.
- Token budget. A circuit breaker that stops a run once it costs too much.
- Checkpoints. State is saved in Postgres, so a run can resume or be inspected.
- Human handoff. If a tool call fails validation twice, the graph routes to a person instead of retrying forever.
Key takeaways
- 01Default to a workflow; earn your way to agents.
- 02Every agent run has a step cap and a cost cap.
- 03Failure means escalation, not infinite retries.
AI agentsLangGraphMulti-agentWorkflowsInterview prep