LangChain vs Semantic Kernel
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A Python framework for building AI agents and apps powered by language models.
Open source · MIT
Open-source SDK for building AI agents and multi-agent apps in Python, .NET and Java.
The short answer
Choose LangChain if you need…
- Python developers building LLM-powered applications
- Teams that want to switch between model providers without rewriting code
- Developers connecting LLMs to external data sources and tools
- Prototyping LLM workflows with reusable components
Choose Semantic Kernel if you need…
- Developers already using Azure OpenAI or OpenAI who want a structured SDK for agents
- Teams working in .NET, Python or Java who want one framework across languages
- Projects that need plugins built from native code, prompt templates, OpenAPI specs or MCP
- Existing Semantic Kernel users maintaining or migrating older code
Side-by-side
| LangChain | Semantic Kernel | |
|---|---|---|
| Type | Framework | Library |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 149k | 28.7k |
| Setup difficulty | Intermediate | Intermediate |
| How you get it | Install with a package manager | Install with a package manager |
| Main language | Python | C# |
| Last code update | 4 days ago | 4 days ago |
What each one is
LangChain
LangChain is a Python framework for building applications powered by large language models (LLMs) and agents. It provides a standard interface for models, embeddings, and vector stores, plus a library of integrations with model providers and tools. Developers use it to connect LLMs to their own data and systems and to swap models without rewriting their application.
Semantic Kernel
Semantic Kernel is a model-agnostic SDK from Microsoft that lets developers connect large language models (such as OpenAI or Azure OpenAI models) to their own apps, add tools and plugins, and orchestrate one or more AI agents. The README says it is now succeeded by Microsoft Agent Framework, so new projects should check that project first.
Best for
LangChain
- Python developers building LLM-powered applications
- Teams that want to switch between model providers without rewriting code
- Developers connecting LLMs to external data sources and tools
- Prototyping LLM workflows with reusable components
Semantic Kernel
- Developers already using Azure OpenAI or OpenAI who want a structured SDK for agents
- Teams working in .NET, Python or Java who want one framework across languages
- Projects that need plugins built from native code, prompt templates, OpenAPI specs or MCP
- Existing Semantic Kernel users maintaining or migrating older code
Strengths
LangChain
- Standard interface lets you swap model providers with limited code changes
- Large library of integrations with model providers, tools, and vector stores
- Open source under the MIT license with a documentation site and free courses
Semantic Kernel
- Supports several models and providers, including OpenAI, Azure OpenAI, Hugging Face and NVidia, per the README
- Offers examples in Python and C# with matching quickstarts
- Permissive MIT license and a large public project with about 28,700 stars
Not ideal for
LangChain
- People who want a finished end-user app rather than a library to code against
- Developers who need low-level control over agent orchestration; the README points to LangGraph for that
- JavaScript or TypeScript projects, which the README directs to the separate LangChain.js library
Semantic Kernel
- Non-programmers: it is a developer SDK and needs code to use, so no-code users should look elsewhere
- Teams starting fresh who want the newest path: the README directs users to Microsoft Agent Framework as the successor
- Simple scripts that only need one direct API call, where an SDK adds more structure than needed
Trade-offs
LangChain
- The README does not detail the API surface, so you rely on external docs for depth
- Several related products (LangGraph, Deep Agents, LangSmith) are needed for advanced or production work, which adds to the learning curve
- The README's quickstart targets a specific model string, so you must have access to that provider's API
Semantic Kernel
- The README states the project is succeeded by Microsoft Agent Framework, so long-term direction may point elsewhere
- Quickstarts assume Azure or OpenAI credentials and a configured environment, so setup needs some engineering work
- Java support is pointed to a separate build guide rather than documented here
Getting started
Semantic Kernel
Set Azure OpenAI API key
export AZURE_OPENAI_API_KEY=AAA....Set OpenAI API key (alternative)
export OPENAI_API_KEY=sk-...Frequently asked questions
What is the difference between LangChain and Semantic Kernel?
LangChain: A Python framework for building AI agents and apps powered by language models. Semantic Kernel: Open-source SDK for building AI agents and multi-agent apps in Python, .NET and Java. LangChain suits python developers building llm-powered applications, while Semantic Kernel suits developers already using azure openai or openai who want a structured sdk for agents.
Are LangChain and Semantic Kernel free?
LangChain: Free and open source. Semantic Kernel: Free and open source.
Is LangChain or Semantic Kernel more popular?
LangChain has more GitHub stars (149k) than Semantic Kernel (28.7k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to LangChain and Semantic Kernel?
Other options people compare them with include LlamaIndex, CrewAI, OpenUI, VoltAgent, Quivr.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.