DS DevShelfHub Projects · AI tools
Tutorials / LangChain / API Reference

LangChain API Reference

By DevShelfHub

Complete documentation for 32 classes, 31 methods, and 8 decorators. Each page includes detailed explanations, parameters, code examples, common mistakes, and when NOT to use.

71 Pages Fully Searchable
LangChain API reference — classes, methods, and decorators
AzureOpenAIEmbeddings
langchain-openai
Use Azure-hosted OpenAI embeddings.
ChatAnthropic
langchain-anthropic
Interact with Anthropic's Claude models.
ChatPromptTemplate
langchain-core
Create chat prompts with role-based messages.
ChatOpenAI
langchain-openai
Interact with OpenAI's chat models (GPT-4o, GPT-4.1, o-series, GPT-3.5-turbo) from LangChain.
Chroma
langchain-chroma
Store and search embeddings with Chroma vector database.
CohereEmbeddings
langchain-cohere
Use Cohere's embedding models.
create_agent
langchain
Create agents easily in v1.
DatabricksEmbeddings
langchain-databricks
Use Databricks-hosted embeddings.
FakeEmbeddings
langchain-core
Generate random embeddings for testing.
GoogleGenerativeAIEmbeddings
langchain-google-genai
Use Google's Generative AI embeddings.
HuggingFaceEmbeddings
langchain-community
Create embeddings using Hugging Face models locally.
HumanMessage
langchain-core
Represent user input in conversations.
InMemoryChatMessageHistory
langchain-core
Store conversation history in memory.
JsonOutputParser
langchain-core
Parse JSON from model output.
MemorySaver
langgraph
In-memory checkpointing for LangGraph.
NomicEmbeddings
langchain-community
Use Nomic's open-source embeddings.
NVIDIAEmbeddings
langchain-nvidia-ai-endpoints
Use NVIDIA's high-performance embeddings.
OllamaEmbeddings
langchain-community
Use Ollama for local LLM embeddings.
OpenAIEmbeddings
langchain-openai
Create text embeddings using OpenAI's models.
PyPDFLoader
langchain-community
Extract text from PDF files.
PineconeVectorStore
langchain-pinecone
Use Pinecone cloud vector database with LangChain.
PromptTemplate
langchain-core
Create reusable text prompts with variable placeholders.
QdrantVectorStore
langchain-qdrant
Use Qdrant vector database with LangChain.
RecursiveCharacterTextSplitter
langchain-text-splitters
Split text into chunks while respecting semantic boundaries.
RunnablePassthrough
langchain-core
Pass input through unchanged in chains.
StateGraph
langgraph
Build stateful agent workflows with LangGraph.
StrOutputParser
langchain-core
Extract text from model output.
SystemMessage
langchain-core
Set system-level instructions for model behavior.
TavilySearchResults
langchain-community
Web search tool for agents.
TogetherEmbeddings
langchain-together
Use Together AI's embeddings.
VoyageAIEmbeddings
langchain-voyageai
Use Voyage AI's specialized embeddings.
WebBaseLoader
langchain-community
Load web pages as documents.

LangChain API Reference FAQ

How many classes, methods, and decorators are in the LangChain API reference?

This LangChain API reference documents 32 classes, 31 methods, and 8 decorators, for 71 pages in total. Each entry has its own page covering what it does, its parameters, runnable code examples, common mistakes, and guidance on when not to use it.

How do I search the LangChain API reference?

Use the search box at the top of the page to filter by name across classes, methods, and decorators, and use the Classes, Methods, and Decorators tabs to browse one category at a time. Filtering happens instantly in the browser, so results narrow as you type with no page reload.

What does each LangChain reference page include?

Every reference page includes a plain-language explanation of what the class, method, or decorator does, its parameters and signatures, copy-paste code examples, common mistakes to avoid, and notes on when not to reach for it. The goal is to answer practical usage questions, not just restate signatures.

What is the difference between the class, method, and decorator pages?

Class pages document LangChain objects you instantiate, such as loaders, splitters, and vector stores, including their package and purpose. Method pages document functions you call on those objects and note what they apply to. Decorator pages document decorators like tool definitions and note the module they come from.

Is this the official LangChain API documentation?

No. This is an independent, hand-written reference from DevShelfHub designed to be searchable and beginner-friendly with examples and common mistakes. Always check the official LangChain docs for the exact current signatures, because the library evolves quickly across versions.

Which LangChain package version does this reference cover?

The reference targets the modern langchain and langchain-core packages and their split community and partner packages, such as langchain-community and langchain-openai. Because LangChain changes frequently, confirm import paths against the version you have installed before copying examples into production.