Skip to content

Agentic AI Interview Questions

Questions on tool use, orchestration, guardrails and evaluation of AI agents.

mathshian•5 Nov 2026
An AI agent is a system where a model decides which actions to take, such as calling tools, to reach a goal, observing the results and continuing until it finishes. The loop of reasoning, acting and observing is what separates it from a single prompt and response.
Use a fixed workflow when the steps are known, because it is cheaper, faster and easier to test. Use an agent when the path depends on intermediate results and cannot be fixed in advance. Many strong systems combine both.
You describe each tool with a name, purpose and parameter schema. The model returns a structured request to call a tool, your code executes it and returns the result to the model, which continues. Validate arguments and permissions in your code, never trusting the model's request blindly.
MCP is an open standard for connecting models to external tools and data sources through a common interface. A tool server exposes capabilities once and any compatible client can use them, which reduces custom integration work. You still need authentication, scoping and review of what each server can do.
Split responsibilities so each agent has a clear role, limited tools and defined handoffs, with a coordinator or shared state. It is worth it when tasks are genuinely separable or need different tools and contexts. Otherwise a single agent is simpler, cheaper and easier to debug.
Set limits on steps, tokens, time and tool calls, detect repeated actions, and add a fallback that escalates to a human. Log every step so loops can be diagnosed, and test with adversarial and ambiguous inputs.
Least-privilege access to tools, input and output validation, approval for high-impact actions, rate and spend limits, audit logs and a kill switch. Separate read actions from write actions and require stronger checks for the latter.
Treat all tool output and retrieved content as untrusted data. Do not let it change permissions, restrict what actions a given step can trigger, strip or flag instruction-like text and require confirmation before sensitive actions that follow reading external content.
Test task success on a set of realistic scenarios, not only final answers but the trajectory: whether the right tools were called with correct arguments and with an efficient number of steps. Track cost, latency and failure categories, and replay failed runs from logs.
Use short-term state in the context, summaries to compress history, and external stores such as databases or vector indexes for long-term facts. Decide explicitly what to store and how to expire or correct it, since wrong memories persist.
Non-determinism, compounding errors across steps, hidden costs, unclear failure modes and security exposure through tools. Strong tracing, evaluation sets, staged rollout and human oversight on important actions address most of these.
The agent pauses for a person to review or approve at chosen points. Place the human before irreversible or high-value actions and where confidence is low, and make the decision easy with the agent's reasoning and evidence shown.