Practise AI Agents one question at a time. Answer out loud or in writing, get graded, and see exactly what you missed.
What is an AI agent, and how is it different from a single LLM call?
An AI agent is an LLM given a goal, a set of tools, and permission to take several steps on its own. A single LLM call is one turn: text in, text out, then it is over.
| Single LLM call | Agent | |
|---|---|---|
| Steps | Exactly one | Keeps going until the goal is met |
| Who picks the next action | Your code | The model, at runtime |
| Tools | None, or one round you handle | Called repeatedly, results fed back in |
| State | Stateless | Carries context across steps |
| Cost and latency | Predictable | Varies run to run |
The real difference is control. You trade a predictable path for the ability to handle tasks whose steps are unknown up front. That is why every agent needs step limits, spend budgets, and logs.
Missed:
“So function calling is how the model gets to do things outside itself. Up front you describe your functions to it - a name, what it's for, and a JSON schema for the inputs. When the model decides it needs one, it doesn't reply in prose, it sends back something like get_weather with city set to Paris. It never executes anything itself: my code runs that function and passes the result back into the conversation, and the model carries on from there. Why it's the foundation: without tools the model is stuck with whatever it learned in training. It can't check today's order status or actually send an email. Tools are what let the loop touch the real world, and once you have that one mechanism, search or memory are basically just more tools you plug in.”
Knew itCovers the mechanism correctly: typed function definitions, the model returns a structured call, your code executes it. Doesn't mention that selection is probabilistic so validation and permissions belong in your handler, not the prompt.
Missed: Doesn't note that tool selection is probabilistic, so validation, permissions, and rate limits need to live in the handler rather than the prompt.
Get your own answers graded
Sign up free. Your account comes with 50 credits for grading, and it remembers what you missed.
What it covers
All 54 questions
Agent basics and the agent loop
What makes a system an agent: the reason-act-observe loop, ReAct, the system prompt, workflows versus agents, and when an agent is worth building.
- What is an AI agent, and how is it different from a single LLM call?
- Walk me through the reason-act-observe loop that makes a system agentic.
- What is the difference between a deterministic workflow and an agentic workflow?
- What is ReAct, and why was it influential?
- What role does the system prompt play in an agent?
- A product team says "we need an AI agent" for a business process. How do you decide what to actually build? Pro
Tool use, MCP and computer use
How agents act: the tool-call round trip, writing tool definitions, how many tools to expose, parallel calls, structured outputs, MCP, and computer-use and browser agents that drive a GUI when no API exists.
- What is tool use (function calling), and why is it called the foundation of agents?
- Describe the full round trip of one function call between your application and the model.
- What is the Model Context Protocol (MCP), and what problem does it solve? Pro
- What makes a good tool definition, and how would you write its description? Pro
- How does parallel tool calling work, and what common mistake silently breaks it? Pro
- Why do structured outputs matter inside agent steps, and how do the major providers enforce them? Pro
- How do you decide which tools and how many to expose to an agent, and what goes wrong with too many? Pro
- How do computer-use agents work, and why are they harder to build reliably than API-based agents? Pro
- Compare DOM-based and vision-based browser agents. What risks do browser agents introduce? Pro
Reasoning and workflow patterns
How an agent plans and improves its work: ReAct versus plan-then-execute, reflection, chaining, routing, evaluator-optimizer and agentic RAG.
- Compare ReAct-style interleaved reasoning with plan-then-execute. When does each win? Pro
- What is reflection in agent design, and when does it actually pay off? Pro
- Beyond the supervisor, what orchestration patterns should an engineer know? Pro
- What is agentic RAG, and how does it differ from classic retrieval-augmented generation? Pro
Memory and context management
What goes into the context window and what is stored outside it: memory types, context engineering, compaction, subagent isolation and long-term memory.
- What kinds of memory can an agent have? Pro
- Why do long-running agents exhaust their context, and what are the main mitigations? Pro
- What are subagents, and how do they help with context management? Pro
- What is context engineering, and why is it considered the successor to prompt engineering for agents? Pro
- Design a long-term memory system for an agent. What are write policies and why do they matter? Pro
- How does context compaction work, and what must be preserved for it to be safe? Pro
- How would you manage context for an agent that works over several days? Pro
Multi-agent systems
Splitting work across agents: supervisors, handoffs, how agents communicate including A2A, and when multi-agent is worth its extra cost.
- What is a multi-agent system, and why do most teams start with a single agent? Pro
- Describe the supervisor (orchestrator-workers) pattern and its failure points. Pro
- What are handoffs in the OpenAI Agents SDK, and how do they differ from a supervisor calling subagents as tools? Pro
- How do agents in a multi-agent system communicate, and where does Google's A2A protocol fit? Pro
- When does a multi-agent architecture actually beat a single agent, given that it multiplies token cost? Pro
Agent frameworks and SDKs
The main agent frameworks and SDKs (LangGraph, CrewAI, AutoGen, the OpenAI and Claude SDKs), how to choose one, and when to skip frameworks altogether.
- Name the major agent frameworks in 2026 and what each is best known for. Pro
- When should you skip agent frameworks entirely, and what does the no-framework version look like? Pro
- How does LangGraph model an agent, and what do checkpointing and interrupts buy you? Pro
- What does the Claude Agent SDK give you beyond the raw Anthropic API, and when would you use each? Pro
- What are the core primitives of the OpenAI Agents SDK, and how do they compose? Pro
- Compare LangGraph, CrewAI, and AutoGen (Microsoft Agent Framework). How do you choose? Pro
Reliability and durable execution
Keeping agents correct over time: tool failures, idempotency, stopping endless loops, common failure modes, streaming, resuming and runs that survive crashes.
- How should an agent handle a failing tool call? Pro
- Why does idempotency matter for agent tools, and how do you achieve it? Pro
- How do you prevent an agent from looping forever? Pro
- What are the classic failure modes of deployed agents, and how do you mitigate each? Pro
- How do you handle streaming, long turns, and resumability in an agent's execution? Pro
- How would you make an agent that runs for hours or days durable against crashes, deploys, and restarts? Pro
Evaluation, observability and cost
Measuring and running agents in production: grading trajectories, benchmarks, eval pipelines, tracing, and the levers for cost and latency.
- How does evaluating an agent differ from evaluating a single-prompt LLM feature? Pro
- Which benchmarks are commonly used for agents, and what does each actually measure? Pro
- What does observability look like for an agent in production? Pro
- What levers do you have to control an agent's cost and latency? Pro
- How do you build an evaluation pipeline for non-deterministic agent trajectories at scale? Pro
Security, guardrails and human oversight
Keeping agents safe: approval gates, sandboxing and permissions, prompt injection, guardrails, vetting MCP servers and handling production credentials.
- What is human-in-the-loop in agent design, and when is an approval gate required? Pro
- How do you sandbox and permission an agent's tools? Pro
- What is prompt injection in the agent setting, and what is the lethal trifecta? How do you mitigate it? Pro
- How do you implement guardrails around a production agent? Pro
- What are the security and trust risks of third-party MCP servers, and how would you vet one? Pro
- Design the security architecture for an agent that operates with production credentials. Pro
All questions
Showing of 54What is an AI agent, and how is it different from a single LLM call?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
An AI agent is an LLM given a goal, a set of tools, and permission to take several steps on its own. A single LLM call is one turn: text in, text out, then it is over.
| Single LLM call | Agent | |
|---|---|---|
| Steps | Exactly one | Keeps going until the goal is met |
| Who picks the next action | Your code | The model, at runtime |
| Tools | None, or one round you handle | Called repeatedly, results fed back in |
| State | Stateless | Carries context across steps |
| Cost and latency | Predictable | Varies run to run |
The real difference is control. You trade a predictable path for the ability to handle tasks whose steps are unknown up front. That is why every agent needs step limits, spend budgets, and logs.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Walk me through the reason-act-observe loop that makes a system agentic.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
An agentic system runs a loop: the model reasons about what to do next, acts by calling a tool, then observes the real result. The observation is appended to the context, so the next reason step is better informed. The loop repeats until the model replies with an answer instead of a tool call.
while True:
step = model(messages) # reason: decide the next action
if not step.tool_calls:
return step.text # model answers -> loop ends
result = run_tool(step.tool_calls) # act
messages += [step, result] # observe: real output back into context
Two things make this agentic. The observation is ground truth from a live system, not the model's guess. And the model, not your code, picks each next step. An error is just another observation, so the model can retry with different arguments.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is tool use (function calling), and why is it called the foundation of agents?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Tool use, also called function calling, lets you hand the model a list of typed function definitions. The model never runs code. It returns a structured request that names one tool and its arguments. Your code runs it and passes the result back.
{ "type": "tool_use", "name": "get_order", "input": { "order_id": "A-1187" } }
It is the foundation because a raw model can only produce text from what it learned in training. Tools give it fresh reads of the world and real writes to it. Almost every other agent capability ships as just another tool: retrieval, memory, even calling another agent.
The tradeoff is that the model decides but your code executes. Tool selection is probabilistic, so validation, permissions and rate limits belong in your handler, never in the prompt.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Describe the full round trip of one function call between your application and the model.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
One function call takes two API calls, not one. The model never runs your code. It only asks you to run it, and you send the result back.
1. Your app sends the messages plus the tool schemas
2. Model replies with a tool_use block: name, input, and an id
(stop_reason "tool_use" - no final text yet)
3. Your app runs the real function
4. Your app appends that assistant turn, then a user turn holding a
tool_result block whose tool_use_id matches the same id
5. Resend the whole message list; the model reads the result and answers
Two details prove you have built this. The API is stateless and remembers nothing between calls, so step 5 resends every earlier turn, including the tool_use one. And the ids must pair exactly, or the request is rejected.
OpenAI names the same pieces tool_calls and role: "tool" with tool_call_id. The loop can repeat: the model may ask for another call before it stops.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between a deterministic workflow and an agentic workflow?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A deterministic workflow has its steps fixed in code, so every run follows the same path. An agentic workflow lets the model pick the next step at runtime, so the path changes with the input.
| Deterministic workflow | Agentic workflow | |
|---|---|---|
| Picks the next step | Your code | The model |
| Path across runs | Same | Varies |
| Testing | Assert on the output | Judge the whole trajectory |
| Cost and latency | Predictable | Open-ended |
| Best for | Known, stable steps | Branching, open-ended tasks |
The trade-off is control versus flexibility. Fixed steps buy repeatable runs, cheap debugging, and a predictable bill. Agency handles cases you never listed.
Most production systems mix both: a fixed pipeline with one agentic step where the branching is unknown. Start deterministic, and add agency only where fixed logic keeps failing.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is ReAct, and why was it influential?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
ReAct, short for Reasoning and Acting, is a prompting pattern from a 2022 paper by Yao et al. It makes one model interleave short reasoning steps with tool actions in a single trace.
Thought: I need Acme's current CEO.
Action: search("Acme CEO")
Observation: Jane Doe, since 2024.
Thought: That answers it.
Answer: Jane Doe.
It was influential because it joined two things that were separate. Chain-of-thought, where the model writes its reasoning out loud, could plan but not check facts. Tool-using systems could act but not plan. ReAct grounds each reasoning step in a real observation, so wrong turns get caught mid-task.
Today most agents run this shape through native tool-calling APIs instead of parsing Thought: and Action: text.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What role does the system prompt play in an agent?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The system prompt is the agent's standing instructions. It is the one block of context that stays fixed while the reason-act-observe loop rewrites everything else.
It sets the role and scope, the policy for using tools, and the rule for when to stop and answer.
Role and scope: what you are; what you must refuse
Tool policy: search before answering; never write without approval
Stopping rule: stop when the task is done; ask if inputs are missing
Output format: short markdown; cite the file you read
Two things matter in practice. Keep it stable, because a fixed prefix is what prompt caching can reuse. Keep it small: durable policy belongs here, and per-task detail belongs in the user message.
It steers the model but enforces nothing. Text arriving from a tool can still argue against it.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the Model Context Protocol (MCP), and what problem does it solve?
What kinds of memory can an agent have?
What is a multi-agent system, and why do most teams start with a single agent?
What is human-in-the-loop in agent design, and when is an approval gate required?
Name the major agent frameworks in 2026 and what each is best known for.
What makes a good tool definition, and how would you write its description?
How does parallel tool calling work, and what common mistake silently breaks it?
Why do structured outputs matter inside agent steps, and how do the major providers enforce them?
Compare ReAct-style interleaved reasoning with plan-then-execute. When does each win?
What is reflection in agent design, and when does it actually pay off?
Describe the supervisor (orchestrator-workers) pattern and its failure points.
What are handoffs in the OpenAI Agents SDK, and how do they differ from a supervisor calling subagents as tools?
Beyond the supervisor, what orchestration patterns should an engineer know?
Why do long-running agents exhaust their context, and what are the main mitigations?
What are subagents, and how do they help with context management?
How should an agent handle a failing tool call?
Why does idempotency matter for agent tools, and how do you achieve it?
How do you prevent an agent from looping forever?
How does evaluating an agent differ from evaluating a single-prompt LLM feature?
Which benchmarks are commonly used for agents, and what does each actually measure?
What does observability look like for an agent in production?
What levers do you have to control an agent's cost and latency?
When should you skip agent frameworks entirely, and what does the no-framework version look like?
How do you decide which tools and how many to expose to an agent, and what goes wrong with too many?
What is agentic RAG, and how does it differ from classic retrieval-augmented generation?
What is context engineering, and why is it considered the successor to prompt engineering for agents?
How does LangGraph model an agent, and what do checkpointing and interrupts buy you?
What does the Claude Agent SDK give you beyond the raw Anthropic API, and when would you use each?
What are the core primitives of the OpenAI Agents SDK, and how do they compose?
Compare LangGraph, CrewAI, and AutoGen (Microsoft Agent Framework). How do you choose?
How do computer-use agents work, and why are they harder to build reliably than API-based agents?
Compare DOM-based and vision-based browser agents. What risks do browser agents introduce?
How do you sandbox and permission an agent's tools?
What is prompt injection in the agent setting, and what is the lethal trifecta? How do you mitigate it?
Design a long-term memory system for an agent. What are write policies and why do they matter?
How does context compaction work, and what must be preserved for it to be safe?
How do agents in a multi-agent system communicate, and where does Google's A2A protocol fit?
How do you implement guardrails around a production agent?
What are the classic failure modes of deployed agents, and how do you mitigate each?
How do you handle streaming, long turns, and resumability in an agent's execution?
What are the security and trust risks of third-party MCP servers, and how would you vet one?
A product team says "we need an AI agent" for a business process. How do you decide what to actually build?
When does a multi-agent architecture actually beat a single agent, given that it multiplies token cost?
How would you make an agent that runs for hours or days durable against crashes, deploys, and restarts?
How do you build an evaluation pipeline for non-deterministic agent trajectories at scale?
Design the security architecture for an agent that operates with production credentials.
How would you manage context for an agent that works over several days?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
AI Agents in pictures.
A quick recap of AI Agents in 38 short animated pictures, one idea at a time. About 10 min to get the whole topic back in your head before you walk in. Pause any picture, slow it down, or step through it.
Pro The first chapter is free to play. The other 34 pictures come with Pro.
AI Agents cheatsheet
- The agent loop01
- Tool calling02
- Planning, reflection & RAG03
- Memory & context04
- Multi-agent systems05
- Frameworks & SDKs06
- Failures & recovery07
- Guardrails & security08
- Evals, tracing & cost09
- Computer & browser agents10
- The model11
- + 5 more inside
This picture is part of Pro. The first chapter is free to play; the other 34 pictures come with Pro.
Get Pro · $10/mo Already Pro? Sign in47 of 54 AI Agents answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.