Agent frameworks

Claude Agent SDK

The Claude Code harness as a library: built-in file, shell, and search tools, subagents, hooks, and permissions.

Visit code.claude.com ↗

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.

Claude Agent SDK compared with 5 alternatives
ToolBest forPricingRuns
Claude Agent SDKopen sourceFilesystem- and shell-shaped agents where the built-in tool set is most of what you need.Open sourceSelf-hosted
LangChainopen sourceProjects that benefit from breadth of integrations, and teams who want explicit stateful graphs via LangGraph.Open sourceHosted or self-hosted
Pydantic AIopen sourcePython teams already using Pydantic who want type safety and a framework small enough to hold in your head.Open sourceSelf-hosted
Mastraopen sourceTypeScript and Node teams who want a framework designed for their stack instead of a translated one.Open sourceHosted or self-hosted
LlamaIndexopen sourceRetrieval-heavy applications where document ingestion and indexing are the hard part.Open sourceHosted or self-hosted
DSPyopen sourceTasks with a measurable metric and enough examples to optimise against, where hand-tuned prompts keep drifting.Open sourceSelf-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.

The full guide to agent frameworks →

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.