← AI Terminology

LangChain

LangChain is an open-source Python/JavaScript framework for building applications with large language models — providing composable abstractions for chains, agents, memory, retrieval, and tool use that orchestrate LLM calls into multi-step workflows.

It is the most widely adopted LLM application framework, with over 90K GitHub stars.
Why It Matters in AI
LangChain solved the "how do I build something useful with an LLM" problem for most developers: RAG pipelines, agents with tool use, conversational memory, and structured output parsing became standard patterns rather than bespoke engineering. It accelerated LLM application development from months to days and established the vocabulary (chains, agents, retrievers, tools) now used across the entire ecosystem — influencing competing frameworks like LlamaIndex, Haystack, and AutoGen.
Key Points
Aspect Description
LCEL LangChain Expression Language: `chain = prompt
Agents LLM-driven decision-making over a tool set — ReAct, OpenAI Functions, LCEL-based agents
Chains Sequences of LLM calls and transformations — LLMChain, SequentialChain, ConversationChain
LangGraph Extension for stateful multi-agent workflows with graph-based control flow
LangSmith Observability and evaluation platform (separate paid product) — trace, evaluate, debug chains
Retrievers Interface for vector store and document retrieval — used in RAG pipelines
Simple Analogy
A plumbing kit for LLM applications: instead of custom-fitting every pipe and fitting by hand, you pick from a catalogue of standard connectors (prompt templates, LLM wrappers, retrievers, parsers) and snap them together. The kit doesn't build the app for you — but it means the pipes fit.
Common Usage Examples
  • RAG: chain = RetrievalQA.from_chain_type(llm=ChatOpenAI(), retriever=vectorstore.as_retriever())
  • LCEL: chain = ChatPromptTemplate.from_template("Answer: {q}") | ChatAnthropic() | StrOutputParser()
  • Agent: agent = create_react_agent(llm, tools=[search_tool, calculator]); agent.invoke({"input": "..."})
  • Memory: ConversationBufferMemory() attached to a chain for multi-turn conversation history
  • langchain_community.vectorstores.Chroma — Chroma vector store integration for RAG
Summary
In short: LangChain is the dominant framework for building LLM applications — providing composable abstractions for RAG, agents, memory, and tool use that turn LLM API calls into production-ready workflows.