Skip to content
QUESTION BANK / 332 WORKED QUESTIONS

Agent interview questions.
Worked the way panels grade them.

Answer out loud before you open the worked answer. Then read the follow-ups that change one constraint, and compare what you said with the Weak, Hire and Strong Hire lines.

332 questions across all topics
  1. 01
    Model API foundationseasyConcept

    Walk me through one model API call: what your code sends, what comes back, and what the harness has to handle.

    The warm-up that shows whether you have read a raw reply. The strong answer names the parts of the request, the four parts of the reply, and the branch the harness takes on each stop reason, including the two that are not errors but behave like them.

    Answer available
  2. 02
    Model API foundationseasyDebugEssential

    A model reply comes back with empty content and no error. What do you check before calling it a blank answer?

    The first screening question about model calls. A strong answer names the four fields a response carries, reads the stop reason before the text, and explains why a blank content field is more often a tool request than a blank answer.

    Answer available
  3. 03
    Model API foundationsmediumDebugEssential

    Your harness keeps the last ten messages to save tokens, and the provider sometimes returns 400. Debug it.

    A debugging question that tests whether you know what a message list has to look like. The strong answer finds the cut through a call-and-result pair, explains why it is intermittent, and replaces slicing with trimming in whole units.

    Answer available
  4. 04
    Model API foundationseasyConcept

    We run every model call at temperature zero, so the agent is deterministic. Agree?

    A short question with a long tail. The strong answer separates greedy decoding from determinism, explains why identical calls still differ on real servers, and says what that forces on tests and evals.

    Answer available
  5. 05
    Model API foundationsmediumDebug

    A JSON summary sometimes lists one ticket where there were three, with no prompt change. Find the cause.

    A debugging question about the field most harnesses never read. The strong answer finds a length stop behind a reply that parses, explains how a repair step made it wrong, and fixes the loop so truncated output never becomes a valid object.

    Answer available
  6. 06
    Model API foundationsmediumEstimate

    A step has a 12,000-token prompt and a five-second deadline. Estimate its latency and say what you would change.

    An estimation question that many candidates answer with a guess. The strong answer writes the three-term latency model, shows the deadline is impossible as stated, and names the structural changes that make it possible.

    Free with an account
  7. 07
    Model API foundationsmediumCode

    Your streaming harness dispatches a tool as soon as the first delta names it. What goes wrong, and how do you fix the parser?

    A question about the wire. The strong answer knows that a streamed tool call arrives as fragments keyed by index, accumulates them until the finish reason, parses once, and separates what the user needs to see from what the loop needs to wait for.

    Premium answer
  8. 08
    Model API foundationsmediumDesign

    Forty agents each retry a 429 after exactly one second. Design the retry and rate-limit policy for the fleet.

    A design question with a visible failure in it. The strong answer explains the synchronised retry storm, then layers a shared limiter, honest classification, jittered backoff with a run-level budget, and a circuit breaker.

    Premium answer
  9. 09
    Model API foundationshardDesign

    Move an agent from one model provider to another without rewriting it. What changes, and how do you prove it still behaves the same?

    A design question that separates engineers who have done a provider migration from those who have read about one. The strong answer names the wire differences, confines them to an adapter, and proves equivalence in two layers: plumbing with recorded replays, behaviour with repeated evals.

    Premium answer
  10. 10
    Model API foundationshardTrade-off

    Pick the model for a support agent that calls tools. Walk me through the selection.

    Interviewers ask this to hear whether you select by leaderboard or by method. The strong answer screens on hard requirements, probes with agent-shaped tasks run several times, weighs with weights written in advance, and prices the result per successful task.

    Premium answer
  11. 11
    Model API foundationshardDebug

    The agent reversed a correct, tool-grounded answer when the customer pushed back, and proposed a refund. What failed, and where is the fix?

    An incident question with a tempting wrong fix. The strong answer names the structural failure, explains why a firmer prompt only moves the rate, and puts the control where the money is: actions derive their facts from tools, not from the conversation.

    Premium answer
  12. 12
    Model API foundationsmediumDesign

    The run has thirty seconds. Allocate the time across steps so a cut-off run still returns something useful.

    A design question about time as a budget. The strong answer reserves a wrap-up call first, gives each step a share with a floor and a ceiling, derives max_tokens from the share and the context size, and names what the loop does when the planner says stop.

    Premium answer
  13. 13
    Model API foundationshardDesign

    Your provider retires the model your agent is pinned to in ninety days. Plan the upgrade.

    Operational maturity in one question. The strong answer treats the deprecation as a release with a date: rerun the screen and the probes, compare behaviour per task with repeated runs, change one thing at a time, and switch early with the old model as fallback.

    Premium answer
  14. 14
    Model API foundationshardDebug

    The trace shows a tool result that the tool never produced. Explain how that happens and make it impossible.

    A trace-reading question with a structural answer. The strong answer names the invented observation, finds the loop design that let the model's text count as a result, and rebuilds the loop so only harness-appended results are observations.

    Premium answer
  15. 15
    Model API foundationshardMeasure

    Design the probe set that would catch a silent model revision changing your agent's tool-calling behaviour.

    A measurement question. The strong answer designs probes around the steps an agent takes rather than around chat, writes checks that judge the action, runs them repeatedly to get a rate, and schedules them so a backend change shows up as a number before it shows up as an incident.

    Premium answer
  16. 16
    Model API foundationsexpertDesign

    Design the model-call layer of an agent platform that fifty teams will build on: adapters, limits, retries, deadlines and usage accounting.

    The capstone design for this topic. The strong answer draws one gateway that owns provider adapters, quota buckets per provider limit, classified retries with run-level budgets, deadline propagation, usage attribution per team, and the trace fields that make all of it debuggable, and says what stays with the teams.

    Premium answer
  17. 01
    Loops & harnesseasyConcept

    What is an AI agent? Explain how it differs from a chatbot and from a workflow that happens to call a model.

    The definition question, asked to see whether you can draw the line in code rather than in marketing. The strong answer says who chooses the next step, shows one run as a trace, and names the loop, the tools and the harness that make the difference.

    Answer available
  18. 02
    Loops & harnesseasyConceptEssential

    Write the agent loop on the whiteboard, then list every way a run can end.

    The loop is ten lines; the exits are the interview. A strong answer separates the model's opinion that it is done from the harness's reasons to stop, and says what each exit hands back.

    Answer available
  19. 03
    Loops & harnessmediumTrade-offEssential

    When would you ship a fixed workflow instead of an agent?

    Interviewers ask this to see whether you will reach for autonomy by default. The strong answer is a test you can apply to any step, the arithmetic behind it, and the hybrid most production systems end up with.

    Answer available
  20. 04
    Loops & harnessmediumDebug

    A weather tool returns a 500 and the agent answers with a temperature anyway. Fix the harness.

    The model did not malfunction; it filled a gap the harness left open. The fix spans the error contract, the retry policy and a grounding check on the final answer.

    Answer available
  21. 05
    Loops & harnessmediumConceptEssential

    What does the harness own that the model never should?

    A question about responsibility boundaries disguised as a definition. The strong answer is a short list of things the model may never decide, each with the incident that follows when it does.

    Answer available
  22. 06
    Loops & harnessmediumDebug

    The agent calls the same tool with the same arguments eight times. Debug it from the trace.

    Repetition is a symptom with five common causes, and four of them live in the harness. Find which one from the second call, then add a detector so the next cause is caught in two calls, not eight.

    Free with an account
  23. 07
    Loops & harnesshardDesign

    The agent says the task is done and it is not. Make completion something the runtime checks.

    Premature victory is the default behaviour of a model asked whether it is finished. The fix is a completion contract the agent cannot edit, checks that read the world rather than the transcript, and a verifier that did not do the work.

    Premium answer
  24. 08
    Loops & harnesshardDesign

    Set the stop conditions and budgets for a research agent with a two-dollar ceiling per task.

    Two dollars is a number you can design against. Work out what a turn costs, how caching changes it, how to split the money between exploring and writing, and how the agent stops exploring before the money stops it.

    Premium answer
  25. 09
    Loops & harnesshardDebug

    A model upgrade makes your twelve-stage harness slower and no better. What do you remove?

    Scaffolding that compensated for the old model now costs latency and tokens for nothing. Separate it from the controls that encode authority, then ablate it with enough runs to tell a real difference from noise.

    Premium answer
  26. 10
    Loops & harnesshardDesign

    Sketch the state your harness carries between turns, besides the message list.

    The message list is what the model sees. A production run also carries who it acts for, what it has spent, what it has changed in the world, what it is waiting on and what it has proven. Interviewers want the schema, and the reason for each field.

    Premium answer
  27. 11
    Loops & harnessexpertTrade-off

    A 300-line custom loop or a framework for a regulated bank's agent: make the call.

    The interviewer is not asking which library is best. They are asking whether you can turn a regulator's questions into requirements and choose an architecture that answers them for years.

    Premium answer
  28. 12
    Loops & harnessmediumDesign

    When should an agent stop and ask the user instead of guessing? Design the rule.

    Asking too much makes an agent useless; guessing too much makes it dangerous. The rule depends on what a wrong guess costs, whether it can be undone, and whether the answer is findable without the user.

    Premium answer
  29. 13
    Loops & harnessmediumDesign

    Your agent must answer within 30 seconds. How do you design the loop around that budget?

    A latency budget is not a timeout at the end. It shapes how many model calls you can afford, which tools run in parallel, and what the agent returns when time is nearly up.

    Premium answer
  30. 14
    Loops & harnesseasyDebug

    Some runs stop after one tool call and return an empty answer. Debug the loop.

    The model did not decide to say nothing. Somewhere the loop took an exit it should not have, or treated a response it did not understand as the end.

    Premium answer
  31. 15
    Loops & harnessmediumDesign

    A user sends a new message while the agent is still working on their previous request. What should the loop do with it?

    Ignoring it wastes the user's correction. Killing the run loses work and may leave a side effect half done. The loop needs a defined point where new input is read and a rule for what it means.

    Premium answer
  32. 16
    Loops & harnessmediumDebug

    Halfway through a legitimate task, the model refuses to continue. How should the loop handle a refusal?

    A refusal is neither a final answer nor an error to retry blindly. Detect it, keep what was done, find out what triggered it, and give the user an honest outcome.

    Premium answer
  33. 17
    Loops & harnessmediumDebug

    An agent alternated between two tool calls for thirty steps. What should have stopped it at step six, and why must it not fire on polling?

    A debugging question with a design inside it. The strong answer reads the trace, names the pattern an exact-repeat check cannot see, designs a detector that compares normalised calls and their results, and shows why polling stays untouched.

    Premium answer
  34. 01
    Tool callingeasyConcept

    What is tool calling, and what actually happens when a model 'calls a tool'?

    The vocabulary question behind every tool-design round. The strong answer explains that the model only writes a structured request, that the harness validates and runs it, and why the tool's name, description and error messages are part of the interface the model reads.

    Answer available
  35. 02
    Tool callingeasyDesignEssential

    Design the tool definitions an agent sees for an order-management API.

    The API already exists; the question is what the model should see. Strong answers turn endpoints into decisions, take identity out of the arguments and design the results as carefully as the inputs.

    Answer available
  36. 03
    Tool callingmediumDesignEssential

    What should a tool return when it fails, and who decides whether to retry?

    A question about ownership. The harness owns transient retries, the model owns fixing its own arguments, and nobody retries a write that might have happened without a key.

    Answer available
  37. 04
    Tool callinghardDesign

    The model emits four parallel tool calls and two of them write the same record. What does the executor do?

    Firing all four with a gather is the answer interviewers are waiting to hear so they can ask what happens to the record. The strong answer schedules the batch, and protects the record even from writes that arrive by other routes.

    Answer available
  38. 05
    Tool callinghardDebug

    Tool arguments fail validation 3% of the time under load. Diagnose it.

    'The model is random' is the answer that fails the round. The strong answer slices the failures by stop reason, model, code path and field until the cause has nowhere to hide.

    Answer available
  39. 06
    Tool callinghardDesign

    An agent has 120 tools and keeps picking the wrong one. Fix the tool surface.

    Interviewers want a sequence, not a technique: measure where the wrong choices cluster, consolidate, then cut what each run sees, and prove it end to end.

    Free with an account
  40. 07
    Tool callingmediumDebug

    Structured outputs are on. The JSON is valid and the action is still wrong. Why?

    A schema describes shape. The interviewer wants the list of ways a perfectly shaped call can still be wrong, and a check for each that lives in the harness.

    Premium answer
  41. 08
    Tool callingmediumDebug

    A tool swallows every exception and returns "ok", and the retry policy stopped firing. Fix the contract.

    Two audiences read a tool's failures: the harness, which retries, and the model, which corrects. The bug is a contract that speaks only to the model, and only to say everything is fine.

    Premium answer
  42. 09
    Tool callingmediumCode

    Make a refund tool safe to call twice.

    Everyone says 'idempotency key'. The interview is in the details: where the key comes from, how it is stored with the refund, what a repeat returns, and what happens when the payment processor is the one that timed out.

    Premium answer
  43. 10
    Tool callinghardTrade-off

    When should an agent write code instead of calling tools one at a time?

    Letting the model write a program that calls your tools can collapse thirty turns into one. It also moves your authorization checks somewhere new, and that is what the interviewer is waiting for you to notice.

    Premium answer
  44. 11
    Tool callinghardMeasure

    Two tools have overlapping descriptions and the wrong one is chosen 18% of the time. What do you change and how do you measure it?

    The change is usually a merge or two sentences. The interview is about proving it worked: a labelled set aimed at the ambiguous cases, enough examples to tell 18% from 12%, and repeated runs.

    Premium answer
  45. 12
    Tool callingmediumDesign

    A reporting tool can return 50,000 rows. How do you expose it to an agent?

    The agent does not need 50,000 rows in its context. It needs an answer computed from them, and a way to look closer at the few that matter.

    Premium answer
  46. 13
    Tool callingmediumDesign

    A transfer tool should run alone for small internal moves but need approval for large or external ones. Where does that rule live?

    Not in the tool's description, and not in the model's judgement. The same tool call is allowed or held depending on its arguments, so a policy check has to see the arguments every time.

    Premium answer
  47. 14
    Tool callingmedium

    A tool starts a data export that takes twenty minutes. How should it look to the agent?

    A tool call that blocks for twenty minutes holds the loop, times out, and gets retried into a second export. Return a handle immediately and let the agent check back.

    Premium answer
  48. 15
    Tool callingmediumDesign

    You need to add a required field to a tool that agents call thousands of times a day. How do you change the schema without breaking runs?

    A tool schema is an API whose client is a model with a cached prompt and runs already in flight. Change it the way you would change a public API: additive first, both shapes accepted for a while, then remove.

    Premium answer
  49. 16
    Tool callingmediumDesign

    A tool fetches invoices that are PDFs and scanned images. How should those results reach the model?

    Pasting a 40-page PDF into the context is the expensive way to read three numbers. Decide what the model needs from the document and return that, with the original available on request.

    Premium answer
  50. 17
    Tool callingmediumDesign

    Design a search tool for a support agent over orders, tickets and help articles. One free-text query, or many filters?

    A single query string is easy for the model to call and hard for it to call precisely. Dozens of filters are precise and easy to misuse. The best design gives both, with results that tell the model what to do next.

    Premium answer
  51. 18
    Tool callingmediumDebug

    After a model swap, 4% of turns contain a tool call written in the message text and no real call. Fix the harness without executing prose.

    A debugging question with a trap in it. The strong answer refuses to parse prose into actions, rescues the turn with an observation that puts the call in the right channel, counts the rate per model, and knows when the number says the model is the problem.

    Premium answer
  52. 19
    Tool callingmediumDesign

    Design the test suite for a new refund tool before any model calls it. What runs in CI, and what needs a model?

    A build-round favourite. The strong answer splits the suite into four model-free layers that run on every commit in seconds and one small selection eval that needs a model, and says exactly which bug each layer catches.

    Premium answer
  53. 01
    Context & cachingeasyConcept

    What is context engineering, and why does an agent need it when the model already has a 200k-token window?

    The question that separates people who have run long agents from people who have read the window size. The strong answer treats the window as a budget spent every turn, shows the arithmetic, names rot, and lists the levers a harness has over what the model sees.

    Answer available
  54. 02
    Context & cachingmediumDebugEssential

    Your agent has a 200k-token window and falls apart at 55k. Why, and what do you change?

    The candidate who says 'use a bigger window' has answered a different question. The window is not full; it is noisy. Find what the 55k is made of, then make it smaller and cleaner.

    Answer available
  55. 03
    Context & cachingmediumTrade-offEssential

    Clearing tool results, compacting the history, writing notes: when does each one fit?

    They are not three names for one idea. They lose different things, cost the cache differently and fail differently, and a good answer picks by what the run can afford to lose.

    Answer available
  56. 04
    Context & cachinghardDebug

    Prompt cache hit rate dropped from 80% to 10% after a release. Find it.

    Something in the release changed bytes near the front of the prompt. You find it by hashing the blocks of two consecutive requests and reading the first one that differs, not by reading the diff of the release.

    Answer available
  57. 05
    Context & cachinghardDesign

    Design compaction for a six-hour support session without losing what the customer told you.

    If the only copy of what the customer said lives in the transcript, any summary can lose it. The design records facts as they are confirmed, so compaction summarises talk, not the case.

    Answer available
  58. 06
    Context & cachingmediumTrade-off

    Documents in the prompt up front, or a tool that fetches them on demand?

    Caching changes the cost side of this answer a lot and the quality side not at all. Decide on size, how often each run needs the material, and whether the task needs all of it at once.

    Free with an account
  59. 07
    Context & cachingmediumDebug

    The agent rereads the same 40 KB config file every fifteen turns. Fix it without blowing the budget.

    The rereads are a symptom: clearing removed the file, and the three values the agent needed went with it. Give it a way to keep the values and fetch a key, not the file.

    Premium answer
  60. 08
    Context & cachingmediumDesign

    Order the prompt for a long-running agent so the cache holds.

    Most candidates get the first three layers right. The marks are in the last one: where the notes block, the clock and this turn's retrieved text go, so they change every turn without touching history.

    Premium answer
  61. 09
    Context & cachinghardDesign

    After compaction the agent forgets a contractual constraint. Design the fix.

    Improving the summary fixes the symptom. The design question is why a contractual limit lived only in the conversation, and why forgetting it was enough to break it.

    Premium answer
  62. 10
    Context & cachinghardEstimate

    Estimate what a forty-turn run costs with and without prompt caching.

    Input grows with the square of the turn count, which is why caching matters so much for agents. The answer also has to say when caching makes a run more expensive than no caching at all.

    Premium answer
  63. 11
    Context & cachingexpertMeasure

    How would you test a compaction prompt before it ships?

    A summary that reads well is not the test. Continue real runs from the compacted state and from the full one, and compare what happens next, paired and with an interval.

    Premium answer
  64. 12
    Context & cachingmediumDebug

    A wrong order number from step 3 keeps reappearing for the rest of the run. How do you stop it?

    Correcting it in a new message leaves the wrong value in the window and in every summary built from it. The fix is to stop unverified values from becoming context at all.

    Premium answer
  65. 13
    Context & cachingmediumDebug

    A user changed their instruction mid-conversation, but the agent keeps following the original one. Why, and what do you change?

    Both instructions are in the window, and nothing says the first one no longer applies. The model is resolving a contradiction you left for it.

    Premium answer
  66. 14
    Context & cachingmediumDebug

    Retrieving more documents into the agent's context made its answers worse. Explain and fix.

    Every document in the window is something the model has to weigh. Past a point, the extra ones are not more evidence; they are more ways to be wrong.

    Premium answer
  67. 15
    Context & cachingeasyDesign

    Your research agent fetches web pages and pastes the HTML into its context. What should happen to a page before the model sees it?

    Most of a web page's bytes are navigation, scripts, cookie banners and markup. The model needs the article, its title, date and source, and maybe its links, in a fraction of the tokens.

    Premium answer
  68. 16
    Context & cachingmediumDesign

    Your browser agent takes a screenshot every step, and after 30 steps the context is mostly images. How do you manage it?

    Only the latest screenshot shows the page as it is now. Older ones are history, and history can be a line of text describing what happened.

    Premium answer
  69. 01
    MemoryeasyConcept

    What is agent memory? Name the kinds, and say what is stored, for how long, and who decides to write it.

    The vocabulary question for the memory topic. The strong answer separates memory from context and retrieval, names working, episodic, semantic and procedural memory with a store and a lifetime for each, and puts the decision to write under the harness, not the model.

    Answer available
  70. 02
    MemoryeasyConceptEssential

    Memory, context and retrieval: draw the difference for an assistant used for months.

    Easy to say, easy to blur. The answer that scores places one concrete fact in each box and says who writes it, who reads it and how long it lives.

    Answer available
  71. 03
    MemoryhardDesignEssential

    Design memory for an assistant that works with the same customer for six months.

    The storage is the easy part. The design is the policies: what earns a write, what each record carries, what is read into which request, how a wrong memory is corrected, and how you prove memory is helping.

    Answer available
  72. 04
    MemoryhardDebug

    The memory store has filled with conclusions that are wrong. Detect it and clean it up.

    Deleting bad records one at a time never ends. Find which writer produced them, quarantine that cohort, verify against the sources, and fix the write path so it stops.

    Answer available
  73. 05
    MemorymediumDesign

    Where does an agent keep its notes during a task that takes eight hours?

    Not in the context window, and not in long-term memory. In durable run state outside the process, structured, written atomically, and enough on its own for a fresh context to pick up the work.

    Answer available
  74. 06
    MemorymediumDesign

    When should an agent write to long-term memory, and who is allowed to read it back?

    Two policies, and the second is the one that leaks. Write when the evidence is strong; read by the scope the memory was written in, checked against what the reader may see today.

    Free with an account
  75. 07
    MemoryhardDebug

    A secret was written to memory and later shown to another tenant. What failed?

    At least two controls failed, one on each side. A good answer contains the incident first, then finds both failures and fixes them so neither can happen again.

    Premium answer
  76. 08
    MemorymediumDesign

    Provenance, expiry and correction: what metadata does every memory record need?

    A proposed schema of user_id, text, embedding and created_at stores memories. It cannot say who may read one, why it is believed, when it stops being true or what it replaced. Add the fields that answer those questions, and justify each.

    Premium answer
  77. 09
    MemoryhardDebug

    Memory makes the agent better on Monday and worse by Friday. How do you find out why?

    Something accumulates over the week. Replay the same tasks against each day's memory snapshot to find when quality turns, then look at what was written that day, and check whether the agent is confirming its own beliefs.

    Premium answer
  78. 10
    MemorymediumTrade-off

    Procedural memory: when should a learned workflow become a skill file?

    Some learned workflows should become skills, some should become plain code, and most should stay as episodes. The deciding questions are how often, how stable, how proven and how much judgement each step needs.

    Premium answer
  79. 11
    MemoryexpertMeasure

    Evaluate whether memory helps at all.

    Memory's effects arrive across sessions, so per-request A/B tests and single-session evals miss them. Compare no memory, real memory and ideal memory on multi-session tasks, randomise by user, and count the harms as well as the gains.

    Premium answer
  80. 12
    MemorymediumCode

    A user asks your assistant to forget something they told it last month. What has to happen, and how do you prove it?

    Deleting the original record is the easy part. The fact also lives in summaries, embeddings, profiles and caches built from it, and the user will notice if any of them remembers.

    Premium answer
  81. 13
    MemorymediumDesign

    Design memory for a coding agent that works in the same repository across many sessions.

    The repository already remembers most things, and it is always current. Memory should hold only what the code cannot tell the agent, and be checked against the code before it is trusted.

    Premium answer
  82. 14
    MemoryhardDesign

    Two agents share a memory store and keep writing contradictory facts about the same customer. Fix the design.

    Shared memory without ownership is a whiteboard anyone can scribble on. Decide who may write each kind of fact, what wins on conflict, and what readers see when sources disagree.

    Premium answer
  83. 15
    MemorymediumDesign

    Users ask 'What do you remember about me?' Design how they can see, correct and delete what your assistant has stored.

    Asking the model to recite its memories gives a paraphrase, possibly wrong and possibly incomplete. The answer should come from the store itself, shown the way the agent will use it.

    Premium answer
  84. 16
    MemoryhardDesign

    A phone support agent remembers past calls by the caller's number. Why is that risky, and how should memory recall be gated?

    Caller ID is a claim, not an identity. Recalling a customer's history because a number matches can read their private details to someone else, and let a stranger write to their memory.

    Premium answer
  85. 01
    Planning & controleasyTrade-off

    What is ReAct, and when should an agent plan first instead of reacting one step at a time?

    The pattern vocabulary question. The strong answer shows ReAct as one trace, names what it buys and what it costs, and gives the two conditions under which a plan written first beats deciding step by step, with replanning as the part people forget.

    Answer available
  86. 02
    Planning & controlmediumTrade-offEssential

    ReAct, plan-and-execute, or an explicit state graph: pick one for a refund workflow.

    The question offers three options; the strong answer uses two, at different levels. The graph owns the rules and the money; a small ReAct loop does the one part nobody can script.

    Answer available
  87. 03
    Planning & controlhardDebugEssential

    A plan-and-execute agent keeps running an obsolete plan after the world changes. Fix it.

    The plan was right when it was written. The fix is to record what it was right about, check that before every step that changes anything, and replan from where the world is now.

    Answer available
  88. 04
    Planning & controlhardMeasure

    Reflection doubled the cost and sometimes reinforces a wrong answer. Keep it or kill it?

    Neither, as asked. Measure what it fixes and what it breaks by task type, kill the self-review where it has no signal, and keep a cheaper version that only runs when a check fails.

    Answer available
  89. 05
    Planning & controlexpertDesign

    Tree search gives better answers but the latency budget is eight seconds. What do you do?

    Spend the search where it pays, spend it in parallel, stop at a deadline with the best answer so far, and move the rest of the search offline where nobody is waiting.

    Answer available
  90. 06
    Planning & controlmediumTrade-off

    When does a deterministic edge beat letting the model route?

    When the rule can be written down and checked against data, code should decide. The model earns a routing decision when the input is language and the rule cannot be written, and even then code checks what it chose.

    Free with an account
  91. 07
    Planning & controlmediumDesign

    How much reasoning effort should each step get?

    Most steps of an agent run are routine and a few decide the outcome. Spend thinking where a wrong step is expensive and hard to detect, start low where a check can catch mistakes, and measure per step type.

    Premium answer
  92. 08
    Planning & controlmediumDesign

    Recover when step four of a seven-step plan fails.

    Retry, repair, replan, compensate or stop: the choice depends on what kind of failure it is, which later steps depend on step four, and what steps one to three already changed.

    Premium answer
  93. 09
    Planning & controlhardDesign

    Design the replanning triggers for a long migration agent.

    A migration that runs for days needs triggers at three levels: a file, a batch and the whole plan. Most problems should be solved at the lowest level, and the plan should change only on sustained evidence.

    Premium answer
  94. 10
    Planning & controlhardDesign

    Your system prompt has grown into a ten-page flowchart. What do you do with it?

    A prompt that says 'if X then Y, else if Z' for ten pages is a program written in the least reliable language available. Sort each instruction by what it really is, and move it to where that kind of thing belongs.

    Premium answer
  95. 11
    Planning & controlexpertDesign

    Move a prototype from a role-based multi-agent chat into a workflow a regulator can audit.

    Agents chatting in roles produce a transcript, and a transcript is not an audit trail. Turn each role into a node with typed inputs and outputs, put the regulated decisions in code or with a named person, and record every decision so it can be replayed.

    Premium answer
  96. 12
    Planning & controlmediumTrade-off

    When should an agent show its plan to the user and wait for approval before acting?

    Approving a plan is cheaper than approving every step and safer than approving nothing. It only works if the plan says what will actually happen and the agent sticks to it.

    Premium answer
  97. 13
    Planning & controlmediumTrade-off

    Should the planner and the executor in your agent use the same model? How would you decide?

    Planning is a few hard decisions; execution is many easy ones. That asymmetry is an argument for different models, if you can show the cheaper one executes as well.

    Premium answer
  98. 14
    Planning & controlhardDebug

    An agent keeps switching between two subgoals, undoing each one's progress. How do you stop it?

    Fixing the tests breaks the linter; fixing the linter breaks the tests. The agent is not confused; the two goals conflict, and nothing in the loop records which states it already produced.

    Premium answer
  99. 15
    Planning & controlhardTrade-off

    Your agent can call five lookup tools of very different cost and speed before deciding. How should it choose what to gather first?

    Calling every tool is thorough and slow. The useful question is which lookup could change the decision, and what it costs to ask.

    Premium answer
  100. 16
    Planning & controlmediumDesign

    Your agent writes a plan before acting. What can you check about that plan in code before any step runs?

    A plan in prose can only be read. A plan as structured steps can be checked: are the tools real, are the steps allowed, do dependencies make sense, does it fit the budget?

    Premium answer
  101. 17
    Planning & controlhardDebug

    Voting over five samples made the date-arithmetic step worse than one sample. Explain it and fix it.

    A measurement question that most candidates answer with intuition. The strong answer names the systematic error that a vote amplifies, shows the arithmetic, replaces the vote with a verifier where one exists, and says how to find out which case you are in before spending the samples.

    Premium answer
  102. 18
    Planning & controlhardDesign

    Design the task tree for a procurement agent: quotes from three suppliers, a choice, an order, with fallbacks at each step.

    A design question that rewards structure. The strong answer draws AND and OR nodes with leaves that are single tool calls, puts the model's split proposals behind code validation, bounds the tree, and shows a supplier failure being absorbed two levels below the order.

    Premium answer
  103. 19
    Planning & controlmediumDesign

    The bill tripled after reasoning effort was set to high for the whole coding agent. Design the per-step policy and how to measure it.

    A cost question that is really a control question. The strong answer makes effort a per-step setting from a policy table of floors, caps and checks, keeps high effort where no check catches a mistake, and measures the policy on a labelled set that charges the cost of wrong steps.

    Premium answer
  104. 01
    EvalseasyConcept

    How do you evaluate an AI agent when it does something different on every run?

    The entry question for the evals topic. The strong answer builds a task set with checkable outcomes, grades the result and the path separately, runs each task several times to get a rate with a denominator, and says which part a judge model may grade and which it may not.

    Answer available
  105. 02
    EvalsmediumTrade-offEssential

    pass@k or pass^k: which one do you report for a customer-service agent, and why?

    A customer never sees your best of five attempts. They see one run, then another next week. Report the number that describes that, and show it per task so the fix is obvious.

    Answer available
  106. 03
    EvalsmediumDesign

    How do you evaluate an agent whose path differs on every run?

    Stop grading the path. Fix the environment, check the end state, express the rules about the path as invariants, and run each task enough times that variation is measured instead of feared.

    Answer available
  107. 04
    EvalshardDebug

    The eval says 92% and customers are complaining. Explain the gap.

    Both numbers are probably true. The eval measures something real on a set of tasks that is not what customers bring, with graders and metrics that are not what customers feel. Find which of those it is.

    Answer available
  108. 05
    EvalshardDesign

    Make an LLM judge trustworthy enough to gate a release.

    Agreeing with people on average is not enough for a gate. The judge must be equally accurate on the old and the new version's outputs, or it will pass a regression because it likes the new style.

    Answer available
  109. 06
    EvalshardDebug

    Success dropped 8% with no code change. Find the cause.

    Your code did not change; plenty else did. Rerun the fixed eval to split 'the agent changed' from 'the world changed', then let the traces say which slice and which dependency moved.

    Free with an account
  110. 07
    EvalsmediumDesign

    Build the first week of evals for a brand-new agent.

    Not a benchmark: thirty real tasks, a sandbox, graders written in code, repeated runs, and a day spent reading traces. By Friday the team should know what breaks most often, and every change after that is measured.

    Premium answer
  111. 08
    EvalshardDesign

    The final answer was right but the agent leaked data to an intermediate tool. How would your evals catch that?

    An outcome grader cannot see it; only the path shows where data went. Plant identifiable test data, write data-flow invariants over every tool call's arguments, and check them on every run, in evals and in production.

    Premium answer
  112. 09
    EvalsexpertDesign

    Design the release gate for an agent that moves money.

    Zero violations in an eval is not proof of zero risk; it is an upper bound that depends on how many runs you did. Gate in stages, offline, shadow and capped canary, with hard limits in the harness for whatever the gate cannot rule out.

    Premium answer
  113. 10
    EvalsmediumDesign

    What do you trace for every model call and tool call, and what stays out of the trace?

    Enough to explain any decision and attribute any second or rupee; not the secrets and personal data that would turn your observability system into the biggest data store nobody secured. Export by allowlist, not by hope.

    Premium answer
  114. 11
    EvalsexpertMeasure

    A regression appears in 3% of runs. Prove it exists and find it.

    Rare failures hide in averages and vanish on rerun. Make the failure detectable by code, count it on enough runs of both versions to prove the difference, then concentrate it on the tasks that trigger it and bisect there.

    Premium answer
  115. 12
    EvalsmediumTrade-off

    A vendor says their new model scores 6 points higher on SWE-bench Verified. Should your coding agent switch?

    Six points on someone else's harness, budget and task set is a reason to test, not a reason to switch. The decision comes from your tasks, your harness and a rule you wrote first.

    Premium answer
  116. 13
    EvalshardMeasure

    Your offline evals say the new agent version is better. How do you A/B test it in production before rolling it out?

    Offline evals tell you the change is probably not worse on cases you thought of. An online test tells you what users and outcomes do, if you randomise the right unit and decide the metrics before you look.

    Premium answer
  117. 14
    EvalsmediumDesign

    Build an evaluation set for your agent from production traces. What do you sample, how do you label it, and how do you keep it useful?

    A random sample of traffic is mostly easy cases you already pass. A useful set over-represents failures and risky actions, is labelled with what should have happened, and is refreshed before it goes stale.

    Premium answer
  118. 15
    EvalshardDesign

    Your support agent handles multi-turn conversations. How do you evaluate it with a simulated user, and how far can you trust the results?

    Single-turn test cases miss what goes wrong over a conversation. A model playing the user lets you test many conversations, but it is another model whose behaviour you have to check.

    Premium answer
  119. 16
    EvalsmediumMeasure

    A prompt change passed every quality check but doubled cost per task. How do you catch cost and latency regressions before release?

    Quality gates check whether the answer is right. Nobody checked how many turns, tokens and seconds it took to get there.

    Premium answer
  120. 17
    EvalshardDebug

    Your LLM judge says quality has held at 94% for a month, but escalations to people keep rising. Which do you believe?

    Two signals disagree. One of them is measuring something narrower than you think, or measuring the wrong sample.

    Premium answer
  121. 18
    EvalsmediumDebug

    The release gate dropped 27 points on the refund slice the day after twenty tasks were added. Investigate.

    An investigation where the usual suspect is innocent. The strong answer looks at the dataset change before the agent, tests the new checkers against their own references and known-bad answers, finds the lint that would have caught it, and fixes the process as well as the tasks.

    Premium answer
  122. 19
    EvalsmediumMeasure

    Tool-call accuracy is 81% and the team wants a bigger model. Decompose the number and say what to fix first.

    A measurement question with a budget decision behind it. The strong answer splits one number into four, reads which failures make up the missing nineteen points, assigns each to its owner, and orders the fixes from cheapest to a model change last.

    Premium answer
  123. 20
    EvalsmediumDebug

    A prompt change re-recorded twenty replay cassettes and CI went green. What did the suite prove, and what should the process have been?

    A process question hiding a testing-theory question. The strong answer explains that a cassette suite in auto mode proves nothing about a prompt change, puts CI in strict replay, makes re-recording a reviewed diff, and names what live probes still have to cover.

    Premium answer
  124. 01
    Multi-agenteasyConcept

    What is a multi-agent system, and what are the main ways agents can be arranged?

    The definition and taxonomy question. The strong answer defines a second agent as a second context, names the common arrangements with what each buys, shows the cost that arrives with every split, and gives the one condition under which splitting pays.

    Answer available
  125. 02
    Multi-agentmediumTrade-offEssential

    When does a second agent pay for itself?

    When it buys something one agent cannot have: a clean context for heavy reading, time through parallel work, or a permission boundary. Prove it against a single-agent baseline with the costs written next to the gains.

    Answer available
  126. 03
    Multi-agenthardDesign

    Design an orchestrator and its workers for a research task. What does each worker receive?

    The interesting part is the brief. A worker knows nothing except what it receives, so the brief is where duplication, drift, missing sources and runaway cost are either prevented or caused.

    Answer available
  127. 04
    Multi-agenthardDesign

    Two workers return contradictory findings. What does the system do?

    Most contradictions are not disagreements: different units, dates, definitions or scope. Normalise first, then resolve the real ones by rule, and say so in the answer when they cannot be resolved.

    Answer available
  128. 05
    Multi-agentmediumTrade-off

    Handoff or agent-as-tool: which one, and why?

    Ask who should be talking to the user once the specialist is involved, and who answers for the outcome. The pattern follows from those two answers.

    Answer available
  129. 06
    Multi-agenthardDebug

    One agent's confident mistake became the whole system's answer. Stop that happening.

    Confidence is not evidence. The system needs to know which claims the answer rests on, where each came from, and whether anything independent supports it, before it writes the answer.

    Free with an account
  130. 07
    Multi-agenthardCode

    Parallel workers each write to the same shared state. Prevent lost updates.

    This is a concurrency bug wearing an agent costume, and the old fixes work: fewer writers, smaller writes, versioned writes, and data shapes where concurrent changes merge instead of overwrite.

    Premium answer
  131. 08
    Multi-agentmediumEstimate

    Estimate the token bill of a five-worker research system.

    Five workers is not five times one prompt. Each worker is its own growing loop, input dominates output, and the number of steps per worker matters more than the number of workers.

    Premium answer
  132. 09
    Multi-agenthardDesign

    Design the handoff contract so a specialist does not need the whole transcript.

    Write down what the specialist must know to act without asking the user to repeat anything, make the sender produce exactly that, validate it, and keep the transcript one reference away for the rare detail the summary missed.

    Premium answer
  133. 10
    Multi-agentmediumDesign

    A group-chat style prototype resends the entire history every turn. Fix the architecture.

    Every agent reads every message every turn, so cost grows with agents times turns squared and each agent drowns in the others' chatter. Give each agent its own context, a shared state store, and messages that are addressed.

    Premium answer
  134. 11
    Multi-agentexpertTrade-off

    Debate between agents: when does it add evidence and when does it only add cost?

    Copies of one model arguing with each other mostly spend tokens to reach what voting over samples would reach. Debate earns its cost when the debaters bring different evidence or can check each other's claims against something real.

    Premium answer
  135. 12
    Multi-agentmediumTrade-off

    When would you use map-reduce agents rather than a swarm or group chat?

    If the pieces do not need to read each other, letting them talk is paying for conversation that changes nothing and spreads every mistake.

    Premium answer
  136. 13
    Multi-agenthardDesign

    Design a deep research agent that writes cited reports your analysts can trust.

    The report will always read well. Whether analysts can trust it depends on what the workers return, what the writer is allowed to say, and who checks the citations.

    Premium answer
  137. 14
    Multi-agentmediumDesign

    An orchestrator waits forever on a worker agent that is stuck. How do you detect it and recover the work?

    'Still running' tells the orchestrator nothing. Workers need deadlines, progress signals and a way to hand back partial results, or one stuck branch holds the whole task.

    Premium answer
  138. 15
    Multi-agenthardDebug

    A five-agent pipeline gave a wrong answer. How do you find which agent caused it, and how do you measure that across many runs?

    The agent that produced the wrong final answer is rarely the one that made the mistake. Finding the first wrong step needs traces that connect agents and checks at each handoff.

    Premium answer
  139. 16
    Multi-agentmediumTrade-off

    Should your agents coordinate through a shared workspace they all read and write, or by sending each other messages?

    A shared workspace lets any agent see everything and makes conflicts everyone's problem. Messages keep agents isolated and make the orchestrator a bottleneck. The work's shape decides.

    Premium answer
  140. 17
    Multi-agenthardDesign

    Design the message contract between a lead agent and twenty workers over a queue that can lose, duplicate and delay messages.

    A design question where the channel's failure modes are the specification. The strong answer gives every message an id and a correlation id, makes handlers idempotent, bounds mailboxes, sets a deadline per outstanding task, routes dead letters, and traces one task across all twenty workers.

    Premium answer
  141. 18
    Multi-agenthardDebug

    A planner agent spawned four hundred helpers overnight and the bill arrived in the morning. Write the guards.

    An incident question about a failure only groups can have. The strong answer puts the guards in the harness that creates agents, not in the planner's prompt: a spawn budget with depth and fan-out caps, leases, ownership and hop counts, completion as a check, and a test that injects the failure.

    Premium answer
  142. 01
    Durable agentseasyConcept

    What does it mean for an agent to be durable, and why can't a normal loop just retry after a crash?

    The vocabulary question for long-running agents. The strong answer shows the crash that a retry gets wrong, explains an event history that is replayed rather than re-run, puts idempotency on every side effect, and says how an agent waits three days for a person without holding a process open.

    Answer available
  143. 02
    Durable agentshardDesignEssential

    A worker crashes after the payment call succeeds and before the result is saved. Design recovery.

    No design closes that window; good designs make it harmless. The payment must be identifiable before it is made, the retry must ask before it acts, and the processor's own idempotency must do the rest.

    Answer available
  144. 03
    Durable agentshardDesign

    Human approval may arrive three days later. Design the wait.

    Nothing should be running for those three days. The run is a record that waits for a signal or a timer, the approval is bound to exactly what was shown, and the world is checked again before anything happens.

    Answer available
  145. 04
    Durable agentsexpertDesign

    The API sends wire transfers and has no idempotency key. Design the agent around it.

    Wires cannot be recalled reliably, so the design chooses at-most-once on purpose: one dispatcher may send each intent, a send that ends in doubt is never retried automatically, and the bank's own records settle what happened.

    Answer available
  146. 05
    Durable agentshardConcept

    What runs inside a durable workflow and what must run as an activity?

    The rule is simple to state and easy to break: workflow code must make the same decisions on every replay, so anything that can differ between runs goes through an activity, and the model is the biggest such thing.

    Answer available
  147. 06
    Durable agentsmediumCode

    Detect a loop where every step looks slightly different.

    Exact-repeat checks miss the loops that matter. Compare calls after normalising them, watch for cycles in the states the run visits, and above all measure whether anything new is being learned or finished.

    Free with an account
  148. 07
    Durable agentsmediumCode

    The budget is two thousand rupees or ninety minutes, whichever comes first. Enforce it.

    Checking the total after each call lets the last call overshoot. Reserve the worst case before each call, settle the real cost after, keep a slice back for a clean finish, and store all of it where a restart cannot reset it.

    Premium answer
  149. 08
    Durable agentsexpertDesign

    A new model ships while two thousand long-running workflows are mid-flight. What happens to them?

    Nothing, by default, if each run pinned its model and prompt at the start. Then the upgrade becomes a decision per run: finish on the old version, or move at a safe point after the new one has proved itself on the same kind of work.

    Premium answer
  150. 09
    Durable agentshardDebug

    An overnight bug burned forty thousand dollars. Write the controls.

    Per-run budgets were probably fine; every single run stayed inside them. The money went through the gaps between runs: unlimited triggers, no fleet caps, no alert anyone saw, and no switch to stop it.

    Premium answer
  151. 10
    Durable agentshardDesign

    Make a 200-step migration survive context resets and restarts.

    Do not make one agent remember 200 steps. Make the migration a durable list of items, each done in a fresh, small context, each idempotent, each checked, with the list and a short notes file as the only memory that matters.

    Premium answer
  152. 11
    Durable agentsmediumDesign

    How does a research agent decide it is finished?

    Not when it feels done. When every part of the question has an answer it can cite, or a stated reason it has none, and more searching has stopped finding anything new, within a budget set before it began.

    Premium answer
  153. 12
    Durable agentsmediumDebug

    Your event-driven agent keeps reacting to events its own actions caused. Fix the architecture.

    Turning it off and adding a sleep both stop the symptom. The fix is knowing who caused every change, and a limit that holds when that knowledge is wrong.

    Premium answer
  154. 13
    Durable agentsmediumDesign

    A travel agent has booked the flight and is booking the hotel when the user cancels the trip. What should happen?

    Stopping the loop is easy. The flight is already booked, the hotel call may or may not have gone through, and the user wants to know what they are being charged for.

    Premium answer
  155. 14
    Durable agentsmediumDesign

    An approver changes the amount on a paused agent run before approving it. How should the run resume?

    Resuming exactly where it paused would execute a plan the approver just changed. The edit is new input, and everything derived from the old value has to be checked again.

    Premium answer
  156. 15
    Durable agentsmediumDesign

    A weekly agent job summarising each customer's activity missed two runs in an outage. What should happen when the system recovers?

    Running everything that was missed at once can flood customers and the model quota. Skipping it loses work people expected. The catch-up rule has to be decided before the outage, per job.

    Premium answer
  157. 16
    Durable agentshardDesign

    An agent workflow fans out 500 sub-tasks, one per supplier, and must combine the results. How do you make it durable when some fail?

    Five hundred parallel branches in one workflow will hit limits, retries and stragglers. Decide the concurrency, what counts as done, and what the join does with the ones that failed.

    Premium answer
  158. 17
    Durable agentsmediumDesign

    A worker died six minutes into an agent run and nobody noticed for an hour. Design the queue so that cannot happen again.

    A design question that starts from an incident. The strong answer gives jobs leases with heartbeats so a dead worker is detected in seconds, records each step with an idempotency key so the takeover resumes without repeating a side effect, bounds retries with a dead-letter queue, and sizes the lease from the step times.

    Premium answer
  159. 18
    Durable agentshardDesign

    Define the release unit for your agent, and say what happens to a run that is mid-flight when the next release lands.

    A question that finds out whether a candidate has been burned by a regression with no deploy. The strong answer names the four things that set behaviour, versions them as one content-addressed id on every trace, pins in-flight runs, and checks a release by replay before the eval gate.

    Premium answer
  160. 01
    Runtime & sandboxeseasyConcept

    What is a sandbox for an agent, and why does code the model wrote need one when your own code does not?

    The entry question for the runtime topic. The strong answer treats model-written code as untrusted input that runs, names the four things a sandbox bounds, places the boundary by what the code is allowed to reach, and shows the step where a run without one goes wrong.

    Answer available
  161. 02
    Runtime & sandboxeshardTrade-offEssential

    Containers, gVisor, Firecracker or Wasm for untrusted generated Python: choose.

    The answer starts with two questions, who else shares the machine and what the code must be able to run, and ends with the same list of controls whatever you pick.

    Answer available
  162. 03
    Runtime & sandboxesmediumDebug

    Your forty-turn agent is slow and expensive. Where do the seconds and dollars go?

    Dollars go to input tokens, because every turn rereads everything before it. Seconds go to generation and tool calls, often in series. You find out which by reading the trace, not by guessing.

    Answer available
  163. 04
    Runtime & sandboxeshardDesign

    A code sandbox needs GitHub access and the generated code must never see the token. Design it.

    Reads go through a broker that adds the token outside the sandbox. Writes are safer still if the sandbox never pushes at all: it hands over a patch, and a trusted service checks it and pushes.

    Answer available
  164. 05
    Runtime & sandboxesexpertDesign

    Design tenant isolation for twenty thousand concurrent coding sessions.

    The sandbox boundary is one layer of six. Compute, network, storage, credentials, shared caches and observability each need their own answer, and the shared caches are where designs usually leak.

    Answer available
  165. 06
    Runtime & sandboxeshardDesign

    Route between a frontier model and a small one without breaking quality.

    Route by step, not by run; send the small model only work a check can verify or a mistake cannot hurt; escalate on failure; and let per-step evals, not intuition, decide which steps move.

    Free with an account
  166. 07
    Runtime & sandboxeshardEstimate

    Keep cold starts out of the user's way at five hundred sessions a minute.

    Measure the stages, shrink the slowest with images and snapshots, size a warm pool from arrival rate and preparation time, and overlap whatever remains with the first model call so the user never waits on a disk.

    Premium answer
  167. 08
    Runtime & sandboxeshardDebug

    The agent storms a downstream API after an outage. Fix the fleet behaviour.

    Every agent retried, every model improvised alternatives, and they all came back at the same moment. Fix it at the fleet level: shared breakers, a retry budget, jitter, admission control, and an observation that tells the model to stop.

    Premium answer
  168. 09
    Runtime & sandboxesmediumTrade-off

    Stream agent progress to a web page and a phone. Pick the transport.

    The transport matters less than where progress lives. Write progress to a durable event log first; then any client, on any transport, can catch up after a dropped connection or a phone that slept for ten minutes.

    Premium answer
  169. 10
    Runtime & sandboxesmediumCode

    Persist a sandbox's files across sessions without persisting its secrets.

    Keep only the workspace directory, by allowlist; issue credentials fresh each session so nothing secret was ever on disk to save; scan before saving as a backstop, and encrypt and expire what you keep.

    Premium answer
  170. 11
    Runtime & sandboxesexpertTrade-off

    Build or buy the agent runtime.

    Not one decision but six: sandboxes, durable execution, the credential broker, the model gateway, tracing and evals. Buy what is undifferentiated and hard to get right, build what encodes your product, and keep every boundary portable.

    Premium answer
  171. 12
    Runtime & sandboxesmediumDesign

    How do you stop a browser or coding agent from reaching your cloud's instance metadata endpoint?

    A page or a repository only has to persuade the agent to fetch one internal address. The answer is a network that will not route there, whatever the agent is persuaded to do.

    Premium answer
  172. 13
    Runtime & sandboxeshardDesign

    Thousands of agent sessions share one model provider quota. How do you keep one tenant from starving the rest?

    The provider limits tokens per minute for your whole account. Without your own admission control, the tenant running a 200-step batch job decides how slow everyone else's chat is.

    Premium answer
  173. 14
    Runtime & sandboxesmediumDesign

    Fifty internal teams run agents on your shared platform. How do you attribute cost to each team accurately enough to charge them?

    The model bill arrives as one number per account. Attribution has to be built into every call, because reconstructing it afterwards from logs is guesswork.

    Premium answer
  174. 15
    Runtime & sandboxesmediumDesign

    An EU customer requires that their data stays in the EU. What does that mean for every part of your agent's runtime?

    The model endpoint is the obvious part. Traces, memory, sandboxes, caches, evaluation copies and support tooling are where data quietly leaves the region.

    Premium answer
  175. 16
    Runtime & sandboxesmediumDesign

    Agent sessions in your runtime last up to two hours. How do you deploy a new runtime version without killing them?

    A rolling restart that kills workers is fine for 200 ms requests. For two-hour sessions, it is an outage for everyone mid-task, unless sessions can drain or move.

    Premium answer
  176. 01
    Agent protocolseasyConcept

    Why do agents need protocols at all? Explain what MCP and A2A each standardise and where each one sits in a design.

    The orientation question for the protocols topic. The strong answer starts from the edges of a design rather than from acronyms, places MCP on the agent-to-tool edge and A2A on the agent-to-agent edge, says what each standardises and what neither decides, and names the version question that trips people up.

    Answer available
  177. 02
    Agent protocolseasyConceptEssential

    What does MCP standardise, and what does it leave to you?

    Two lists. The first is short and stable: roles, primitives, messages, lifecycle, transports, an authorization model. The second is where the engineering is: tool design, per-user permissions, which servers to trust, how many tools the model sees, and operating it all.

    Answer available
  178. 03
    Agent protocolsmediumTrade-off

    MCP or A2A for connecting your agent to another team's agent?

    Ask what the other team is offering. If it is a capability with a contract you can rely on, it is a tool. If it is a worker that decides how to do the job, takes a while and may ask questions, it is an agent, and the task model fits.

    Answer available
  179. 04
    Agent protocolsexpertDesign

    Design a gateway in front of three hundred internal MCP servers.

    At three hundred servers, the gateway is shared infrastructure for every agent in the company. It needs a registry behind it, projection in front of it, isolation between backends, and the reliability of anything else on the critical path.

    Answer available
  180. 05
    Agent protocolsmediumDesign

    Wrap your internal REST API as MCP tools: one tool per endpoint?

    Endpoints are shaped for programs that already know what they want. Tools are shaped for a model deciding what to do. Generate from the API description to get started, then cut, merge and rename until each tool is one decision.

    Answer available
  181. 06
    Agent protocolshardDesign

    A long-running tool takes two hours. How does the protocol carry it?

    Not as a request held open for two hours. As a task: started once, tracked by a handle, reporting progress, collected when done, cancellable, and readable only by whoever started it.

    Free with an account
  182. 07
    Agent protocolshardDesign

    An MCP server asks for a new OAuth scope halfway through a task. What happens?

    The agent cannot grant itself more access. The call fails with a clear 'insufficient scope', the run pauses, a person with the right to consent is asked through the host, and only a new token bound to that server lets the call go ahead.

    Premium answer
  183. 08
    Agent protocolshardDesign

    Roll out a new protocol version to twenty servers without a flag day.

    Version negotiation exists so clients and servers can upgrade at different times. Use it: clients that speak both versions first, servers one at a time, capabilities checked rather than assumed, and telemetry that says who is still on the old one.

    Premium answer
  184. 09
    Agent protocolsmediumDebug

    The specialist agent you delegated to via A2A disappears mid-task. Recover.

    Silence is not failure, and failure is not 'never happened'. Keep the task id, find out what state the task is really in, and only then decide between waiting, re-delegating and reporting, without letting two agents do the same side effect.

    Premium answer
  185. 10
    Agent protocolshardConcept

    Where do authorization decisions live in an MCP deployment?

    In several places on purpose, each deciding a different question. The one place they must never live is the model.

    Premium answer
  186. 11
    Agent protocolshardDebug

    Your MCP client follows a redirect while holding a bearer token. What goes wrong?

    If the client re-sends the Authorization header to wherever the redirect points, the token goes to a host it was never meant for. The fix is in the client's HTTP layer, and audience-bound, short-lived tokens limit the damage when something slips.

    Premium answer
  187. 12
    Agent protocolsmediumCode

    Your MCP server keeps per-session state. How do you migrate it to the stateless 2026-07-28 revision?

    The protocol change takes a day; finding everything your server quietly kept in memory between calls takes the rest of the week. Start with that inventory.

    Premium answer
  188. 13
    Agent protocolsmediumDesign

    How would you connect a long-running agent backend to your web app so users see progress and can approve actions?

    A websocket and a homegrown event format work until the second backend or the first reconnect. The answer is a typed event stream with clear run boundaries, shared state, and approvals that end the run instead of holding it open.

    Premium answer
  189. 14
    Agent protocolshardDesign

    A partner's agent wants to show your users interactive UI inside your app. How do you allow it safely?

    Their agent is someone else's code and someone else's model, and it wants to put pixels in front of your users. Decide what it may draw, where, and what a click is allowed to do.

    Premium answer
  190. 15
    Agent protocolsmediumConcept

    A partner sends an unsigned A2A Agent Card and says 'we also support ACP'. What do you check?

    An unsigned card is valid A2A, so validity is not the question; trust is. And 'ACP' has meant three different protocols, so the first job is to ask which.

    Premium answer
  191. 16
    Agent protocolsmediumDesign

    Your team is about to publish an MCP server for other teams' agents. How do you test it before anyone depends on it?

    Protocol conformance shows that clients can talk to it. It does not show that agents can use it well, that it refuses what it should, or that it stays up under real agent traffic.

    Premium answer
  192. 17
    Agent protocolsmediumDebug

    Your MCP server answers a tool call with a missing argument by returning a JSON-RPC error. What is wrong, and what should it return?

    A wire-level question that separates people who have built an MCP server from people who have installed one. The strong answer knows the two failure channels, says which reader each is for, and shows what the host's loop does differently with each.

    Premium answer
  193. 18
    Agent protocolshardDesign

    Two of your host's six MCP servers expose a tool called search, and one of them hangs under load. Design the host's hub.

    A design question about the layer the protocol does not specify. The strong answer namespaces at connect time, projects the catalogue per task, dispatches across servers concurrently with per-server timeouts, isolates the hanging server behind a restart budget, and measures each decision.

    Premium answer
  194. 01
    Coding & computer useeasyConcept

    How does a coding agent work? Walk through what happens between 'fix this failing test' and the pull request.

    The walkthrough question for the coding-agents topic. The strong answer narrates one run as a trace: a small map of the repository, targeted search and reading, an edit applied as a patch, the test run as the check, and the loop that repeats until the check passes or a budget ends it.

    Answer available
  195. 02
    Coding & computer usehardDesignEssential

    Find the right code in a two-million-line monorepo without flooding the context.

    Two million lines is roughly twenty-five million tokens. The agent will read a few thousand lines at most, so the design is about choosing which, using maps, exact and structural search, ownership metadata and notes.

    Answer available
  196. 03
    Coding & computer usemediumMeasure

    Search-and-replace blocks, unified diffs or whole-file rewrites: choose an edit format.

    Choose by measurement on your model and your repositories, with a default you can defend: search-and-replace for edits to existing files, whole files for new or tiny ones, and a strict applier either way.

    Answer available
  197. 04
    Coding & computer usehardDesign

    The coding agent makes tests pass by deleting assertions. Stop it.

    A prompt that says 'don't modify tests' lowers the rate; it does not close the path. Make tests read-only for the task, let the harness run them, review any change to what defines success, and grade with checks the agent cannot reach.

    Answer available
  198. 05
    Coding & computer usemediumDesign

    Design the compiler and test feedback loop so it does not spiral.

    Spirals have signatures: the same error after each fix, error counts that stop falling, edits spreading into unrelated files. Track those signals per loop and step back before the third identical attempt.

    Answer available
  199. 06
    Coding & computer usehardDesign

    Twelve agents implement twelve features in one repo at once. Prevent the collisions.

    Separate workspaces stop agents overwriting each other; they do not stop twelve branches that each work alone and fail together. Plan for the shared files, claim territory before writing, and merge through a queue that tests the combination.

    Free with an account
  200. 07
    Coding & computer usehardDebug

    A browser agent clicks the wrong Approve button after the page reflows. Fix it.

    The model chose the right button and the click hit another one, because the page moved between deciding and acting. Bind the action to the element, not the pixel, wait for the page to settle, and check the result before doing anything else.

    Premium answer
  201. 08
    Coding & computer usemediumTrade-off

    Accessibility tree or screenshots for a computer-use agent?

    Both, for different jobs. Structure is for knowing exactly what you are acting on; pixels are for what structure cannot describe. The design question is how to combine them cheaply and keep them consistent.

    Premium answer
  202. 09
    Coding & computer usemediumDebug

    The agent rewrites eight hundred lines to fix a two-line bug. What do you change?

    Large diffs for small bugs come from the edit format, the instructions and the absence of any check on change size. Make small edits the easy path, measure diff size against the task, and route oversized changes back before review.

    Premium answer
  203. 10
    Coding & computer usehardMeasure

    Measure a coding agent on your own repositories, not a public benchmark.

    Your history already contains the benchmark: issues, the commits that fixed them, and the tests that proved it. Turn them into tasks with a frozen environment, grade with tests the agent never sees, and report reliability and cost, not one score.

    Premium answer
  204. 11
    Coding & computer useexpertDesign

    The coding agent can install packages from the internet. Threat-model it.

    Every install runs someone else's code with whatever the sandbox can reach, and the agent chooses the names. Assume some choices will be wrong or malicious, and design so that a bad package finds nothing worth taking and cannot reach the codebase unreviewed.

    Premium answer
  205. 12
    Coding & computer usemediumDesign

    What should have to be true before a coding agent's pull request counts as done?

    'The agent says it is done' and 'the tests pass' are both weaker than they look. Done is a list of checks the harness runs, plus what a reviewer needs to see to trust them.

    Premium answer
  206. 13
    Coding & computer usemediumDebug

    A coding agent is asked to fix a flaky test. How do you stop it 'fixing' it with retries and sleeps?

    A retry decorator makes the test pass and the bug stay. The task has to define success as 'the cause is gone', and the harness has to be able to tell.

    Premium answer
  207. 14
    Coding & computer useeasyConcept

    You review a pull request a coding agent opened. What do you check that the tests cannot?

    Tests check behaviour someone thought to test. Review catches the rest: the wrong fix for the right symptom, quiet scope creep, and code nobody will want to maintain.

    Premium answer
  208. 15
    Coding & computer usemediumDesign

    A coding agent must change a legacy module that has no tests. How do you make its change verifiable?

    Without tests, 'it runs' is the only signal, and it is a weak one. Have the agent pin current behaviour first, then change it, so every difference is visible and intended.

    Premium answer
  209. 16
    Coding & computer usemediumDesign

    You need to migrate 300 files from an old internal API to a new one. How do you use a coding agent for it?

    Three hundred agent sessions each improvising the same change produce three hundred slightly different results. Let code do the repetitive part and the agent do the cases code cannot.

    Premium answer
  210. 17
    Coding & computer usemediumDesign

    Your coding agent's shell tool runs each command in a fresh process, and the agent keeps failing after a cd. Redesign the tool.

    A build-round question with a small useful part and a large defensive part. The strong answer keeps one shell alive with an end-marker protocol, then adds the checks that make it safe: compound-command splitting, a non-interactive environment, cleaned and capped output, and honest restarts.

    Premium answer
  211. 18
    Coding & computer usehardDesign

    Design the repository map for a coding agent on a 40,000-file monorepo so that its first read is usually the right file.

    A design question with a measurement at the end. The strong answer builds a definition-and-reference graph, ranks it with a walk seeded by the task, fills a token budget with capped entries, keeps the map stable within a run, and measures first-read accuracy.

    Premium answer
  212. 01
    Guardrails & policyeasyConcept

    What are guardrails for an AI agent, and why is an instruction in the system prompt not one?

    The definition question for the guardrails topic. The strong answer gives the one test a guardrail must pass, shows why prompt instructions fail it, lays out the layers of controls in code, and states the structural rule about agents that read untrusted content and can act.

    Answer available
  213. 02
    Guardrails & policymediumDesignEssential

    Draw the line between what the model proposes and what the system executes.

    Write it as a table for one real agent: every field of every action, and who decides it. The model proposes intent and content; identity, permissions, limits, recipients and the decision to execute come from the system.

    Answer available
  214. 03
    Guardrails & policymediumDesign

    An email the agent reads tells it to forward every invoice. What stops it?

    Assume the model may follow it. What stops the harm is structural: the email is labelled as data, the task's tools cannot forward in bulk, recipients come from the system, and a run that read untrusted mail needs a person before anything goes out.

    Answer available
  215. 04
    Guardrails & policyhardDesign

    An agent acts for Alice but must not inherit everything Alice can do. Design the delegation.

    Alice's permissions are the ceiling, not the grant. The agent gets the overlap of what Alice can do, what this agent may ever do and what this task needs, as a short-lived credential naming both of them.

    Answer available
  216. 05
    Guardrails & policyhardCode

    Write the policy for "refunds up to $100 for the customer being served; above that needs approval".

    One sentence hides six decisions: who the customer is, which order, which currency, what counts toward the limit, what approval means, and what happens at exactly $100. Write them down, encode them, and test the edges.

    Answer available
  217. 06
    Guardrails & policyhardConcept

    How can an agent leak data without a send tool?

    Any channel that crosses the system's edge can carry data: a link the chat window loads, a search query, an argument to a translation API, a shared document, a memory, a log line, a sandbox's network. Find them all, then put a control on each.

    Free with an account
  218. 07
    Guardrails & policymediumDesign

    Which actions need a human, and how do you keep approvals from becoming a rubber stamp?

    Decide by consequence, not by tool: what it costs if wrong, whether it can be undone, how unusual it is, and whether the run was exposed to untrusted input. Then make the few approvals that remain quick to judge well, and measure whether they are.

    Premium answer
  219. 08
    Guardrails & policyexpertDesign

    A low-privilege agent hands work to a high-privilege one. Prevent the escalation.

    If the high-privilege agent acts on its own authority whenever asked, every low-privilege agent effectively has its rights. The fix is that authority travels with the request, not with the agent receiving it.

    Premium answer
  220. 09
    Guardrails & policyhardDesign

    Design an audit trail for agent actions that a regulator would accept.

    Traces are for engineers. An audit trail answers different questions, completely and in a way nobody can edit unnoticed: who acted for whom, under which rules and versions, on what evidence, with whose approval, and with what result.

    Premium answer
  221. 10
    Guardrails & policyhardDesign

    Roll out policy enforcement on forty production tools without breaking customers.

    Turn it on in the dark first. Evaluate every call against the new rules while enforcing nothing, look at what would have been denied, fix the rules or the agent, then enforce tool by tool with a switch to go back.

    Premium answer
  222. 11
    Guardrails & policymediumConcept

    Where do credentials live in an agent system?

    Not in the prompt, not in the context, not in the sandbox, not in memory, not in logs. In a secrets manager and an identity system, reached by code outside the model, and turned into short-lived, narrow tokens for each call.

    Premium answer
  223. 12
    Guardrails & policymediumConcept

    What is the difference between an agent's workload identity and the user's delegated token, and when do you need both?

    One says which code is calling. The other says on whose behalf, and with what consent. An agent acting for a user needs both, and an audit that keeps them apart.

    Premium answer
  224. 13
    Guardrails & policymediumTrade-off

    Your guardrail checks add 900 ms to every agent turn. Which can run in parallel with the model, and which must stay inline?

    Running checks alongside the model saves time only where being late is harmless. Anything that guards a side effect has to finish before the side effect, however long it takes.

    Premium answer
  225. 14
    Guardrails & policymediumDebug

    A guardrail on your agent blocks 12% of legitimate requests. How do you reduce that without letting harmful ones through?

    Loosening the threshold until complaints stop is guessing. You need labelled examples of both kinds of mistake, a threshold chosen per risk, and a better route for the cases a single check cannot decide.

    Premium answer
  226. 15
    Guardrails & policymediumDesign

    Each refund your agent issues is within policy, but it issued 900 in an hour after a bad prompt change. What limit was missing?

    Per-action checks ask whether this refund is allowed. Nobody asked whether 900 allowed refunds in an hour is normal. Aggregate limits catch failures that every single check passes.

    Premium answer
  227. 16
    Guardrails & policyhardTrade-off

    A reviewer agent approves actions the worker agent proposes. Is that separation of duties, and what would make it real?

    Two agents sharing a model, a prompt style and the same context can make the same mistake twice. Separation of duties needs independence, and for some actions, a person.

    Premium answer
  228. 17
    Guardrails & policyhardDesign

    Prove to an outside auditor that your agent's action log has not been edited since it was written, including by your own operators.

    A question about evidence rather than logging. The strong answer separates the audit log from the trace, chains and signs each entry, anchors the chain head outside the operators' control, minimises content so the log can be shown, and demonstrates a verification an auditor can run alone.

    Premium answer
  229. 01
    System designeasyDesign

    How do you approach an agentic system design interview? Give the method you would use on any prompt.

    The meta-question for the design round. The strong answer gives a fixed sequence of steps that each leave an artefact on the board, starts with what a mistake costs rather than with architecture, puts numbers on the design, and says where to spend the time once the prompt is understood.

    Answer available
  230. 02
    System designhardDesignEssential

    Design a customer support agent that can issue refunds.

    Most of the conversation is open-ended; the refund is not. Give the model freedom to understand and investigate, and put identity, eligibility, limits, approvals and exactly-once execution in code.

    Answer available
  231. 03
    System designhardDesign

    Design a deep research agent that writes a cited report.

    The hard part is not finding pages; it is making every sentence in the report traceable to a source that actually says it, at a cost and time the user accepts.

    Answer available
  232. 04
    System designexpertDesign

    Design a background coding agent for ten thousand engineers.

    An engineer assigns a ticket and comes back to a pull request. Behind that: a sandbox per task, the repository's own build and tests, credentials kept outside, a verification loop, a reviewable diff, and a platform that runs thousands of these at once.

    Answer available
  233. 05
    System designhardDesign

    Design an agent that helps on-call engineers triage incidents.

    At 3 a.m. the engineer needs a short, correct summary and a good first hypothesis, fast. Start read-only, cite every claim to a graph or log line, and let actions such as rollbacks wait for a person.

    Answer available
  234. 06
    System designexpertDesign

    Design an invoice-to-payment agent with zero tolerance for a wrong amount.

    Zero tolerance means the model never decides an amount. It reads invoices; deterministic checks against purchase orders and receipts decide what is payable; anything that does not reconcile goes to a person; and payments run through a pipeline that pays once.

    Free with an account
  235. 07
    System designhardDesign

    Design an email assistant that drafts replies and schedules meetings.

    Every email it reads was written by someone else, and every action it takes speaks for the user. Draft freely, send carefully, and keep the user's voice, contacts and calendar under the user's control.

    Premium answer
  236. 08
    System designexpertDesign

    Design an agent platform that fifty internal teams will build on.

    Fifty teams will each build something different. The platform's job is to make the safe way the easy way: shared runtime, tools, identity, policy, evaluation and observability, with teams owning their prompts, tools and outcomes.

    Premium answer
  237. 09
    System designhardDesign

    Design a voice agent that books appointments.

    Voice changes the constraints: every second of silence is felt, people interrupt, names and numbers get misheard, and there is no screen to show what will happen. Design for latency, confirmation by read-back, and an easy way to a person.

    Premium answer
  238. 10
    System designhardDesign

    Design a data-analysis agent that writes and runs SQL against production replicas.

    Three risks: wrong answers that look right, queries that hurt the replica, and data the user should not see. Give the model a semantic layer and examples, run SQL read-only with the user's permissions and hard limits, and check results before presenting them.

    Premium answer
  239. 11
    System designhardDesign

    You have six weeks to put an agent live at a bank. Plan it.

    Six weeks is enough for a narrow, well-controlled agent that helps people do their jobs, and not enough for one that moves money on its own. Pick the scope that can pass the bank's risk process in time, then plan backwards from that review.

    Premium answer
  240. 12
    System designhardDesign

    Your company runs forty agents. What makes a kill switch real, and what should the agent registry hold?

    A flag the agent reads is a request to stop. A real kill switch works when the agent is the thing that is broken, and the registry is what tells you which switch to pull.

    Premium answer
  241. 13
    System designexpertDesign

    Design a procurement agent that gets quotes from suppliers' agents and pays for approved orders.

    Three protocols, two companies, one buyer's money. The design is about which edge each protocol covers, whose authority each call carries, and what nobody on either side may do without a signed approval.

    Premium answer
  242. 14
    System designexpertDesign

    Design a browser agent that files insurance claims in a legacy web portal with no API, for a regulated insurer.

    The portal was built for people, changes without notice, and every submission is a regulated record. The agent can fill forms; it must not be the one deciding what is true or pressing submit unchecked.

    Premium answer
  243. 15
    System designexpertDesign

    Design an IT helpdesk agent that can grant employees access to internal applications.

    Most requests are routine and the agent should just handle them. The design problem is making sure the agent can only grant what policy already allows, and that everything else reaches the right approver.

    Premium answer
  244. 16
    System designexpertDesign

    Design an agent that reviews incoming supplier contracts for a legal team and flags terms that deviate from the company's standards.

    Lawyers will not trust a summary. They will trust a list of specific clauses, each quoted with its location, compared against the company's own position, with the agent's uncertainty visible.

    Premium answer
  245. 17
    System designhardEstimate

    Estimate the capacity and cost of a support agent handling 50,000 conversations a day. Walk through your numbers.

    Two concurrency numbers, not one: conversations open and agents actually working. Then tokens per minute against your rate limits, cost per resolved conversation, and the one term that dominates the bill.

    Premium answer
  246. 18
    System designmediumDebug

    A caller cut your voice agent off mid-sentence. Later it says "as I mentioned, the fee is waived". What went wrong?

    The audio stopped, but the transcript did not. If the agent's history keeps the whole generated sentence, the model believes the caller heard all of it.

    Premium answer
  247. 19
    System designhardDebug

    Write the playbook the on-call engineer opens when the agent fleet's spend is eight times normal at 2am with no errors in the logs.

    An operations question with a clock on it. The strong answer contains before it diagnoses, names the first query that finds the loop, reconciles any side effects through the audit log, says who is told, and ends with the budget, the detector and the regression case that come out of it.

    Premium answer
  248. 20
    System designmediumDesign

    Design the approval card and the undo path for an agent that sends emails to customers on behalf of support staff.

    A design question about the person in the loop. The strong answer builds the card from the pending action with its arguments bound to the approval, scales consent to risk with a hold window for routine mail, designs undo from the effect's reversibility, and keeps the step view honest.

    Premium answer
  249. 01
    Coding roundseasyConcept

    What does a build-an-agent coding round test, and how would you prepare for one in a week?

    The orientation question for the coding round. The strong answer names what is being assessed, gives the skeleton to know by heart, plans the clock, explains why a scripted fake model makes the tests deterministic, and lays out a week of preparation that builds the skeleton into reflex.

    Answer available
  250. 02
    Coding roundsmediumCodeEssential

    Implement a tool-calling loop with validation, a step budget and error results in 45 minutes.

    The interviewer is checking four things: the loop terminates, bad calls become useful observations instead of crashes, the budget holds, and you can prove all of it with a scripted model.

    Answer available
  251. 03
    Coding roundshardCode

    Implement a dispatcher that runs independent calls in parallel and dependent ones in order.

    Reads that do not depend on each other run together; writes, and calls that need another call's result, wait their turn. Results come back keyed by call id, in the order the model asked, with timeouts that cannot hang the turn.

    Answer available
  252. 04
    Coding roundsmediumCode

    Implement retries with backoff, jitter and a retry budget for an agent's tools.

    Retry only what can succeed on retry, wait longer each time with randomness, stop when a shared budget says the service is struggling, and hand the model a clear result when retries are over.

    Answer available
  253. 05
    Coding roundsmediumCode

    Implement a loop detector over normalised tool calls.

    Exact repeats are easy and rare. The useful detector normalises calls so rewordings collide, watches a sliding window, notices cycles, and tells the loop what to do rather than just raising an alarm.

    Answer available
  254. 06
    Coding roundshardCode

    Implement compaction that keeps decisions, open tasks and identifiers.

    The summariser is a model and will miss things, so the code around it carries the guarantees: extract what must survive into structure first, ask the model only for the narrative, and refuse a summary that dropped an identifier or a promise.

    Free with an account
  255. 07
    Coding roundsmediumCode

    Implement an idempotent write wrapper keyed on business intent.

    The key must be the same however the repeat happens: a transport retry, the model asking twice, a crash replay. Derive it from what the action means, store it atomically with the result, and refuse the same key with different arguments.

    Premium answer
  256. 08
    Coding roundsmediumCode

    Write the test harness for an agent with a scripted fake model.

    Make the model and the tools injectable, script both, record everything the agent did, and write assertions about behaviour that a real model run could never guarantee to reproduce.

    Premium answer
  257. 09
    Coding roundshardCode

    Implement pass^k measurement with a confidence interval.

    Per task, use the unbiased estimator from n runs; across tasks, average; for the interval, resample tasks, not runs, because runs of the same task are not independent.

    Premium answer
  258. 10
    Coding roundsmediumCode

    An AI-assisted build round: how do you steer and verify the tool while someone watches?

    The interviewer cannot see your thoughts, only your prompts, your reviews and your tests. Make all three visible and deliberate, keep every request small enough to check, and own every line you accept.

    Premium answer
  259. 11
    Coding roundshardCode

    Extend your loop to stream progress and support cancellation.

    Progress is a stream of events the loop emits; cancellation is a signal the loop checks at safe points and propagates into running tools. The test is that a cancelled run stops quickly, leaves no half-done write, and says how it ended.

    Premium answer
  260. 12
    Coding roundsmediumCode

    Implement an approval gate that binds each approval to the exact tool arguments it covers.

    The easy version stores 'approved: yes'. The version that passes the follow-ups fingerprints the arguments, expires, refuses changed calls, and is tested for each of those cases.

    Premium answer
  261. 13
    Coding roundsmediumCode

    Implement a tool-result shaper that fits results into a token budget and tells the model what it cut.

    Cutting a result at N characters is one line. Keeping the fields that matter, dropping whole records rather than half of one, and saying exactly what was left out is the part that changes the agent's behaviour.

    Premium answer
  262. 14
    Coding roundsmediumCode

    Implement the intake for an event-driven agent: deduplicate, drop its own echoes, and turn events into one task per business object.

    Three checks and a map, but each one fixes a production incident: redelivery, the agent waking itself, and two runs fighting over the same invoice.

    Premium answer
  263. 15
    Coding roundsmediumCode

    Implement a tool-call validator that rejects bad arguments with error messages the model can act on.

    Rejecting a call is easy. The part that changes the next turn is saying which field is wrong, what was received, and what a valid value looks like, all at once.

    Premium answer
  264. 16
    Coding roundsmediumCode

    Implement a checker that verifies a research agent's citations before the answer reaches the user.

    A citation is a claim that a source says something. Check three things in code: the source was actually fetched, it contains the quoted text, and every sentence that states a fact cites something.

    Premium answer
  265. 01
    Payments & commerceeasyConcept

    How can an AI agent pay for something? Name the pieces between 'buy this for me' and a settled payment.

    The orientation question for agent payments. The strong answer explains what a person's presence used to prove, names the three questions an agent purchase must answer explicitly, walks one purchase from intent to settlement, and puts the spending limits in code that holds when the agent is wrong.

    Answer available
  266. 02
    Payments & commercehardDesign

    Design a shopping agent that can complete purchases while the user is away.

    The agent choosing the shoes is the easy part. The design is about what the user signs before leaving, who checks the purchase against it, and what evidence exists when the order is wrong.

    Answer available
  267. 03
    Payments & commercemediumDebug

    The user says the agent bought the wrong item. What evidence decides who pays?

    Three parties will each say they did their job. The answer is a chain of signed objects that shows what the user allowed, what the agent chose and what the merchant offered, so the dispute is a comparison rather than an argument.

    Answer available
  268. 04
    Payments & commercemediumCode

    A large merchant's bot defences block your shopping agent. How do you get it recognised?

    Rotating IP addresses and copying a browser's headers is the scraper's playbook, and it ends with a ban. The durable answer is to make each request provably yours and let the merchant decide what a known agent may do.

    Answer available
  269. 05
    Payments & commercemediumDebug

    A research agent with x402 payments spent its whole daily budget overnight. How do you investigate and contain it?

    The daily cap did its job and still failed: it stopped the spending only after all of it was gone. The investigation is about which task spent it and why nothing smaller stopped it first.

    Answer available
  270. 06
    Payments & commercemediumTrade-off

    Users want the agent to reorder household items without asking each time. What do you let them authorise?

    A single approval that says 'reorder whatever we run out of' is convenient and indefensible. The design question is how narrow the standing authority can be while still saving the user a click.

    Free with an account
  271. 07
    Payments & commercemediumDesign

    Your company wants AI agents to buy from it directly. What must your checkout API provide?

    A human checkout hides state in a browser session and trusts the person clicking. An agent checkout has to make state explicit, prices authoritative, payment narrow and every step safe to retry.

    Premium answer
  272. 08
    Payments & commercemediumDesign

    A user revokes their shopping agent's authority while it is in the middle of a purchase. What must happen?

    Revocation is only real if the party that releases the money checks it. The agent's own cache of permissions is the last place it should live.

    Premium answer
  273. 09
    Payments & commerceeasyConcept

    Should an AI agent ever hold a company card number? What would you give it instead?

    A card number is a reusable credential for any amount at any merchant. An agent needs the opposite: authority for one purchase, from one merchant, up to one amount, for a short time.

    Premium answer
  274. 10
    Payments & commercemediumDesign

    A shopping agent with a $200 per-purchase limit splits a $600 order into four purchases across merchants. How should limits be designed?

    A per-purchase cap is one number. What the user meant was a budget for a task, over a time window, across every merchant. Limits have to be cumulative and enforced outside the agent.

    Premium answer
  275. 11
    Payments & commerceeasyDesign

    The user approved a $480 cart. At payment time the merchant's total is $512. What should the agent do?

    The approval covered a specific cart at a specific price. A different total is a different purchase, unless the user said in advance how much drift they accept.

    Premium answer
  276. 12
    Payments & commercemediumDesign

    Finance asks for a monthly report proving every purchase your agents made was authorised. What do you need to have recorded?

    Card statements show what was paid. They do not show who allowed it, within what limits, or which agent run did it. That chain has to be recorded when the payment happens.

    Premium answer
  277. 13
    Payments & commercemediumDesign

    Your agent pays a per-request API, and after payment the response is empty or useless. How should the agent and the payment layer handle it?

    Per-request payment settles before you see the result. The agent cannot get the money back by asking nicely, so it has to stop paying for bad results quickly and leave evidence for a claim.

    Premium answer
  278. 14
    Payments & commercemediumDesign

    Mid-checkout, the card issuer asks for a step-up authentication challenge. The agent cannot complete it. What should happen?

    The challenge exists to prove the cardholder is present. The agent must not try to pass it; it has to hand that one step to the person and keep everything else ready for when they return.

    Premium answer
  279. 15
    Payments & commercemediumDesign

    How do you test a purchasing agent end to end without moving real money, and still catch the failures that matter?

    A happy-path purchase in a sandbox proves little. The failures that cost money are declines, timeouts after charging, duplicate webhooks, price changes and revoked mandates, and you have to make each one happen.

    Premium answer
  280. 16
    Payments & commercehardDesign

    Agent-placed orders at your store are growing and your fraud model flags most of them. How do you accept good agent orders safely?

    Your fraud model learned that automated traffic is suspicious. Agent orders are automated by definition, so the useful signals are who operates the agent, what the user authorised, and how the payment credential is bound.

    Premium answer
  281. 01
    Frameworks & SDKseasyTrade-off

    How do you compare agent frameworks? Name what every one of them has in common and the questions that separate them.

    The comparison question, asked to see whether you compare mechanisms or logos. The strong answer names the loop every framework wraps, then asks six questions about control, state, pause and resume, delegation, integration and visibility, and says how the answers decide for a given system.

    Answer available
  282. 02
    Frameworks & SDKsmediumTrade-off

    Why did you choose that agent framework, and what did you still have to build?

    Interviewers do not want the feature list. They want the requirement that decided it, the failure you tested, and the honest list of things the framework did not do for you.

    Answer available
  283. 03
    Frameworks & SDKsmediumDebug

    After adding a human approval step, customers receive every confirmation email twice. Debug it.

    Nothing is wrong with the email service and nothing is wrong with the model. The duplicate comes from what the framework runs again when the approval arrives.

    Answer available
  284. 04
    Frameworks & SDKshardDebug

    In an ADK agent, one customer's shipping address appeared in another customer's conversation. How did it happen?

    ADK's state dictionary has four lifetimes chosen by key prefix. One wrong prefix turns a private fact into something every user of the app can read.

    Answer available
  285. 05
    Frameworks & SDKsmediumCode

    Your organisation runs agents on Semantic Kernel and AutoGen. How do you plan the move to Microsoft Agent Framework?

    A framework migration is a behaviour migration. Inventory what each system relies on, write the tests that pin that behaviour down, then move the pieces that map cleanly before the ones that do not.

    Answer available
  286. 06
    Frameworks & SDKsmediumDebug

    Your CrewAI research crew sometimes skips the fact-check task. Fix it without losing what the crew does well.

    The manager agent is doing exactly what a hierarchical process allows: deciding what runs. A step that must always run belongs in code.

    Free with an account
  287. 07
    Frameworks & SDKsmediumCode

    Add a human approval to an OpenAI Agents SDK agent so it survives a server restart.

    The SDK will pause the run for you. Whether the pause survives a deploy depends on where you put the state, and whether the approval still means anything when it comes back.

    Premium answer
  288. 08
    Frameworks & SDKsmediumDesign

    Design the permissions for a Claude Agent SDK agent that works in your company's monorepo.

    Permission modes, an allowlist, a callback and hooks each decide something different. Layer them so the dangerous commands are impossible, the risky ones ask, and the agent is not interrupted for everything else.

    Premium answer
  289. 09
    Frameworks & SDKsmediumDebug

    Two parallel LangGraph branches both add findings, but only one branch's findings survive. Debug it.

    The graph ran both branches. The state kept one answer because nothing told it how two updates to the same field should combine.

    Premium answer
  290. 10
    Frameworks & SDKsmediumCode

    Your agent is built on a framework. How do you test it in CI without calling a real model or real tools?

    Every framework lets you swap the model and the tools somewhere. Find those seams, put scripted fakes in them, and test your graph's behaviour rather than the model's mood.

    Premium answer
  291. 11
    Frameworks & SDKseasyDebug

    Your framework-based agent behaves oddly and you suspect the prompt the framework builds. How do you see exactly what was sent to the model?

    Frameworks add system text, tool schemas and reformatted history you never wrote. Debugging from your own prompt template means debugging the wrong input.

    Premium answer
  292. 12
    Frameworks & SDKsmediumDesign

    Your agent framework released a new major version. How do you upgrade without changing your agent's behaviour unexpectedly?

    A framework upgrade can change prompts, defaults, retries and state formats without a line of your code changing. Treat it like a model change: compare behaviour, not just whether it compiles.

    Premium answer
  293. 13
    Frameworks & SDKsmediumDebug

    Each turn of your framework-based agent takes four seconds longer than one model call should. Where is the time going?

    Frameworks make model calls you did not write: to parse output into a schema, retry a malformed one, summarise memory or pick the next agent. Count the calls before optimising anything.

    Premium answer
  294. 14
    Frameworks & SDKsmediumDesign

    One team built its agent on ADK, another on LangGraph, and they now need to work together. How do you connect them?

    Rewriting one agent in the other framework is the expensive answer. Agree on a boundary instead: a protocol for agent-to-agent tasks, or a tool interface if one side only needs a capability.

    Premium answer
  295. 15
    Frameworks & SDKsmediumTrade-off

    Should your agent use the framework's built-in memory and session storage, or your own store?

    Built-in memory is quick to start with. The questions that decide it come later: can you delete a user's data, migrate it, query it, and survive a framework upgrade?

    Premium answer
  296. 16
    Frameworks & SDKsmedium

    Users should see the agent's steps live: tool calls, approvals, progress. How do you stream them from your framework to the UI?

    Every framework emits events in its own shape. Translate them once into a small, stable event vocabulary the UI understands, so the UI does not change every time the agent's internals do.

    Premium answer
  297. 17
    Frameworks & SDKsmediumDesign

    Your framework-based agent must return a result your billing system can ingest. How do you guarantee the final output matches the schema?

    Asking for JSON in the prompt works most of the time. A downstream system needs every time, which means a declared output type, constrained generation where available, validation in code, and a defined failure.

    Premium answer
  298. 01
    HarnesseseasyConcept

    What is an agent harness, and how is it different from a framework and from the model?

    The definition question for the harness topic. The strong answer lists the parts a harness assembles around the model, explains why the append-only session log is its backbone, draws the line between harness and framework, and says why swapping the harness changes results from the same model.

    Answer available
  299. 02
    HarnesseshardDesign

    Design the harness for an internal coding agent that fixes failing tests across your company's repositories.

    The model is a line in the config. The design is the sandbox it runs in, the permissions on every command, the log you replay when it breaks main, and the exit that says 'done' only when the tests do.

    Answer available
  300. 03
    HarnessesmediumMeasure

    A teammate rewrote the agent's tool guidance and says it is better because the demo task now passes. How do you decide?

    One passing run is a coin that landed heads. The decision needs the same tasks, several runs per version, a reliability measure and the cost, compared side by side.

    Answer available
  301. 04
    HarnessesmediumDebug

    A lead agent shipped a wrong answer built on a subagent's report that turned out to be cut off. What should the harness have done?

    The subagent did tell the harness it stopped early. The bug is that nobody upstream looked at why it stopped.

    Answer available
  302. 05
    HarnessesmediumTrade-off

    Release procedure, Jira access, codebase exploration, never push to main: which agent mechanism for each?

    Each need has a different shape: occasional knowledge, access to a system, isolation of noisy work, and a rule that must hold. Use the wrong mechanism and the rule becomes a suggestion.

    Answer available
  303. 06
    HarnesseseasyConcept

    What belongs in the harness rather than in the system prompt?

    The prompt is advice the model reads. The harness is code that runs whatever the model decides. Anything that must be true every time belongs in the second.

    Free with an account
  304. 07
    HarnessesmediumDesign

    Design an agent's session log so any failed run can be replayed and explained.

    If you cannot rebuild exactly what the model saw at step 23, you cannot explain step 24. The log has to be designed for that, not left to whatever the framework prints.

    Premium answer
  305. 08
    HarnesseshardTrade-off

    An automated optimiser proposes edits to your agent's prompts, tool guidance and subagents. How do you decide whether to accept them?

    A model proposing harness edits is just another author, one that writes faster and fits whatever evidence it is shown. Review it like code, and test it on evidence it did not see.

    Premium answer
  306. 09
    HarnessesmediumDebug

    A config change dropped a policy plugin and the agent ran a forbidden command. How do you prevent a repeat?

    In a harness where everything is a plugin, the list of loaded plugins is a security setting. Treat it like one.

    Premium answer
  307. 10
    HarnessesmediumDesign

    Use a harness hook to stop a coding agent from running destructive shell commands. What can a hook enforce, and what can't it?

    A hook that pattern-matches 'rm -rf' will be beaten by a script that does the same thing. Hooks are good for policy and feedback; containment has to come from the sandbox underneath.

    Premium answer
  308. 11
    HarnessesmediumTrade-off

    Your harness spends 30,000 tokens on instructions and tools before a task starts. What should load up front, and what on demand?

    Everything loaded up front is paid on every turn and competes for the model's attention. Keep the always-needed core small and let the agent pull in the rest when the task calls for it.

    Premium answer
  309. 12
    HarnessesmediumDesign

    You want to run your coding agent's harness headless in CI to fix failing builds automatically. What changes from interactive use?

    Nobody is there to approve a command or answer a question. Everything the interactive session asked a person about has to become a rule, a budget or a stop.

    Premium answer
  310. 13
    HarnessesmediumDesign

    Design the permission modes for a coding agent harness, from 'ask before everything' to 'run unattended'. What changes between them?

    A mode is a bundle of decisions: which tools run without asking, where writes may land, what reaches the network. Make each bundle explicit, so 'auto' never quietly means 'everything'.

    Premium answer
  311. 14
    Harnessesmedium

    Two hours into a coding session, after compaction, the agent reverses a design decision the user made early. What should the harness keep?

    A summary keeps what seemed important to the summariser. User decisions and constraints must not depend on that judgement; the harness should keep them as their own record.

    Premium answer
  312. 15
    HarnessesmediumDesign

    Your team wants to reuse its coding agent harness for data analysis work. What carries over, and what has to change?

    The loop, sandbox, file tools and permissions carry over almost unchanged. Verification does not: there is no test suite that says an analysis is right, so the harness has to supply other checks.

    Premium answer
  313. 16
    HarnesseshardMeasure

    A harness change improves success with one model and lowers it with another. Your harness supports both. What do you do?

    Models differ in how they read tool descriptions, follow formats and use context. A harness tuned for one is not neutral for the others, and per-model configuration is often the honest answer.

    Premium answer
  314. 17
    HarnessesmediumDesign

    How should a coding harness show files and command output to the model so that edits are accurate and context stays small?

    Line numbers, ranges, truncation notes and stable formatting look like details. They decide whether the model edits the right lines and whether a 5,000-line file eats the window.

    Premium answer
  315. 18
    HarnessesmediumDebug

    Your harness has a stop hook that keeps the coding agent working until the tests pass. One run went 300 turns overnight. What do you change?

    A gate that refuses to let the agent stop is a good idea with no exit. Give it a loop guard, a budget and a way to fail honestly.

    Premium answer
  316. 01
    Optimisation & tuningeasyEstimate

    What does an agent task cost? Show where the tokens, the seconds and the money go in one run, and what you would cut first.

    The entry question for the optimisation topic. The strong answer chains the cost of one run from steps and context, shows that re-read input dominates, puts latency on the same chain, and works down the ladder of cuts from steps to context to tools before touching the model.

    Answer available
  317. 02
    Optimisation & tuningmediumDebug

    An agent task costs too much and takes 90 seconds. How do you cut both systematically?

    The tempting answer is a cheaper model. The systematic one starts from the trace, finds where the tokens and seconds actually go, and pulls the cheapest lever first.

    Answer available
  318. 03
    Optimisation & tuningmediumTrade-off

    A frontier model improves your agent's accuracy by 2 points but triples inference cost. How do you decide?

    Two points of what, on which tasks, measured how many times? And is the choice really all of the traffic on one model or all on the other?

    Answer available
  319. 04
    Optimisation & tuninghardDesign

    Design the reward for training a coding agent with reinforcement learning. What makes it useful?

    The agent will optimise exactly what you reward. A useful reward checks the real outcome where the agent cannot reach it, is neither always won nor always lost, and closes the hacks you can predict.

    Answer available
  320. 05
    Optimisation & tuningmediumConcept

    What does a prompt optimiser like MIPROv2 or GEPA actually search, and when would you use one?

    They search instructions and examples against your metric. Whether that helps depends almost entirely on the metric and the data you give them.

    Answer available
  321. 06
    Optimisation & tuninghardConcept

    Does training a tool-use agent with GRPO necessarily make it better? What would you check?

    It optimises the reward on the tasks you give it. Whether the agent gets better at your real work depends on the reward, the task mix and what you measure afterwards.

    Free with an account
  322. 07
    Optimisation & tuningmediumCode

    How would you train a router from your frontier agent's traces so easy steps go to a small model safely?

    The traces already contain the labels you need, if you are careful about which ones you trust. The threshold is a quality decision, and the fallback is not optional.

    Premium answer
  323. 08
    Optimisation & tuninghardTrade-off

    When would you train an agent with reinforcement learning rather than optimise its prompts?

    Prompt optimisation changes what you say to the model. RL changes the model. The second costs far more to build and to own, so it needs a reason the first cannot meet.

    Premium answer
  324. 09
    Optimisation & tuningmedium

    After a release, your agent's prompt cache hit rate fell from 80% to 20% and cost nearly tripled. Find the cause.

    Caches match an exact prefix. One timestamp, a reordered tool list or a per-user line near the top of the prompt makes every request start from scratch.

    Premium answer
  325. 10
    Optimisation & tuningmediumDebug

    Output tokens make up most of your agent's model bill. Where do they come from, and how do you cut them without hurting results?

    Output tokens usually cost several times more than input tokens. An agent that narrates every step, rewrites whole files and explains its tool calls pays for prose nobody reads.

    Premium answer
  326. 11
    Optimisation & tuninghardDebug

    A small model distilled from your large agent matches it on the eval set but fails more often in production. Why, and what do you do?

    The student learned the teacher's behaviour on the traces you gave it. Production sends inputs those traces never covered, and the eval set came from the same place as the training data.

    Premium answer
  327. 12
    Optimisation & tuningmediumDesign

    Your agent makes 14 model calls per typical question and users say it is slow. How do you cut round trips without losing accuracy?

    Most of those calls are the model asking for one small thing at a time. Change what it can ask for and how many things it can ask for at once, then check accuracy did not move.

    Premium answer
  328. 13
    Optimisation & tuninghardMeasure

    Your agent succeeds 90% of the time on a task, but customers need it to succeed every time they run it. What do you optimise, and how?

    Ninety percent per run sounds good until a user runs it five times. Consistency comes less from a smarter model than from removing the steps where runs diverge.

    Premium answer
  329. 14
    Optimisation & tuningeasyMeasure

    A change cut your agent's cost per task by 25%, and the team wants to celebrate. What should you check before you do?

    Cost per task falls if the agent gives up sooner. The number that matters is what you pay for each task done right, including the people who clean up the rest.

    Premium answer
  330. 15
    Optimisation & tuningmediumDesign

    Your agents process 40,000 documents each night. How would batch model APIs cut the cost, and what changes in the agent's design?

    Batch APIs trade latency for a lower price. An agent loop that expects each answer in seconds has to become a pipeline of rounds, where each round waits for a whole batch.

    Premium answer
  331. 16
    Optimisation & tuningmediumTrade-off

    Your agent's prompt has 12 hand-picked examples. How do you decide which examples to include, and should they change per request?

    Examples steer behaviour more than instructions do, for better and worse. Pick them with a metric, and weigh per-request examples against the prompt cache they break.

    Premium answer
  332. 17
    Optimisation & tuninghardTrade-off

    Could you cut agent latency by starting likely tool calls before the model asks for them? When is that safe?

    Prefetching a read the model will probably ask for can hide seconds of latency. Prefetching a write is a side effect nobody asked for. The line is whether a wasted call costs anything.

    Premium answer