What Are AI Agents and Why Do Interviewers Ask About Them
AI agents use a language model as the reasoning engine — deciding what actions to take, executing them via tools, observing results, and iterating until a goal is achieved. Unlike single prompt-response interactions, agents maintain state across multiple steps.
Agent questions test your ability to design multi-step workflows, handle failure and recovery, manage state, and reason about when autonomous behavior is appropriate vs when human oversight is needed.
The ReAct Pattern
The foundational agent loop:
The model reasons about what to do next, calls a tool, observes the result, then reasons again. Simple and effective for sequential information gathering.
| Strength | Weakness |
|---|---|
| Simple to implement | Greedy — decides one step at a time without planning |
| Good for research/data tasks | Can get stuck in loops on complex tasks |
| Easy to debug (visible reasoning) | Inefficient paths when steps have dependencies |
Plan-and-Execute
Separates planning from execution:
In practice, hybrid approaches work best: plan at a high level, execute steps with ReAct-style reasoning, and replan when observations invalidate assumptions.
Tool Design
"I would give the agent specific tools — a search tool and a SQL query tool — rather than a generic get-information tool, because specific schemas produce more reliable behavior."
Memory Systems
The design challenge is deciding what to remember and what to forget. Storing everything is expensive and degrades retrieval quality. Summarization and pruning heuristics are necessary.
Multi-Agent Coordination
| Pattern | When to use |
|---|---|
| Hierarchical | Supervisor delegates to specialized workers — clear task decomposition |
| Pipeline | Agents pass work sequentially (research, write, review) — assembly line |
| Collaborative | Agents discuss and debate — consensus-based decisions on ambiguous tasks |
Safety and Control
How to Explain This in an Interview
Not every AI feature needs an agent. If the task is a single retrieval + generation step, a RAG pipeline is simpler and more reliable. Showing this judgment is more impressive than defaulting to the most complex architecture.
Common Interview Questions
- The ReAct Pattern — The foundational agent loop
- Plan-and-Execute Agents — Separating planning from execution
- Multi-Agent System Design — Coordinating specialized agents
- Agent Tool Selection — Designing tools for agent systems
- Agent Memory Systems — Short-term, long-term, and working memory
What to Practice Next
Browse all AI Agents & Tool Use interview questions for design problems with walkthroughs.
Next module: How to Practice System Design Out Loud