AI Agent SDK vs Framework: When to Use Which

Updated May 2026
An AI agent SDK is a library from a model provider that gives you direct access to model capabilities, tool calling, and agent loops with minimal abstraction. A framework is a higher-level system that adds orchestration patterns, memory management, and multi-step workflows on top of one or more SDKs. Use an SDK when you want direct control and are building on a single model provider. Use a framework when you need complex orchestration, provider-agnostic abstractions, or pre-built patterns for common agent architectures.

The Core Distinction

The SDK vs framework distinction in AI agents follows the same pattern seen elsewhere in software development. An SDK (Software Development Kit) provides the building blocks: API clients, tool calling interfaces, streaming handlers, and basic agent loop implementations. You assemble these blocks into whatever architecture your application needs. A framework provides opinions and structure: it decides how agents should be organized, how data flows between components, and what patterns you should follow.

In the AI agent space, SDKs come from the model providers themselves. Claude Agent SDK, OpenAI Agents SDK, Google ADK, and Vercel AI SDK are all SDKs (though Google ADK sits closer to the framework end of the spectrum). Frameworks come from the community and third-party companies. LangChain, LangGraph, CrewAI, AutoGen, and Semantic Kernel are all frameworks that work on top of one or more model provider SDKs.

The practical difference is where the complexity lives. With an SDK, you write the orchestration logic yourself, which means you understand every line of code but need more development effort. With a framework, orchestration is handled for you through pre-built patterns, which means faster initial development but a dependency on the framework's design decisions and abstractions.

Can you use both an SDK and a framework together?
Yes, and this is actually the most common pattern. Frameworks like LangChain and LangGraph use model provider SDKs internally. When you use LangChain with Claude, it calls the Anthropic SDK under the hood. You can also use a framework for high-level orchestration while dropping down to the raw SDK for specific operations that need fine-grained control. The two layers complement each other rather than compete.
Is Google ADK an SDK or a framework?
Google ADK blurs the line. It is distributed as an SDK from a model provider (Google), but its feature set, including graph-based workflow engines, multi-agent coordination, and structured task delegation, is more comparable to frameworks like LangGraph than to minimal SDKs like OpenAI's. In practice, ADK functions as a framework that happens to have first-party model integration. This hybrid approach gives it deeper model integration than third-party frameworks while providing more structure than typical SDKs.
Do frameworks add significant overhead compared to raw SDKs?
The overhead depends on the framework. LangChain adds abstraction layers that introduce some latency per call (typically 10-50 milliseconds) and make debugging more complex because errors occur deeper in the stack. LangGraph adds minimal overhead because its graph execution engine is lightweight. CrewAI and AutoGen add more overhead for their role-based coordination features. For most applications, the framework overhead is negligible compared to the model API latency (typically 500-3000 milliseconds per call), but it can matter for latency-sensitive applications that chain many agent steps.

When to Use an SDK

Choose an SDK when you have committed to a single model provider and want the deepest possible integration with that provider's features. The Claude Agent SDK gives you access to built-in tools, session persistence, and MCP integration that no third-party framework can replicate. The OpenAI SDK gives you sandbox execution, model-native harness, and the tracing-to-fine-tuning pipeline. These provider-specific features are only available through the provider's own SDK.

Choose an SDK when you need maximum control over the agent loop. SDKs let you inspect every model call, intercept every tool invocation, and customize every step of the execution. This level of control is essential for applications with strict security requirements, compliance obligations, or unusual execution patterns that frameworks do not anticipate.

Choose an SDK when your agent architecture is straightforward. If your application needs one agent with a few tools performing a well-defined task, an SDK provides everything you need without the overhead of learning a framework's conventions and abstractions. A single-agent system with clear inputs and outputs is the sweet spot for SDK-only development.

Choose an SDK when you want to minimize dependencies. SDKs are typically well-maintained by well-funded companies with strong incentives to keep them working. Frameworks vary in maintenance quality, and adding a framework dependency means your application is affected by both the SDK's changes and the framework's changes. Fewer dependencies mean fewer things that can break.

When to Use a Framework

Choose a framework when you need multi-provider flexibility. If your application uses Claude for conversational tasks, GPT for code generation, and Gemini for cost-sensitive operations, a framework like LangChain or the Vercel AI SDK provides a unified interface across all providers. Building this abstraction yourself is possible but time-consuming and error-prone.

Choose a framework when you need complex multi-agent orchestration. LangGraph provides graph-based state machines for agent workflows, CrewAI provides role-based agent teams with structured delegation, and AutoGen provides conversation-based multi-agent patterns. These orchestration capabilities would take significant development effort to build from scratch using raw SDKs.

Choose a framework when you want pre-built patterns for common agent architectures. Frameworks encode best practices for retrieval-augmented generation (RAG), chain-of-thought reasoning, tool-use patterns, and conversation management. These patterns represent the accumulated experience of the framework's developers and community, saving you from rediscovering solutions to problems that others have already solved.

Choose a framework when your team values rapid prototyping over fine-grained control. Frameworks let you build working agent prototypes faster because you spend less time on infrastructure and more time on business logic. The trade-off is that you have less visibility into what happens under the hood, which can make debugging harder when things go wrong.

The Hybrid Approach

The most practical approach for many teams is to start with an SDK and add framework components only when needed. Build your first agent using the model provider's SDK directly. If you discover that you need multi-provider support, add a framework's provider abstraction layer. If you need complex workflows, add a framework's orchestration engine. This incremental approach prevents over-engineering while keeping the option to scale up.

Some teams use different tools at different layers. The raw SDK handles the model interaction layer (API calls, streaming, tool dispatch), a lightweight framework like LangGraph handles the orchestration layer (state machines, routing, retry logic), and custom application code handles the business logic layer. This layered architecture gives you framework benefits where they matter most while maintaining SDK-level control where you need it.

The key to a successful hybrid approach is keeping clean boundaries between layers. Your business logic should not depend on framework-specific types or patterns. Your model interactions should be isolated behind interfaces that can switch between direct SDK calls and framework-mediated calls. This separation makes it practical to swap components as your needs evolve.

Common Mistakes

The most common mistake is choosing a framework before understanding the problem. Teams often adopt LangChain or CrewAI because they seem like the standard choice, then spend more time fighting the framework's assumptions than they would have spent building the same functionality with raw SDK calls. Start simple, and add abstractions only when the pain of not having them exceeds the cost of learning and maintaining them.

Another common mistake is building framework-level functionality from scratch using raw SDKs. If your project genuinely needs multi-agent workflows, conversation memory, retrieval-augmented generation, and multi-provider support, building all of this yourself is wasteful when mature frameworks provide these capabilities. Be honest about your actual requirements and choose the tool that matches them.

A third mistake is treating the choice as permanent. Both SDKs and frameworks evolve rapidly. An SDK that lacked multi-agent features six months ago may have added them. A framework that was poorly maintained may have been revitalized by a new contributor. Revisit your tooling choices periodically and be willing to migrate when the landscape shifts in ways that benefit your project.

The Current Landscape

As of mid-2026, the boundary between SDKs and frameworks is blurring. Google ADK is an SDK with framework-level features. The Claude Agent SDK includes built-in tools and session management that traditionally required framework support. OpenAI's SDK has added guardrails and tracing that overlap with framework capabilities. Meanwhile, frameworks like LangGraph have become thinner and more focused, providing orchestration without heavy abstraction layers.

This convergence means the choice matters less than it did a year ago. The model provider SDKs are becoming more capable, reducing the need for framework wrappers. At the same time, frameworks are becoming more lightweight, reducing the overhead of using them. The practical impact is that you can start with either approach and migrate to the other with less friction than before.

For new projects in 2026, the recommended starting point is your model provider's SDK. If you need capabilities beyond what the SDK provides, evaluate LangGraph for workflow orchestration, CrewAI for role-based multi-agent patterns, or the Vercel AI SDK for web-focused multi-provider applications. Add framework components incrementally rather than adopting an entire framework stack from the beginning.

Key Takeaway

Start with your model provider's SDK for direct control and simplicity, then add framework components incrementally when you encounter specific needs like multi-provider support, complex orchestration, or pre-built agent patterns that would take too long to build yourself.