Interview: Agent Fundamentals
What makes something an agent, how the ReAct loop works, planning, memory, stopping conditions, and when an agent is the wrong choice - the core questions of any agentic AI interview, from definition to design trade-offs.
What you will be able to do
- Define an agent and compare it with a chatbot and a workflow
- Explain the ReAct loop step by step
- Discuss planning, memory and stopping conditions
- Argue when not to use an agent
- Answer design questions about agent autonomy
The idea, in plain English
"What is an agent?" is the most common opening question, and a weak answer is the most common early mistake. The difference between an agent, a chatbot and a workflow must be crisp.
These questions cover the loop at the heart of every agent, how agents plan and remember, how they stop, and - very often asked - when you should NOT build one.
Module 1 built all of this by hand: tool calling, the ReAct loop, memory, planning and retries. Use those examples in your answers.
Worked example: Fourteen questions on agents themselves, with answers tied to the ReAct agent built from scratch in Module 1.
Basic: What is an AI agent?
An AI agent is a system where an LLM decides what to do next - which tool to call, with which input - looks at the result, and repeats until the task is done. The model controls the flow, not a fixed script.
- Three parts: a model that reasons, tools that act, and a loop.
- It works toward a goal over several steps.
- Lesson 1.4 builds the definition from a plain chatbot.
Basic: What is the difference between a chatbot, a workflow and an agent?
A chatbot answers from the model alone. A workflow calls the model and tools in a fixed order that you wrote. An agent lets the model choose the steps at run time.
- Workflow: predictable, cheaper, easier to test.
- Agent: flexible for open-ended tasks, but less predictable.
- Many real products are workflows with a small agentic part.
Basic: What is the ReAct pattern?
ReAct means Reason + Act. The model writes a thought, chooses an action (a tool call), gets an observation (the tool's result), and loops - until it writes a final answer.
- The observation is fed back into the prompt each round.
- It grounds reasoning in real data instead of guesses.
- Lesson 1.6 implements it by hand; Lesson 3.4 as a LangGraph cycle.
Basic: What is a tool in an agent?
A tool is a function the agent may call - a search, a calculator, a database query, an API. The model sees each tool's name, description and input schema, and asks for a call; your code runs it.
- The model never runs code itself - it produces a request.
- Good descriptions decide whether the right tool is picked.
Basic: How does an agent know when to stop?
It stops when the model gives a final answer instead of a tool call. Because a model can loop forever, you also need hard limits: a maximum number of steps, a timeout and a token budget.
- Always add a step limit and a give-up path.
- LangGraph also has a recursion limit as a last safety net (Lesson 3.4).
Intermediate: What kinds of memory does an agent have?
Short-term memory is the conversation and tool results inside the current context window. Long-term memory is stored outside the model - in a database or vector store - and loaded back when relevant.
- Short-term grows every step - trim or summarise it.
- Long-term needs retrieval: what to save, how to find it, when to forget.
- Lesson 1.8 and Lesson 2.8 cover conversation memory.
Intermediate: How do agents plan multi-step tasks?
Either step by step (ReAct decides one action at a time) or plan-then-execute (first write a full plan, then run each step, re-planning if something fails).
- ReAct adapts quickly but can wander.
- Plan-and-execute is easier to follow and check, but plans can go stale.
- Lesson 1.9 builds a simple planner.
Intermediate: What is reflection or self-critique in agents?
The agent (or a second model) reviews its own output against the task, finds problems, and revises before answering.
- Improves quality on writing and code tasks.
- Costs extra calls and can over-correct.
- Use it where checking is easier than creating.
Intermediate: How do you handle errors in an agent?
Catch tool errors and return them to the model as an observation so it can try another way; retry temporary failures with backoff; validate arguments before calling; and stop with an honest message after too many failures.
- Never let one exception crash the whole run.
- Make error messages helpful to the model.
- Lesson 1.10 covers retries.
Intermediate: When should you NOT use an agent?
When the steps are known in advance, when mistakes are expensive and must be predictable, or when a single model call or a plain workflow does the job. Agents add cost, latency and unpredictability.
- Start with the simplest thing that works.
- Use an agent only for the part that really needs open-ended decisions.
Intermediate: What is the difference between single-agent and multi-agent systems?
A single agent has one loop with all the tools. A multi-agent system splits the work between agents with their own roles, prompts and tools, coordinated by a supervisor or a fixed process.
- Multi-agent helps when one prompt cannot hold all the roles or tools.
- It costs more calls and adds coordination problems.
- Module 7 (CrewAI) and Lesson 3.8 show both.
Advanced: How do you decide how much autonomy to give an agent?
Match autonomy to the risk of each action. Reading data can be fully automatic; actions that spend money, send messages or delete things need limits, validation and often human approval.
- Separate read tools from write tools.
- Add approval steps (Lesson 3.7, human-in-the-loop).
- Log every action so it can be audited.
Advanced: Why do agents fail in production, and how do you make them reliable?
Common failures: wrong tool choice, bad arguments, loops, lost context in long runs, and silent tool errors. Reliability comes from narrow tools with clear descriptions, validation, limits, tracing, and evaluation on real tasks.
- Fewer, clearer tools beat many vague ones.
- Trace every run (Module 5).
- Turn every production failure into a test case.
Advanced: How would you explain the trade-off between agent flexibility and predictability to a product manager?
An agent can handle requests nobody planned for, but it may take different paths each time, cost more, and occasionally fail in new ways. A workflow is cheaper and predictable but only handles what was designed.
- Offer a middle way: a workflow with an agentic step and guardrails.
- Back it with numbers: success rate, cost per task, latency.
Key points
- An agent lets the model choose the next step; a workflow fixes the steps.
- ReAct: think, act, observe, repeat, answer.
- Always have a step limit, error handling and a way out.
- Short-term memory lives in the context; long-term memory needs storage and retrieval.
- Use an agent only where open-ended decisions are really needed.
Interview questions
What does the model output when it wants a tool?
A tool-call request - the tool name and arguments - not the result.
Who executes the tool?
Your code, never the model.
What is an observation?
The tool's result, given back to the model.
What is a step limit for?
To stop an agent that loops or never reaches an answer.
What is agentic RAG?
An agent that decides when and what to retrieve, using retrieval as a tool.
What is a planner-executor agent?
One part writes a plan; another carries out each step.
Why give tools clear descriptions?
The model chooses tools from their descriptions.
What is human-in-the-loop?
Pausing the agent for a person to approve or edit before it continues.
Comments
Sign in to leave a comment. Your name and photo come from Google; nothing else is shared.
Loading comments...