# Claude Agent SDK [Full Workshop]

Thariq Shihipar, Anthropic | AI Engineer CODE 2025 | 1:52:25

Source: https://www.youtube.com/watch?v=TqC1qOfiVcQ
Channel: AI Engineer (https://www.youtube.com/@aiDotEngineer). Summarised by AIE Talks.
Page: https://aietalks.com/talks/claude-agent-sdk-full-workshop
Published: 2026-01-05
Tags: context-engineering, guardrails, harness-engineering, tool-use

## TL;DR
- Agents build their own context, choose their trajectories, and act with more autonomy than single-turn features or fixed workflows.
- The strongest agent loops gather context, take action, and verify the result, with deterministic checks added wherever possible.
- The Claude Agent SDK packages the harness around Claude Code, including tools, prompts, file-system context, skills, subagents, hooks, and related infrastructure.

## Summary
Thariq Shihipar explains how Anthropic thinks about agents and then demonstrates the design process with a Pokémon research agent. He contrasts single-turn features, structured workflows, and agents that choose their own context and actions. The talk focuses on the agent loop: gather context, take action, and verify the result. Shihipar argues that Bash and the file system give agents a flexible way to compose commands, save intermediate results, inspect data, and work around context limits. He also discusses when to use structured tools, Bash, or generated code, along with permissions, sandboxing, reversible state, subagents, skills, and hooks. In the live prototype, Claude Code generates a TypeScript client for PokéAPI, writes scripts, searches Pokémon data, and analyzes Smogon information. The workshop is candid about the unfinished parts of agent design, especially large codebases, context management, reproducibility, and production deployment.

## Key ideas
### Agents choose their own context and trajectory
[02:10](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=130s)
Shihipar places agents after single-turn model features and structured workflows. Early systems handled tasks such as categorization. Workflows added fixed sequences, such as indexing a codebase for retrieval or returning the next file to edit. Agents such as Claude Code have much wider freedom. They build their own context, decide which actions to take, and work for longer periods with less restriction. He says agents are still imperfect, but considers this a good time to start building them. The Claude Agent SDK is built on Claude Code because Anthropic repeatedly rebuilt the same agent components while creating agents for coding and other domains.

### The harness includes tools, prompts, files, and skills
[04:25](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=265s)
The SDK packages the parts Anthropic found itself rebuilding. A harness contains tools that run in a loop, core prompts, transition prompts, and a file system. Shihipar treats the file system as part of context engineering, alongside tools, scripts, and files that the model can inspect. Skills add another layer of progressive context disclosure. A skill can be a folder containing detailed instructions and scripts for a repeatable task, such as creating DOCX files or doing front-end design. He says the SDK also includes concepts such as subagents, web search, compaction, hooks, and memory.

### Bash gives agents a composable general-purpose interface
[15:47](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=947s)
Shihipar repeatedly argues that Bash is what makes Claude Code powerful. It lets an agent save tool results to files, store memory, generate scripts, compose commands with tools such as grep and tail, and use existing software such as FFmpeg or LibreOffice. Instead of defining a separate search, lint, or execution tool for every use case, the agent can inspect the environment and use the available command-line software. For an email question about ride-sharing spending, it could search messages, grep for prices, save the results with line numbers, add the values, and inspect its own work. He describes this composability as useful for non-coding agents as well.

### Tools, Bash, and generated code fit different jobs
[25:36](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=1536s)
The speaker separates three ways for an agent to act. Structured tools are reliable and fast, but many tools consume context and are hard to compose. Bash uses less context and supports static scripts and composition, though the agent may need time to discover available commands. Generated code supports highly dynamic logic and API composition, but it takes longer to execute and may need linting or compilation. Shihipar recommends keeping tools for atomic actions that need guarantees, such as writing a file or sending an email. Bash fits composable work such as searching folders, using GitHub, linting, and maintaining memory. Generated code fits data analysis, deep research, and other flexible operations.

### A useful agent loop gathers, acts, and verifies
[21:58](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=1318s)
Shihipar describes an agent loop with three parts: gathering context, taking action, and verifying the work. Gathering context might mean finding relevant files in a codebase or relevant messages in an inbox. The design of that search deserves careful attention because agents often need to discover information rather than receive a complete context upfront. Taking action depends on having suitable tools, Bash access, or code generation. Verification is especially important when deciding whether a task is a good fit for an agent. Code can be linted, compiled, and executed. Research is harder to check, although source citations provide one form of verification. He recommends adding verification throughout the loop, not only at the end.

### Deterministic checks should handle as much verification as possible
[22:17](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=1337s)
The SDK can use errors and rules to steer an agent while it works. Shihipar gives an example from Claude Code: if the agent tries to write a file it has not read, the harness returns an error telling it to read the file first. Similar checks can limit the number of columns searched or prevent an oversized insertion, then ask the model to split the work. Models can read these error outputs and continue. For harder reviews, a separate subagent can inspect the main agent's result in a fresh context, which avoids polluting the main context with the review process. Shihipar still prefers rule-based checks wherever they are possible.

### Agents work better when state can be reversed
[1:05:05](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=3905s)
The reversibility of a task is a useful test for agent design. Code has a relatively simple recovery path because changes can be reviewed, reverted, or tracked in Git history. Computer use is harder because an incorrect action can add state that must be removed manually. Shihipar suggests turning complex operations into reversible state machines where possible. Checkpoints could let a user restore a spreadsheet to an earlier state, and he mentions a time-travel tool as an example of this direction. Permissions and sandboxing also matter. Anthropic's defense uses several layers, including model alignment, harness permissions and prompting, Bash parsing, and sandboxing of network and file-system operations.

### The Pokémon prototype uses Claude Code to discover and analyze data
[25:26](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=1526s)
For the live prototype, Shihipar builds a Pokémon agent around PokéAPI and related data. He first asks Claude Code to inspect the API and generate a TypeScript library, then gives the agent scripts and data it can use. A tool-calling version exposes separate operations such as getting a Pokémon, species, ability, type, or move. The Claude Code version can instead write and run scripts. When asked for Generation Two water Pokémon, it searches the API, checks types, and returns the matching Pokémon. Later, it reads Smogon data about Venusaur, finds teammates and counters, and generates an analysis script. The example shows how a small prompt and file-system context can replace a large custom agent implementation.

### Subagents and context resets keep long tasks manageable
[06:31](https://www.youtube.com/watch?v=TqC1qOfiVcQ&t=391s)
Shihipar recommends letting agents gather context through their tools instead of sending them a large static bundle of information. Subagents help isolate work that does not need to enter the main context. A search subagent might inspect a spreadsheet, the web, or several sheets, then return only its findings. Multiple subagents can work on separate parts of a large spreadsheet in parallel. He says subagents are especially useful with Bash, although parallel execution creates issues such as race conditions that the SDK handles. For Claude Code, he often clears the context and asks the agent to inspect current files or Git changes rather than carrying an entire conversation forward. In a spreadsheet agent, the product may need its own reset and summarization experience for less technical users.

## Notable quotes
- "Agents build their own context, decide their own trajectories, are working very, very autonomously." (03:13)
- "Bash is what makes Claude Code so good." (15:47)
- "The three parts to an agent loop are gather context, taking action, and verifying the work." (22:18)
- "Simple is not the same as easy." (23:46)
- "As much as possible, anytime you are thinking about verification, first step is what can you do deterministically?" (22:18)

## Tools & references mentioned
- Claude Agent SDK
- Claude Code
- Anthropic
- PokéAPI
- Smogon
- Bun
- TypeScript
- FFmpeg
- LibreOffice
- Playwright CLI
- Cloudflare
- Modal
- AWS
- DigitalOcean
- React
- jQuery
- Backbone
- Whisper Flow
- GitHub
- Docker
- SQLite
- Gmail
- McKinsey

## Who should watch
- You are building an agent and need to decide whether a structured tool, Bash interface, or generated code is the right boundary.
- Your agent must inspect its own environment, work over long tasks, or preserve intermediate context without putting every result in the model window.
- You are moving from a Claude Code prototype toward a customer-facing application and need practical guidance on sandboxing, hooks, subagents, and recovery.

## Related talks

- [How Claude Code Works](https://aietalks.com/talks/how-claude-code-works) (Jared Zoneraich, PromptLayer, 1:05:43)
- [Evolving Claude APIs for Agents](https://aietalks.com/talks/evolving-claude-apis-for-agents) (Katelyn Lesse, Anthropic, 13:25)
- [Claude Code & the evolution of agentic coding](https://aietalks.com/talks/claude-code-the-evolution-of-agentic-coding) (Boris Cherny, Anthropic, 18:12)
- [Claude Fable, Claude Tag, and Anthropic's Culture](https://aietalks.com/talks/claude-fable-claude-tag-and-anthropics-culture) (Cat Wu & Thariq Shihipar, Anthropic & Simon Willison, 51:30)
- [Claude for Long-Horizon Tasks](https://aietalks.com/talks/claude-for-long-horizon-tasks) (Lance Martin, Anthropic, 25:19)
