Workflows vs autonomous agents and bounded loops
When should you build a fixed LLM workflow vs an autonomous tool-calling agent, and what guardrails prevent runaway loops?
Model Answer & Explanation
Default to deterministic workflows (chained calls, routers, evaluators) when steps are predictable—they’re cheaper, faster, and testable. Use open-ended agent loops only when step count/path depends dynamically on intermediate tool outputs. Always bound max_steps, max_tokens, and wall-clock timeout, validate tool args, and require human confirmation for destructive writes.