LangChain
ActiveDescription
LangChain is the open-source agent engineering platform that unifies model IO, tool calling, RAG, memory and observability under one composable framework.
Key Features
- Unified model abstraction — ChatModel interface covers OpenAI, Anthropic, Bedrock, Vertex and 100+ providers
- Tool calling & agents — tool calling, ReAct, OpenAI Tools, Plan-and-Execute agent paradigms
- RAG as a first-class citizen — Document Loader, Text Splitter, Retriever and Index abstractions
- LangSmith observability — deep integration with LangSmith for tracing, evaluation and monitoring
- LangServe deployment — turn Chains and Agents into REST APIs with one command
- Dual-language SDKs — Python and TypeScript SDKs evolve together
Use Cases
💡 Rapidly standing up production-grade agents and RAG apps across many LLMs
💡 Decoupling model calls, tool calls and business logic into testable pipelines
💡 Tracing and evaluating every agent run inside LangSmith
💡 Exposing agent apps as APIs with a single LangServe command
💡 Reusing LangChain components inside LangGraph stateful workflows
Categories
Quick Start
# Install dependencies
pip install langchain langchain-openai langchain-community
# Build a minimal LCEL chain
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
prompt = ChatPromptTemplate.from_messages([
('system', 'You are a helpful assistant.'),
('user', '{input}')
])
model = ChatOpenAI(model='gpt-4o-mini')
chain = prompt | model | StrOutputParser()
print(chain.invoke({'input': 'Describe LangChain in one sentence.'}))