Claude Code Field Guide
34 / 35

The Agent SDK (New Since the Video)

The same engine that powers Claude Code, available as a Python/TypeScript library for building your own fully custom agents.

Updated since the video
Currency check: New concept — the video's “headless mode” is actually the CLI entry point into this same underlying SDK.

Non-interactive mode (-p) is really the CLI face of something bigger: the Agent SDK, which gives developers the same tools, agentic loop, and context management that power Claude Code itself, as a Python or TypeScript package. Instead of scripting around the CLI, you get full programmatic control — structured outputs, tool-approval callbacks, and native message objects — to build a completely custom agent with Claude Code's underlying capabilities but your own interface and rules around it.

This is the right layer to reach for when you're not just automating a Claude Code task, but building an actual product or internal tool where Claude Code's engine is one component among several.

An internal support-ticket triage agent

A company builds a small internal tool on the Agent SDK that reads incoming support tickets, drafts a response, and only asks a human to approve replies above a certain confidence threshold — a genuinely custom agent, not a scripted Claude Code call.

Embedding agent capability inside an existing product

A SaaS product with its own UI uses the TypeScript SDK to add an “auto-fix this” button that runs a scoped Claude Code agent behind the scenes, with the SDK's approval callbacks giving the product fine control over exactly what it's allowed to touch.