Question 1easy#AI Agents#LLM
What is an AI agent, and how is it different from a single chatbot call?
Say your answer out loud first, the way you would in the room.
In shortAn agent is a language model in a loop: it decides which tool to call, your code runs the tool, the result goes back to the model, and it repeats until the job is done.
An agent is a language model in a loop: it decides which tool to call, your code runs the tool, the result goes back to the model, and it repeats until the job is done. A chatbot call is one request and one reply. The model answers from what is in the prompt and acts on nothing.
The difference in one example
Ask "Why did last night's sales load fail?"
- A chatbot call can only guess, or explain how loads usually fail. It cannot see your logs.
- An agent with a
read_logstool and arun_sqltool reads the job log, finds the failed step, queries the table that broke it and answers with the actual cause. The model chose those steps itself, one after another, based on what each tool returned.
What makes something an agent
- Tools. The model is given tools, each with a name, a description and an input schema. It cannot run anything itself. It asks for a call, and the application runs it (tool use).
- A loop. After each tool result the model decides again: call another tool, or answer. The run ends when it replies with no tool call, or when a limit stops it.
- The model directs the path. Anthropic's guide "Building effective agents" draws the line here. In a workflow, code fixes the steps in advance (classify, then route, then summarise). An agent decides its own steps and tool use as it goes.
When not to build one
An agent costs more tokens, takes longer and is harder to test than a fixed workflow, because its path changes from run to run. The same guide advises finding the simplest solution that works: often one well-written prompt, or an agentic workflow of fixed steps. An agent earns its place when the steps cannot be known in advance, such as debugging, research or work across many files.
What an interviewer listens for
- Do you know the model never executes anything, so permissions and safety live in the code around it?
- Do you mention limits (turns, budget) and how the run stops?
- Can you say when a workflow is the better choice?
A strong closing line: "I start with a workflow and give the model more freedom only where fixed steps keep failing."