Claude Agents SDK
- Claude SDK is kind of different from other sdks, it internally uses claude code cli
- It has two entry points (no Agent Object)
- query (stateless)
- ClaudeSDKClient (Memory can be enabled)
- It supports tools. We get built in tools and custom tool will be treated as mcp
- Response will have messages of various types
- ResultMessage
- SystemMessage
- AssistantMessage: Will have sub types
- UserMessage
-
There is a configuration Object
-
Refer Here for api reference
-
message types: Refer Here
Setup
- install the following package
uv add claude-agents-sdk
- Refer Here for the code
