Junior interview questionAsked by candidates · YouTube
What actually is an AI agent?
Model answer
An LLM in a loop with tools: it picks the next step, calls a tool such as search or code execution, reads the result, and repeats until it judges the task done.
Scroll sideways to see the whole diagram
The context holds the tool definitions and the user's question.
Text version
- The context holds the tool definitions and the user's question.
- The model emits a structured call: a tool name and JSON arguments. With Anthropic's API the reply stops with stop_reason "tool_use".
- The call is text the model generated. Your code checks it before anything runs.
- Your code executes the function. The model has no hands: it only asked.
- The output goes back into the context (a tool_result block) and the model runs again, until it answers instead of calling.
After AI Engineering, Ch. 6 "Function calling", and Anthropic, "Tool use with Claude" (fetched 2026-10-21). Illustrative call.
Unlike a fixed pipeline, the model controls the flow, so it handles open-ended tasks, and can fail in open-ended ways.
Practise the rest
15 Agents questions, 492 in all, each with a model answer. Free.
More Agents interview questions
- LLM workflow or agent: which is better?
- Your agent is very slow. What can you do?
- What are guardrails, and where do they sit in an agent?
- What are the bottlenecks of AI agents, and how do you keep them in check?
- Design a harness for running a tool-using agent safely, and an evaluation platform on top of it.
- Design a code-review agent that combines LLM orchestration with deterministic tools.