Anthropic builds specialized AI agents with new Claude SDK
Anthropic has introduced the Claude Agent SDK, a Python and TypeScript framework designed for developers to build specialized, purpose-built AI agents. Unlike the Agent Teams feature within Claude Code, which allows the model itself to spontaneously spawn and coordinate sub-agents for a single task, the SDK offers developers granular control over the agentic loop. With the SDK, developers define the agents, their system prompts, and their specific tool sets, creating a system where multiple distinct agents run within the developer's own infrastructure. The core philosophy of the SDK is specialization rather than generalization. Most agent frameworks provide a single generic agent capable of performing a wide range of tasks. In contrast, the SDK encourages building multiple narrow-mandate agents, each restricted to specific tools and permissions. For instance, a code security agent might only have permission to read files and search code, while a contract review agent is limited to processing documents. This separation ensures that no agent can perform actions outside its designated scope, enhancing safety and precision. The SDK provides two primary entry points for interaction. The query function serves as a one-shot asynchronous method ideal for single-task operations, allowing developers to send a prompt and stream results. The ClaudeSDKClient offers a session-based approach that maintains context across multiple turns, making it suitable for complex conversational agents or multi-step workflows. Both methods utilize a shared configuration surface where developers specify system prompts, allowed tools, and permission modes. Tools in the SDK define the physical capabilities of an agent, acting as its hands and feet. Built-in tools include file reading, shell command execution, web searching, and URL fetching. Developers can also create custom tools using the @tool decorator or the Model Context Protocol (MCP), allowing any Python function to be exposed to the agent. Permission modes further regulate autonomy, ranging from a default setting that requests user approval for destructive actions to an accept-edits mode for automatic file changes, or a bypass mode for fully autonomous operation. A standout feature of the SDK is the ability to orchestrate sub-agents. A parent agent can spawn specialized child agents to handle focused subtasks, such as a security reviewer or a performance engineer. Each sub-agent operates in its own isolated context, with the parent agent receiving only the final summary rather than the intermediate tool calls. This architecture ensures that a security specialist never inadvertently processes performance data, keeping each agent strictly within its lane. By separating the runtime provided by the SDK from the specialization defined by the developer, the framework enables the creation of robust, modular AI systems. This approach allows for the deployment of seven or more distinct agents as individual Python scripts, giving builders full authority over their AI workforce. The result is a flexible development environment where agents are purpose-built to execute specific roles within a larger application pipeline.
