If you've read anything about building with LLMs recently, you've almost certainly seen both "LangChain" and "LangGraph" mentioned - often in the same sentence, sometimes used almost interchangeably. They're not the same thing, and mixing them up is the single most common point of confusion for people getting started. This guide sorts that out first, then gets into what LangChain itself actually does.
The short version
LangChain is a developer framework for connecting a language model to the things it needs: prompts, other models, your own data, and tools. It standardizes a lot of the plumbing that's genuinely tedious to write yourself - calling different model providers through one consistent interface, formatting prompts, parsing structured output, and wiring up retrieval over your documents.
What LangChain isn't, on its own, is a great answer for complex control flow - loops, conditional branching, multi-step agents that need to pause and remember where they were. That's LangGraph's job, and as of LangChain's own 1.0 release, LangChain's newer agent-building tools are built directly on top of LangGraph's execution engine rather than around it. They're not competitors; LangChain is the ingredient layer, and LangGraph is the layer that decides what happens next.
LangChain builds the pieces. LangGraph decides the order, the loops, and the branches they run in.
LCEL: the pipe operator that composes pieces into chains
LangChain's own composition tool is called LCEL - the LangChain Expression Language - and its whole trick is the pipe operator, |. You take a few pieces (a prompt template, a model, a parser) and pipe them together in order:
chain = prompt | model | parser
result = chain.invoke({"topic": "otters"})
Each piece is a "Runnable" - a consistent interface that means anything can be piped into anything else that expects its output type. This still works well and is not deprecated; LangChain's current guidance is simply that LCEL is for straightforward, linear compositions. The moment your logic needs to loop, branch on a real condition, or coordinate multiple steps that don't run in a fixed order, that's the signal to reach for LangGraph instead of trying to force it into a pipe chain.
What actually lives inside LangChain
Four things cover most of what you'll touch:
- Model access - one interface for calling OpenAI, Anthropic, Google, and dozens of other providers, so switching models doesn't mean rewriting your calling code.
- Prompts - templates with variables you fill in at call time, instead of string-concatenating text by hand.
- Retrieval - document loaders, text splitters, embeddings, and vector store integrations for grounding a model in your own data (covered in full in the Retrieval & RAG guide).
- Tools - a standard way to describe a function so a model can decide to call it, which either LCEL or LangGraph can then orchestrate.
A practical, current detail worth knowing
For a long time, most third-party integrations - document loaders, vector stores, specific model providers - lived in one large package called langchain-community. That package was archived in mid-2026 and is no longer maintained. Integrations have moved into focused, standalone partner packages instead - things like langchain-openai, langchain-chroma, or langchain-pinecone - each maintained on its own release cycle. If you're following an older tutorial that imports from langchain_community, check the current integrations page for that provider's dedicated package before you build on it.