D1: Claude Agent SDK
Claude Certified Developer – Foundations exam practice questions · 10 flashcards
Question
What is the Claude Agent SDK?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Claude Agent SDK practice questions and answers
- What is the Claude Agent SDK?A library (Python and TypeScript) that gives you the same agent harness that powers Claude Code to build your own agents.
- What does the Agent SDK provide out of the box?The agent loop, built-in tools (file read/edit, bash, search, web), permissions, hooks, subagents, MCP support, sessions and automatic context compaction.
- What was the Agent SDK previously called?The Claude Code SDK.
- What is the simplest way to run an agent with the Python SDK?Call query() with a prompt and options, then iterate over the streamed messages.
- What does ClaudeSDKClient add over query()?A persistent, interactive session for multi-turn conversations with the same agent.
- How do you limit which tools the agent may use?Set allowed tools (and disallowed tools) in the agent options.
- How do you add custom tools to an Agent SDK agent?Define them as MCP tools, e.g. via an in-process SDK MCP server, or connect external MCP servers.
- How do you control how much the agent runs?Options such as max turns, permission mode and hooks bound its behavior.
- Why use the Agent SDK instead of writing your own loop?It handles tool execution, context management, permissions and error handling that you'd otherwise build yourself.
- Where should an Agent SDK agent that runs shell commands execute?In an isolated, sandboxed environment (e.g. a container) with limited permissions.