Claude Certified Architect – Foundations Practice Question 51: Agent SDK vs Raw Loop

Claude Certified Architect, Foundations · Test 6 · question 1 of 10

Agent Architecture & Orchestrationeasy

A platform team wants a maintenance agent that reads a repository, edits files, runs shell commands, and resumes long sessions. It must run inside the team's own process and infrastructure, and the team does not want to write or maintain the tool-execution loop, file and shell tools, permission checks, or session handling themselves. Which approach fits best?

Select one answer
Show answer and explanation

Answer:

  • B. Embed the Claude Agent SDK, which runs the agent loop and supplies built-in tools, permissions, hooks, and sessions

B is correct. The Agent SDK is a library for embedding Claude Code's agent in your own Python or TypeScript application, in a process you operate. It brings the agent loop plus built-in tools, permissions, sessions, and hooks, so the team writes configuration instead of infrastructure.

A is wrong for this team because calling the Claude API directly means you write the tool loop yourself (the client SDKs offer a beta tool runner for the loop only, not file tools, permissions, or sessions). Hand-rolling is right when you need full control of every step, which is not the stated goal. C is wrong because a single request cannot read files, run commands, or observe results, so it is not an agent. D is wrong because the Batches API is for asynchronous bulk requests; it does not execute tools or loop on results.

Reference: Agent SDK overview

Practice Test 6 ›

Study guides for Claude Certified Architect, Foundations