Agent loops and architecture
The model, the loop and the stop condition. When an agent beats a fixed workflow, and when it only adds cost and variance.
- ReAct
- workflow vs agent
- stop conditions
AI Agent Interviews is built only for engineers who build agents. It covers agent loops, tool design, context engineering, memory, multi-agent orchestration, evals, safety and agentic system design, and grades each answer the way a hiring panel would.
Agent roles add a layer on top of standard coding and system design rounds: judgment about a planner that is non-deterministic, expensive and able to take actions. These are the areas that layer is made of.
The model, the loop and the stop condition. When an agent beats a fixed workflow, and when it only adds cost and variance.
Tools are an interface for a model, not a human. Names, schemas, error messages, granularity and safe side effects.
What goes into the window at each step, and what stays out. Budgets, compaction, retrieval on demand and cache-friendly prompts.
Working, episodic and long-term memory. What to write, when to read it back, how to forget, and who is allowed to see it.
Plan-then-execute versus step-by-step, replanning after failure, self-critique, and spending reasoning tokens where they pay off.
Orchestrator and workers, handoffs, parallel subagents and shared state, plus the token bill and the coordination failures that come with them.
Grading outcomes and trajectories, reliability across repeated trials, LLM judges you can trust, and regression suites that catch drift.
Indirect prompt injection, data exfiltration, least privilege, sandboxing and the human approval points a consequential action needs.
How agents discover and call tools through the Model Context Protocol, how agents talk to agents, and where trust and authorisation live.
Retries and timeouts, durable execution and resumable runs, loop budgets, model routing, streaming and tracing every step.
Agents that edit repositories, run commands and drive browsers or desktops: sandboxes, verification loops and blast radius.
The full design round: scope the autonomy, draw the loop, define the tools, budget the context, plan evals and design for failure.
Agent interviews reward candidates who find where a failure actually enters the system. The prompt is rarely the fix. Here is the shape of a worked answer on this site.
“Your support agent refunded the same order twice. Walk me through how that happened, and how you would make it impossible.”
What the interviewer is testing: whether you treat a model as a component that retries, forgets and runs concurrently, and put the guarantee somewhere a model cannot break it.
Derive an idempotency key from the business intent (order and action), never from the individual call, and have the payments service deduplicate on it. A repeated key returns the original refund with a clear status, so the model sees “already refunded”, not an error it might retry.
Write each tool result to a durable step log before the model takes its next turn, and resume from that log. Cap writes per run, and put refunds above a threshold behind a policy check or human approval.
Add a fault-injection eval that times out the refund call after it commits, run it many times, and require exactly one refund every time. Agents are probabilistic, so a single passing run proves little.
Questions across all twelve areas, each with a note on what a strong answer covers and the level it is pitched at.
Read the questions → GuideA seven-step method for the design round, worked end to end on an agent that is allowed to move money.
Learn the method → ReferenceThe vocabulary interviewers expect, from ReAct and pass^k to context rot and the lethal trifecta, each defined in plain words.
Open the glossary →You ship agents to users and want to explain every design decision under pressure, from the tool schema to the eval suite.
Your system design is strong. You need the agent layer on top of it: non-determinism, context limits and actions with consequences.
You know models and retrieval. Agent loops are graded on orchestration, reliability and safety, and those are learnable.
You build the runtime other teams use: tool registries, sandboxes, durable execution, tracing and policy enforcement.
You put agents into real enterprise systems, where permissions, audit trails and failure handling decide the outcome.
You want a shared bar for agent roles: questions that separate demo builders from people who can run agents in production.
Every answer says what you would choose, what it costs and when you would choose differently. Definitions live in the glossary.
Weak, Hire and Strong Hire lines show the gap between an answer that sounds right and one that gets an offer.
Frameworks change every month. The site teaches the loop, the failure modes and the guarantees, and dates anything version-specific.
No made-up “asked at company X” claims, no fake statistics and no invented interview loops. When public data is thin, the page says so.
An AI agent interview is a technical interview for engineers who build systems where a language model chooses actions in a loop: it calls tools, reads the results and decides what to do next. Beyond general coding and system design, it tests agent-specific judgment: when an agent is the right design, how to define tools, how to manage context and memory, how to evaluate non-deterministic behaviour and how to keep an agent safe when it reads untrusted content.
Twelve areas cover most of what is asked: the agent loop and architecture, tool design and function calling, context engineering, memory, planning and reasoning, multi-agent systems, agent evaluation, safety and prompt injection, protocols such as MCP and A2A, production reliability, cost and latency, coding and computer-use agents, and agentic system design.
Classic system design reasons about deterministic services, throughput and storage. Agentic system design adds a non-deterministic planner in the critical path, so the interview also asks where autonomy is allowed, which actions need approval, how the context window is budgeted, how a run recovers after a crash, how side effects are made idempotent and how quality is measured before and after launch. The agentic system design guide walks through it step by step.
In a workflow, code decides the sequence of steps and the model fills in individual steps. In an agent, the model decides the next step at run time, including which tool to call and when to stop. Workflows are cheaper, faster and easier to test. Agents earn their cost when the path through a task cannot be known in advance. Interviewers often reward the candidate who chooses the simpler design when it is enough.
You should be able to explain what the Model Context Protocol standardises: a client inside an agent host connects to servers that expose tools, resources and prompts over a defined transport. Interviewers care less about the specification details than about the judgment around it: tool discovery, authorisation, trusting third-party servers and the prompt injection risk that tool descriptions and results carry.
Build a small agent from scratch without a framework so you understand the loop, the tool dispatch and the stop conditions. Then practise explaining trade-offs out loud: workflow versus agent, one agent versus several, what goes in context, how you would evaluate it and what could go wrong in production. Work through an agentic system design end to end at least three times, and learn the vocabulary well enough to define each term in one sentence.
Software engineers, ML engineers and applied AI engineers interviewing for roles that build agents, agent platforms or agent-powered products, along with engineering leaders who interview for those roles and want a shared standard.
Yes. Everything published on the site today is free to read, with no account required.
Start with the questions, then practise the design round until the method is automatic.