LangChain
ActiveDescription
LangChain is a framework for building applications powered by language models. It provides core capabilities such as chaining, memory management, and agent orchestration, making it a go-to choice for AI agent development.
Key Features
- Chaining - flexibly compose LLMs, tools, and data-processing steps
- Built-in memory management - supports conversation buffers, summaries, vector stores, and other memory strategies
- Agent orchestration - supports multiple agent patterns such as ReAct and Plan-and-Execute
- RAG support - includes the full workflow for document loading, chunking, embedding, and retrieval
- Multi-model compatibility - works with major LLM providers including OpenAI, Anthropic, and Google
- Rich tool ecosystem - 100+ built-in tools with support for custom tool extensions
Use Cases
Tags
Categories
Quick Start
pip install langchain
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
llm = ChatOpenAI(model="gpt-4")
response = llm.invoke([HumanMessage(content="Hello!")])
print(response.content)