In this article
Foundations
What is agentic AI?
Agentic AI describes systems in which a language model controls its own next steps, using tools and feedback, instead of following a fixed script. OpenAI separates agents from simple chatbots and single-turn large language model (LLM) calls or sentiment classifiers, which use a model but do not use it to control workflow execution (OpenAI, April 2025).
Why it is asked: it checks that you can define the term without hype. Read the full explanation: AI agent architecture.
What is the difference between agentic AI and an AI agent?
An AI agent is one system, a model with tools in a loop. Agentic AI is the broader description of behavior: a system acting with some autonomy toward a goal. In practice interviewers use the terms loosely, so state the definition you mean, then say how much control the model has over its steps.
Why it is asked: it tests precise vocabulary. Read the full explanation: AI agent architecture.
What is the difference between agentic AI and RAG?
Retrieval-augmented generation fetches relevant text once and gives it to the model; an agent decides repeatedly what to fetch or do. Anthropic contrasts its multi-agent research system, which plans, searches iteratively and synthesises, with static retrieval of a fixed set of chunks (Anthropic, June 2025). Retrieval can be a tool an agent uses.
Why it is asked: it separates a lookup step from a control loop. Read the full explanation: AI agent architecture.
What is the difference between an agent and a workflow?
A workflow runs paths written in advance; an agent chooses its own path. Anthropic defines workflows as models and tools orchestrated through predefined code paths and agents as models that dynamically direct their own process and tool use (Anthropic, December 2024). Anthropic recommends workflows for well-defined tasks that need predictability, and agents for open-ended problems where the number of steps cannot be known in advance. Choose a workflow when the steps can be listed.
Why it is asked: restraint is the senior signal. Read the full explanation: AI agent architecture.
Text description of the diagram
- Anthropic recommends workflows for well-defined tasks that need predictability and agents for open-ended problems where the number of steps cannot be known in advance.
- Agents need step limits, approval for risky actions and tracing because they cost more and can compound errors.
What is a good example of agentic AI?
A research assistant is a clear example: it plans a question, runs several searches, reads results, decides what is missing and writes a cited report. Anthropic describes such a system, with a lead agent that plans and spawns subagents that search (Anthropic, June 2025). Coding assistants that edit files and run tests follow the same loop.
Why it is asked: it tests whether you can ground the idea in a real system. Read the full explanation: AI agent architecture.
What are the core components of an agent?
A model, tools and instructions, in OpenAI's framing: the model reasons and decides, tools act on external systems, and instructions set behavior and guardrails (OpenAI, April 2025). Add memory for state across turns and an orchestration layer that runs the loop and enforces limits.
Why it is asked: it checks you can draw the system. Read the full explanation: AI agent architecture.
Tools and protocols
How does tool use or function calling work?
The application describes available functions to the model with names and argument schemas. The model replies with a structured call naming a function and arguments, the application runs it, and the result goes back to the model as input. The model never executes anything itself; your code does.
Why it is asked: it is the mechanism under every agent. Read the full explanation: tool use, function calling and the Model Context Protocol.
What is the Model Context Protocol?
The Model Context Protocol (MCP) is an open protocol that standardises how applications give language models context and tools. A host application connects through clients to servers, and servers offer resources, prompts and tools, using JavaScript Object Notation (JSON) remote procedure call (RPC) messages, known as JSON-RPC (MCP specification, 2025-06-18). Servers can also ask the host for extra input, and the specification adds consent and privacy principles that implementors should build into their applications.
Why it is asked: it tests current ecosystem knowledge. Read the full explanation: tool use, function calling and the Model Context Protocol.
How do you make tool arguments reliable?
Give each tool a typed schema with enums where possible, validate arguments before running, and return error messages the model can act on, such as which field was wrong and the expected format. Constrained or structured output reduces malformed arguments at the source.
Why it is asked: most agent failures start in tool calls. Read the full explanation: getting reliable structured output from a language model.
How should an agent handle a tool failure?
Return the error as a readable observation, let the model retry with corrected input a bounded number of times, and then stop and report. Make side-effecting tools idempotent so a retry cannot repeat the action, and hand control back to the user when the agent cannot recover.
Why it is asked: it tests failure design, not the happy path. Read the full explanation: AI agent architecture.
Knowing it is half the job. Saying it is the other half.
Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.
Start Free Trial →Memory and context
What is context engineering?
Context engineering is curating the full set of tokens a model sees at inference, including instructions, tools, external data and message history. Anthropic presents it as the natural progression of prompt engineering (Anthropic, September 2025). The goal is the smallest set of high-signal tokens that gets the result.
Why it is asked: long-running agents live or die by it. Read the full explanation: AI agent architecture.
How do agents manage long-running context?
Four techniques recur: compaction, which summarises a near-full conversation and continues from the summary; structured note-taking to storage outside the window; sub-agents that return condensed summaries; and just-in-time retrieval of data by reference (Anthropic, September 2025). Pick the technique by what the task needs to remember: exact details favour notes, long histories favour compaction.
Why it is asked: it tests practical memory design. Read the full explanation: AI agent architecture.
What is the difference between short-term and long-term agent memory?
Short-term memory is what sits in the context window for the current task. Long-term memory is stored outside the model, commonly in a vector store searched by nearest-neighbor methods, and retrieved when relevant (Weng, June 2023). The window is finite, so selection matters.
Why it is asked: it checks you separate storage from attention. Read the full explanation: AI agent architecture.
Reliability and evaluation
Why do agents fail on long tasks?
Per-step failures compound. If each step succeeds with chance 0.95 and steps are independent, ten steps succeed together with chance 0.5987 and twenty 0.3585, so long runs need checkpoints, limits and recovery.1 Real steps are correlated, so treat this as intuition, not a forecast.
Why it is asked: it tests reasoning about systems, not models. Read the full explanation: AI agent architecture.
What is pass^k and why use it?
Pass^k is the chance an agent succeeds on all k independent trials of the same task. It measures consistency. The tau-bench paper (June 2024) uses it and reported that the strongest function-calling agents it tested, such as gpt-4o, succeeded on under half of tasks and fell under 25% at pass^8 in the retail domain (Yao et al., 2024).
Why it is asked: production needs consistency, not best-of-n. Read the full explanation: AI agent architecture.
How do you evaluate an agent beyond the final answer?
Check the trajectory: which tools were called, in what order, with what arguments, and whether the end state is correct. Anthropic advises judging the final state for tasks that change state, using a rubric-based model judge with human testing alongside, and starting with a small set of about 20 queries (Anthropic, June 2025).
Why it is asked: agents can be right by luck or wrong by path. Read the full explanation: AI agent architecture.
How do you stop an agent stuck in a loop?
Cap steps and spend, and watch for repeated identical actions or no progress between turns. When a limit trips, stop, summarise the state and return control to the user instead of retrying. Log every turn so you can see where the loop began.
Why it is asked: unbounded loops are unbounded cost. Read the full explanation: observability for language-model apps.
What is Reflexion?
Reflexion is a method in which an agent writes verbal reflections on feedback from its attempts and stores them in memory to guide later attempts, without updating model weights. The paper reports 91% pass@1 on the HumanEval coding benchmark (Shinn et al., 2023).
Why it is asked: it tests knowledge of self-improvement loops. Read the full explanation: AI agent architecture.
How do you debug an agent that misbehaves in production?
Record every model call, tool call, argument and result in a trace, then replay the failing run and find the first step that went wrong. Aggregate traces to see patterns, such as one tool failing often. Anthropic notes full tracing is needed while avoiding monitoring of individual conversation contents (Anthropic, June 2025).
Why it is asked: production debugging separates builders from demos. Read the full explanation: observability for language-model apps.
Safety and oversight
What guardrails does an agent need?
Layered ones: input filters, rules-based checks, model-based checks and access controls on tools. OpenAI says a single guardrail is unlikely to be enough and that guardrails should be paired with authentication, authorisation and standard security measures (OpenAI, April 2025). Think of them as stacked filters: each catches what the others miss.
Why it is asked: it checks defence in depth. Read the full explanation: human in the loop for AI agents.
When should a human approve an agent's action?
Before actions that are irreversible, costly or externally visible, such as payments, deletions or messages to customers. Low-risk reads can run automatically. The MCP specification's trust-and-safety principles go further: hosts must obtain explicit user consent before invoking any tool, though the protocol itself cannot enforce it (MCP specification, 2025-06-18).
Why it is asked: it tests how you set the autonomy boundary. Read the full explanation: human in the loop for AI agents.
Can you trust a tool's description?
Not by default. The MCP specification says descriptions of tool behavior should be considered untrusted unless obtained from a trusted server, because tools represent arbitrary code execution (MCP specification, 2025-06-18). Review third-party tools before connecting them, and prefer a short list of tools you have inspected.
Why it is asked: tool descriptions enter the model's context. Read the full explanation: tool use, function calling and the Model Context Protocol.
Multi-agent systems and design
When would you use more than one agent?
When one agent's context or tool set becomes too large, or when subtasks can run independently. Anthropic's research system beat a single-agent baseline by 90.2% on its internal evaluation but used about fifteen times the tokens of chat (Anthropic, June 2025). OpenAI advises starting with one agent.
Why it is asked: it tests cost-aware design. Read the full explanation: AI agent architecture.
How would you design a research agent?
Use an orchestrator that plans, saves the plan to memory and spawns subagents with clear task descriptions and output formats; collect their findings, decide if more work is needed, then attribute claims to sources. Plan for checkpoints because errors compound in long runs (Anthropic, June 2025). Cover cost, evaluation and tracing.
Why it is asked: it is the common design prompt. Read the full explanation: system design and machine learning system design.
How can I prepare for an agentic AI interview?
Build a small agent yourself with two tools, a step limit and a trace. Then practise explaining the loop, one failure you saw and how you measured reliability. Read the primary sources on this page and rehearse aloud; AI engineer interview questions covers neighbouring topics.
Why it is asked: it reveals whether you have built anything. Read the full explanation: AI agent architecture.
What skills are needed for agentic AI roles?
Prompt and context design, tool and interface design, evaluation methods, observability and debugging, and security basics, on top of ordinary software engineering. Interviewers also look for judgment: choosing the simplest design that works and naming its failure modes. See prompt engineering interview questions for the prompt side.
Why it is asked: it frames what the loop will probe. Read the full explanation: interview loops.
- Define terms precisely: agent, workflow, tool call, context, guardrail.
- Argue for the simplest design that works before proposing agents.
- Reliability is measured over repeated trials, and long runs need limits and traces.
- Put approval in front of irreversible actions and treat tool descriptions as untrusted.
Sources
- Building effective agents — Anthropic, 19 Dec 2024
- A practical guide to building agents — OpenAI, 7 Apr 2025
- How we built our multi-agent research system — Anthropic, 13 Jun 2025
- Effective context engineering for AI agents — Anthropic, 29 Sep 2025
- ReAct: Synergizing Reasoning and Acting in Language Models (arXiv 2210.03629 v3) — arXiv (Yao et al.), 10 Mar 2023
- Reflexion: Language Agents with Verbal Reinforcement Learning (arXiv 2303.11366 v4) — arXiv (Shinn et al.), 10 Oct 2023
- tau-bench (arXiv 2406.12045) — arXiv (Yao et al.), 17 Jun 2024
- LLM Powered Autonomous Agents — Lil'Log (Weng), 23 Jun 2023
- Model Context Protocol specification 2025-06-18 — Model Context Protocol project, 18 Jun 2025