Claude Agent SDK
Build your own agents on the same harness as Claude Code.
The SDK that exposes Claude Code's agent loop, including tools, permissions and subagents, so you can build a custom agent instead of scripting a chat API by hand.
Works with
Key info
- Pricing
- Paid
- Category
- Agents
- Best for
- Expert
- What it is
- A framework: a code library for building your own agent
- Do you need to code?
- Yes, in Python or TypeScript
- Cost
- The library is free; you pay for Claude usage with an API key or your Claude plan's Agent SDK credit
- Models
- Claude, also through Amazon Bedrock, Google Vertex AI or Microsoft Foundry
- Install
- pip install claude-agent-sdk, or npm install @anthropic-ai/claude-agent-sdk
- Good for
- Building an agent with the same tools and permissions Claude Code uses
Related reading
- Context engineering
Writing your first skill
You already have a skill in you: the thing you keep typing into every session. Write it down once.
Intermediate - Fundamentals
Row level security is the security boundary
If your database rows are protected by a check in your application code, they are not protected. Anything holding a key can talk to the database directly, an…
Expert