⊕PluginAgentic capabilityFree
LangChain
The leading framework for building LLM-powered applications and agents with chains, tools, memory, and retrieval.
LangChain
LangChain is the most widely adopted framework for composing LLM-powered applications. It provides abstractions for chaining LLM calls, attaching tools and retrievers, managing conversation memory, and building full agentic loops — all through a composable, provider-agnostic API.
Key Features
- Chains & LCEL — compose prompts, models, and output parsers with the LangChain Expression Language pipe syntax
- Tool use — attach any callable as a tool; includes 100+ pre-built integrations (search, databases, APIs)
- Memory — short-term buffer, summary, entity, and vector-store-backed long-term memory
- Retrieval — document loaders, text splitters, vector store retrievers, and rerankers
- Agents — ReAct, OpenAI Functions, and custom agent executors with streaming support
- Callbacks — first-class tracing hooks for LangSmith, Arize, W&B, and more
Quick Start
pip install langchain langchain-openai
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
llm = ChatOpenAI(model="gpt-4o")
prompt = ChatPromptTemplate.from_messages([
("system", "You are a helpful assistant."),
("user", "{question}")
])
chain = prompt | llm
response = chain.invoke({"question": "What is the capital of France?"})
print(response.content)
Install via ai-supply
npx ai-supply add langchain-agent-framework
Curated mirror of the open-source LangChain project (MIT). Install upstream from the repository.