ScriptsMar 29, 2026·1 min read

LangChain — Build LLM-Powered Applications

The most popular framework for building applications with large language models. Chains, agents, RAG, memory, tool use, and integrations with 700+ providers.

TO
TokRepo精选 · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

pip install langchain langchain-openai langchain-anthropic

Intro

LangChain is the standard framework for building LLM-powered applications. Compose chains of prompts, connect to vector stores for RAG, build autonomous agents, and integrate with hundreds of tools and providers.

Best for: Chatbots, RAG pipelines, autonomous agents, document Q&A, data extraction Works with: OpenAI, Anthropic, Google, Ollama, HuggingFace, and 700+ integrations


Core Concepts

Chains

Compose multiple LLM calls and transformations into a pipeline:

from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate

chain = ChatPromptTemplate.from_template("Summarize: {text}") | ChatOpenAI()
result = chain.invoke({"text": "..."})

RAG (Retrieval-Augmented Generation)

from langchain_community.vectorstores import FAISS
from langchain_openai import OpenAIEmbeddings

vectorstore = FAISS.from_documents(docs, OpenAIEmbeddings())
retriever = vectorstore.as_retriever()

Agents

from langchain.agents import create_tool_calling_agent
agent = create_tool_calling_agent(llm, tools, prompt)

Ecosystem

  • LangSmith — Observability and testing platform
  • LangGraph — Stateful multi-actor agent framework
  • LangServe — Deploy chains as REST APIs

🙏

Source & Thanks

Created by LangChain. Licensed under MIT. langchain-ai/langchain — 100K+ GitHub stars

Related Assets