LangChain split into core + community + per-provider packages so apps only pull the vendor SDKs they actually use and provider integrations can ship on the vendor's release cadence.
Picture a hardware store that used to sell a single mega-toolbox with every tool ever made, even the ones you would never use. Lugging it around was painful and if any one tool was broken, the whole toolbox was held back. The store split the kit: a small core box with the handle and the basics, a community shelf with everyone's contributed gadgets, and separate cases for each brand's specialty tools. Now you grab just the basic kit plus the one brand case you need. When that brand ships a new tool, only their case updates. The rest of your gear stays the same.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
LangChain's packaging story is the most common interview question about the framework that is not about the framework's primitives. The reason is that the split is a clean illustration of an architectural pressure every large integration library eventually faces: as the catalogue of supported vendors grows, the cost of bundling all of them into one distribution becomes prohibitive.
This deep dive covers why the split happened, what each package actually contains, the two production consequences (install hygiene and release independence), and the legacy import trap that catches most migrations.
What the split actually looks like
Modern LangChain in Python is roughly four layers.
langchain-core. The abstract layer. Runnables, prompts, output parsers, base interfaces (ChatModel, Embeddings, VectorStore, Retriever, Tool). Minimal dependencies; meant to be stable.langchain. A meta-package that mostly re-exports from the underlying packages and provides higher-level constructs like agents and chains. Exists for legacy import paths and for the 'just give me everything' workflow.langchain-community. A contributor-maintained shelf for integrations that are too new, too niche, or too low-traffic to warrant their own dedicated package.langchain-<provider>. One package per first-class provider. Examples include langchain-openai, langchain-anthropic,langchain-google-vertexai, langchain-aws, langchain-mongodb, and langchain-pinecone. Each owns the integration code for one vendor and lists that vendor's SDK as its dependency.
The JS ecosystem mirrors the pattern with scoped package names: @langchain/core, @langchain/community, @langchain/openai, @langchain/anthropic.
The promotion path
Integrations typically enter langchain-community first. If usage grows and a vendor or maintainer commits to ongoing support, the integration is promoted to its own langchain-<provider> package with independent versioning.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
| Package | What it contains | Release cadence |
|---|---|---|
| langchain-core | Runnables, prompts, parsers, base interfaces | Slow, stable |
| langchain-community | Contributor-maintained integrations not yet promoted | Medium, contributor-driven |
| langchain-<provider> | One vendor's chat models, embeddings, tools | Tracks the vendor SDK |
| langchain (meta) | Re-exports from the above for legacy import paths | Lags the underlying packages |
Real products, models, and research that use this idea.
- LangChain's January 2024 split announcement that explicitly cited dependency hygiene and per-provider release cadence as the motivations.
- `@langchain/openai` in the JS ecosystem ships independently from `@langchain/core`, mirroring the Python pattern with package-scoped namespaces.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you migrate a large codebase from `from langchain.chat_models import ChatOpenAI` to the split imports?
File by file via ruff/grep + codemod. The mapping is mechanical: langchain.chat_models.ChatOpenAI → langchain_openai.ChatOpenAI. Run the test suite per chunk to catch transitive dependency surprises.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Importing from `langchain` (the legacy meta-package) instead of `langchain-core` plus the specific provider packages, then wondering why your dependency tree pulls in vendor SDKs you do not use.
60 second bullets to scan on the way to the call.
What langchain-core contains and what it depends on
Why langchain-community exists and what it is NOT for
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.