Interview guide
Agentic AI and AI agent interview questions (with answers)
Twelve interview questions on AI agents and agentic AI: the agent loop, tool calling, memory, evaluation, guardrails and cost, each with a short model answer.
Short answer: interviewers testing agent skills look for four things: you understand the agent loop, you can design tools and stopping rules, you know how to evaluate an agent, and you think about failure, cost and safety. These twelve questions cover that, with answers you can say aloud in about a minute.
Fundamentals
1. What is an AI agent? A system where a language model chooses actions toward a goal, runs them through tools, reads the results and repeats until done or stopped. See what is agentic AI.
2. Workflow or agent: how do you choose? If the steps can be written in advance, build a workflow: it is cheaper and more predictable. Use an agent only when the path depends on what is found along the way.
3. What is tool (function) calling? The model returns a structured request naming a tool and its arguments; your code validates and runs it and returns the result. The model never runs code itself.
4. How do you stop an agent from looping forever? A maximum number of steps, a cost or time budget, repeated-action detection and a clear "done" condition the model can reach.
Design
5. How do you design a good tool? One clear job, a precise name and description, typed arguments, helpful error messages the model can act on, and safe defaults. Fewer, sharper tools beat many overlapping ones.
6. How does an agent remember things? Short-term memory is the running context. Long-term memory is stored outside the model (a database or vector index) and retrieved when relevant; long runs need summarising. See agent memory.
7. When would you use several agents? When roles are genuinely different (planner, researcher, checker) or work can run in parallel. Otherwise one agent with good tools is simpler. See multi-agent systems.
Quality and safety
8. How do you evaluate an agent? Build a set of realistic tasks with known good outcomes; measure task success, tool choices, steps taken, cost and latency; review failed traces. See LLM evaluation.
9. What is a prompt-injection risk for agents? Text the agent reads (a web page, an email) can contain instructions that try to redirect it. Treat tool output as untrusted data, limit permissions and require approval for risky actions. See guardrails.
10. Which actions need human approval? Anything irreversible or costly: payments, deleting data, sending messages outside the company.
Production
11. How do you control cost? Cache repeated work, use a smaller model for easy steps, cap steps and tokens, and measure cost per successful task rather than per call.
12. What would you log? Every model call, tool call and result with timing and cost, linked by a trace id, so a bad run can be replayed and diagnosed.
How to practise
Build one small agent end to end, evaluate it on ten tasks and write down what failed. That story is stronger in an interview than a list of definitions. More questions: LLM interview questions.