JuniorAI Agents

How is an AI agent different from a chatbot and a workflow? When should you not use an agent?

A good answer tells the three apart with one question: who decides the next step?

  • Rule-based chatbot: hand-written rules decide (keyword matching, for example). Cheap, but it doesn't understand sentences; "has my order been delivered?" can be read as a question about the delivery fee because it contains "deliver".
  • Workflow: a developer writes the path in code in advance; the LLM only does small steps such as classifying or writing the reply. Predictable, easy to test and cheap, but it can only follow the paths that were written.
  • Agent: the LLM chooses the next step itself, in a loop: call a tool, read the result, decide whether to call another tool or answer. It can handle multi-step, conditional requests such as "if my order hasn't gone out yet, add one more item".

Don't use an agent when:

  • the kinds of request are known up front and each has a clear way to handle it (a workflow is enough, faster and cheaper);
  • a single LLM call with the right information already solves it;
  • the action is high-risk (money, deleting data) and no person reviews it.

Bonus points: mention a limit on the number of loop steps, the fact that every step costs a model call, and a combined design, with a workflow at the front door and the agent only for complex requests.