LangChain was created by Harrison Chase in October 2022, two months before ChatGPT's launch. It exploded from hackathon project to industry default in 2023. Whatever its critics say (and there are many), almost every modern LLM-application abstraction was either invented or popularised here.
Core abstractions (original)
| Abstraction | Purpose |
|---|---|
| PromptTemplate | Parameterised prompt strings |
| LLM / ChatModel | Provider-agnostic LLM wrapper |
| Chain | Composable sequence of calls |
| Agent | LLM + tool registry + ReAct loop |
| Tool | Function with name, description, schema |
| Memory | Conversation history store |
| Retriever | Abstraction over vector DBs |
| OutputParser | Convert LLM text to typed objects |
A canonical 2023 chain
from langchain.prompts import PromptTemplate
from langchain.llms import OpenAI
from langchain.chains import LLMChain
prompt = PromptTemplate(
input_variables=["topic"],
template="Write a haiku about {topic}.",
)
chain = LLMChain(llm=OpenAI(), prompt=prompt)
print(chain.run("autumn"))
LCEL (LangChain Expression Language, 2023)
The framework shifted to a Unix-pipe-like declarative syntax:
chain = prompt | model | StrOutputParser()
chain.invoke({"topic": "autumn"})
LCEL added streaming, batching, async, and parallelism for free.
LangGraph (2024)
The agentic successor: an explicit stateful directed graph of nodes, supporting cycles, checkpoints, and human-in-the-loop. By 2025 LangGraph has overtaken LCEL for new development, particularly for multi-agent systems.
Ecosystem
- LangSmith, paid observability/eval/tracing platform.
- LangServe, FastAPI deployment.
- LangChain Hub, prompt and chain registry.
Critique
LangChain has been infamously criticised for:
- Excessive abstraction, six layers of inheritance to ask one question.
- Breaking changes, pre-1.0 API churn.
- Hidden behaviour, implicit conversions and defaults.
Many production teams now use the OpenAI/Anthropic SDKs directly, importing only LangChain's retrieval and parser utilities.
Historical importance
Whatever its current state, LangChain (October 2022) was the first widely-used framework to popularise the agent loop, the tool registry, and RAG. Most subsequent frameworks (LlamaIndex, DSPy, CrewAI, AutoGen) are either reactions to it or evolutions of it.
Related terms: LlamaIndex, DSPy, AutoGen, CrewAI, Retrieval-Augmented Generation, Tool Use
Discussed in:
- Chapter 15: Modern AI, Modern AI