Anthropic Agent Coding Interview

The “Agents / Coding with LLMs” round, from real candidate reports

This is the round almost no prep site covers: you write code that uses the Anthropic API as a building block, designing prompts and a tool-use loop to build an agent. Below is what it actually is, the reported task, the format, and how to prepare — reconstructed from real candidate reports, not a job description.

Key facts

  • •~55-minute coding round over Google Meet, screen-share, in a Colab notebook — open-book on docs.
  • •Tests building a Claude agent loop with tool use: the recruiter brief says it evaluates "writing code with LLMs as a building block, and prompting to create an agent."
  • •Reported task: extend a single-tool-call stock-price agent into a loop that handles multi-step, multi-tool questions.
  • •A staged variant scores the progression rather than the finished agent — it starts from repairing the supplied code and tightens from there.
  • •Appears in SWE phone screens and on the research track (Research Engineer / Research Scientist / Fellowship).
  • •Reconstructed from real candidate reports · refreshed monthly · last updated October 2026.

What this round is

Anthropic’s recruiter brief for this interview is explicit: “This interview will test writing code with LLMs as a building block, and prompting to create an agent. You should be conceptually familiar with Tool Use and Agent Loops and how they are handled in our API. The interview is open-book and we provide starter code for using the API, so there’s no need to memorize exact API syntax.”

In plain terms: it is not a LeetCode round. You get a working starter cell that wraps the Messages API and a tool-use schema, and your job is to build the agent loop around it — parse the model’s response, dispatch its tool_use calls to your code, feed tool_result blocks back, and iterate until the model is done.

Two variants candidates report

Most reported
Build an agent

You write a Claude agent loop that uses tools to solve a multi-step problem. This is the distinctive Anthropic flavor and the focus of this guide.

Reported Jun–Sep 2026
Code with an AI tool

Coding WITH an assistant: the Claude Code CLI in a browser environment similar to Visual Studio Code + GitHub. The prompt says the round evaluates your ability to write and review code using AI tools. Two candidates describe four pull requests; one was asked to review all four, then improve one. One report gives 55 minutes. No report says how it is graded.

The AI-assisted round has its own page: AI-Assisted Coding: Four Pull Requests with Claude Code →

The reported task: a stock-price agent

The most concrete instance candidates describe is a stock-price agent. The starter code answers questions that need only a single tool call; your job is to grow it into a real agent loop. A later part asks you to reduce the number of turns the agent needs — part prompt engineering, part loop structuring.

A closely related variant scores the progression in explicit stages rather than as one pass/fail task, and that is the shape most recent reports describe. It opens where you would expect — repair the supplied code until the agent works — and then tightens from there. The staged requirements, and what each stage is actually graded on, are on the question page.

One candidate who completed every stage in 55 minutes noted the interview version felt like the published one “with a slight variation” — so drilling the exact loop, not memorizing one answer, is what pays off.

Format & logistics

  • •~55 minutes, over Google Meet with screen-share, typically in a Colab notebook.
  • •Starter cell wraps the Messages API and the tool-use schema — no need to memorize syntax.
  • •Open-book on documentation; the interviewer watches how you iterate on prompts and structure the loop.
  • •Appears in SWE phone screens (portal may show only “coding interview”, no question number) and on the research track (RE / RS / Fellowship).
  • •The coding round is team-dependent — some candidates get a concurrency/systems prompt instead. Confirm the flavor with your recruiter.

How to prepare

  • •Run through Anthropic’s public tool-use documentation once, end to end: define a tool, route tool_use turns back to your code, return tool_result blocks, and loop until end_turn.
  • •Practice writing an agent loop from a blank notebook in under 20 minutes.
  • •Keep a mental template for the prompt: role description, tool-catalog summary, output contract, exit condition — so you can refactor mid-round when the interviewer pushes on turn count or robustness.
ProInside the full breakdown

The part you actually get graded on

  • 🔒A runnable reference agent loop, walked through step by step — parse the response, dispatch tool_use to your code, return tool_result, loop until end_turn. Run it, modify it, see the multi-tool-call flow.
  • 🔒How to collapse the workflow from two turns to one — the prompt-structuring and parallel-tool-use moves, grounded in Anthropic’s tool-use docs.
  • 🔒A 20-minute drill template so you can build the loop from a blank notebook under time pressure.

Related

FAQ

What is the Anthropic 'Agents / Coding with LLMs' interview?▾
A ~55-minute coding round where you write code that uses an LLM (the Anthropic API) as a building block — designing prompts and a tool-use loop to build an agent that solves a multi-step problem. Anthropic's recruiter brief states it tests "writing code with LLMs as a building block, and prompting to create an agent," and expects you to be conceptually familiar with Tool Use and Agent Loops in their API. It is open-book on documentation, with starter code provided so you don't memorize API syntax.
What is the actual task in the Anthropic agent-coding round?▾
The most-reported task is a stock-price agent: the starter code handles single-tool-call questions, and you extend it into a real agent loop. Recent reports describe a variant that scores the progression in explicit stages, starting from repairing the supplied code — the staged requirements, and what each stage is graded on, are on the question page.
How long is it and what environment is used?▾
About 55 minutes over Google Meet with screen-share, typically in a Colab notebook. A starter cell wraps the Messages API and the tool-use schema. It is open-book on docs; the interviewer watches how you iterate on prompts and structure the loop.
Who gets the agent-coding round at Anthropic?▾
It shows up in standard SWE phone screens (the portal may list only "coding interview" with no question number) and on the research-adjacent track (Research Engineer / Research Scientist / Fellowship). The coding round is team-dependent — some candidates get a concurrency/systems prompt instead — so confirm with your recruiter which flavor you'll get.
How do I prepare for the Anthropic agent-coding interview?▾
Run through Anthropic's public tool-use documentation end to end at least once: define a tool, route the assistant's tool_use turns back to your code, return tool_result blocks, and loop until end_turn. Practice writing an agent loop from a blank notebook in under 20 minutes, and have a mental template for prompt structure (role, tool catalog, output contract, exit condition) so you can cut turns when the interviewer pushes on efficiency.
Is the Anthropic agent-coding interview hard?▾
Candidates describe it as unusual rather than algorithmically hard — it doesn't test data-structure tricks, it tests whether you can build and control an agent loop and reason about tool use. The difficulty is that it's unfamiliar: most prep sites don't cover it, the grading criteria are not clearly telegraphed, and the later stages push you to cut the agent's turn count, which requires deliberate prompt and loop structuring rather than just a working loop.
What is the difference between 'building an agent' and 'coding with AI' at Anthropic?▾
They are two different rounds people conflate. Building an agent (the round this page covers) means you write the agent loop and tool-use code yourself, using the Anthropic API as a building block. Coding with AI means you use the Claude Code CLI, in a browser environment similar to VS Code + GitHub, to review and change pull requests in a repository the interviewer provides; no report says how it is graded. This guide covers the build-an-agent round; the code-with-AI round appears in four Anthropic threads from June to September 2026 and has its own page.
Does Anthropic let you use Claude Code in the interview?▾
In the build-an-agent round, no — you write the agent loop yourself; it's open-book on documentation but you are not driving an AI assistant to write the code. There is a separate 'code with AI' round where using the Claude Code CLI is the point of the exercise: three 2026 reports describe a browser environment similar to VS Code + GitHub, and two describe a repository with four pull requests (in one, review all four, then improve one). One candidate says both the prompt and the recruiter named the round in advance; confirm with your recruiter which one you have.

Reconstructed from real Anthropic candidate reports. The recruiter brief, the stock-price task, the staged scoring, and the 55-minute Colab format are all corroborated across multiple reports. The “code with an AI tool” variant appears in four Anthropic candidate threads from June to September 2026 (two quote the invitation prompt, two describe the task), and no report says how it is graded. Refreshed monthly. Spot something off? Email support@aceoffer.app.

Is this helpful?