Agent frameworks
Claude Agent SDK
The Claude Code harness as a library: built-in file, shell, and search tools, subagents, hooks, and permissions.
- Category
- Agent frameworks
- Pricing
- Open source
- Runs
- Self-hosted
- Languages
- Python, TypeScript
- Interface
- Library
- Source
- Open source
What Claude Agent SDK is
This is Claude Code packaged as a library rather than an application. You get the same harness — built-in file, shell, and search tools, context management, subagents, hooks and permissions — driven by a prompt and an options object. It is the shortest path to an agent that works on a filesystem, because the tools that make that hard are already written.
Best for
Filesystem- and shell-shaped agents where the built-in tool set is most of what you need.
Consider something else if
It targets Claude models, and it is a harness rather than a general orchestration library — you host and deploy it yourself.
Claude Agent SDK alternatives
The closest options in agent frameworks, on the axes that actually separate them.
| Tool | Best for | Pricing | Runs |
|---|---|---|---|
| Claude Agent SDKopen source | Filesystem- and shell-shaped agents where the built-in tool set is most of what you need. | Open source | Self-hosted |
| LangChainopen source | Projects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph. | Open source | Hosted or self-hosted |
| Pydantic AIopen source | Python teams already using Pydantic who want type safety and a framework small enough to hold in your head. | Open source | Self-hosted |
| Mastraopen source | TypeScript and Node teams who want a framework designed for their stack instead of a translated one. | Open source | Hosted or self-hosted |
| LlamaIndexopen source | Retrieval-heavy applications where document ingestion and indexing are the hard part. | Open source | Hosted or self-hosted |
| DSPyopen source | Tasks with a measurable metric and enough examples to optimise against, where hand-tuned prompts keep drifting. | Open source | Self-hosted |
Choosing within agent frameworks
Language, honestly
Most of this category is Python-first. If your service is TypeScript, the shortlist is genuinely shorter, and a thin layer over the provider SDK is often better than a half-maintained port.
How much it hides
Some frameworks give you primitives you compose; others give you an agent you configure. The second is faster to a demo and harder to debug at depth. Match this to how much novel behaviour you expect to need.
Questions
What is Claude Agent SDK?
This is Claude Code packaged as a library rather than an application. You get the same harness — built-in file, shell, and search tools, context management, subagents, hooks and permissions — driven by a prompt and an options object. It is the shortest path to an agent that works on a filesystem, because the tools that make that hard are already written. It is open source and self-hosted.
What are the alternatives to Claude Agent SDK?
The closest alternatives are LangChain, Pydantic AI, Mastra, LlamaIndex, DSPy. They sit in the same category — agent frameworks — and differ mainly on hosting model, pricing shape, and how much they abstract away.
Is Claude Agent SDK the right choice?
Filesystem- and shell-shaped agents where the built-in tool set is most of what you need. The main caveat: It targets Claude models, and it is a harness rather than a general orchestration library — you host and deploy it yourself.
Whatever you build on, the model is the line item that scales. See what each one costs per million tokens, or price your own workload.