| CARVIEW |
Select Language
HTTP/2 308
cache-control: public, max-age=0, must-revalidate
content-type: text/plain
date: Tue, 30 Dec 2025 16:16:30 GMT
location: /docs/introduction/
refresh: 0;url=/docs/introduction/
server: Vercel
strict-transport-security: max-age=63072000
x-vercel-id: bom1::wz92l-1767111390729-7e0efc654dda
HTTP/2 308
cache-control: public, max-age=0, must-revalidate
content-type: text/plain
date: Tue, 30 Dec 2025 16:16:30 GMT
location: https://docs.langchain.com/oss/python/langchain/overview
refresh: 0;url=https://docs.langchain.com/oss/python/langchain/overview
server: Vercel
strict-transport-security: max-age=63072000
x-vercel-id: bom1::9zd2d-1767111390757-38088970dc72
HTTP/2 200
age: 16170
cache-control: no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0
cf-cache-status: HIT
cf-ray: 9b62d790ec92ff9e-BOM
content-encoding: gzip
content-security-policy: worker-src * blob: data: 'unsafe-eval' 'unsafe-inline'; object-src data: ; base-uri 'self'; upgrade-insecure-requests; frame-ancestors 'none'; form-action 'self' https://codesandbox.io;
content-type: text/html; charset=utf-8
date: Tue, 30 Dec 2025 16:16:30 GMT
expires: 0
pragma: no-cache
server: Vercel
strict-transport-security: max-age=63072000
vary: rsc, next-router-state-tree, next-router-prefetch, next-router-segment-prefetch, Accept-Encoding
x-cache-key: langchain-5e9cc07a/97/dpl_8ebG9G1eSCnRBhsAiqvv1BeuxzoC/oss/python/langchain/overview#html=html
x-frame-options: DENY
x-matched-path: /_sites/[subdomain]/[[...slug]]
x-mint-proxy-version: 1.0.0-prod
x-mintlify-client-version: 0.0.2274
x-nextjs-prerender: 1
x-nextjs-stale-time: 60
x-powered-by: Next.js
x-served-version: dpl_8ebG9G1eSCnRBhsAiqvv1BeuxzoC
x-vercel-cache: MISS
x-vercel-id: bom1:iad1::iad1::98dhb-1767111390863-89fac6e0f507
x-vercel-project-id: prj_3kakCEKDVpOxnQIJmKyTWs83RXEa
x-version: dpl_8ebG9G1eSCnRBhsAiqvv1BeuxzoC
LangChain overview - Docs by LangChain
Skip to main content
Get started
Advanced usage
Agent development
Deploy with LangSmith
LangChain overview
LangChain is an open source framework with a pre-built agent architecture and integrations for any model or tool — so you can build agents that adapt as fast as the ecosystem evolves
LangChain is the easiest way to start building agents and applications powered by LLMs. With under 10 lines of code, you can connect to OpenAI, Anthropic, Google, and more. LangChain provides a pre-built agent architecture and model integrations to help you get started quickly and seamlessly incorporate LLMs into your agents and applications.
We recommend you use LangChain if you want to quickly build agents and autonomous applications. Use LangGraph, our low-level agent orchestration framework and runtime, when you have more advanced needs that require a combination of deterministic and agentic workflows, heavy customization, and carefully controlled latency.
LangChain agents are built on top of LangGraph in order to provide durable execution, streaming, human-in-the-loop, persistence, and more. You do not need to know LangGraph for basic LangChain agent usage.
See the Installation instructions and Quickstart guide to get started building your own agents and applications with LangChain.
Create an agent
Copy
# pip install -qU langchain "langchain[anthropic]"
from langchain.agents import create_agent
def get_weather(city: str) -> str:
"""Get weather for a given city."""
return f"It's always sunny in {city}!"
agent = create_agent(
model="claude-sonnet-4-5-20250929",
tools=[get_weather],
system_prompt="You are a helpful assistant",
)
# Run the agent
agent.invoke(
{"messages": [{"role": "user", "content": "what is the weather in sf"}]}
)
Core benefits
Standard model interface
Different providers have unique APIs for interacting with models, including the format of responses. LangChain standardizes how you interact with models so that you can seamlessly swap providers and avoid lock-in.
Easy to use, highly flexible agent
LangChain’s agent abstraction is designed to be easy to get started with, letting you build a simple agent in under 10 lines of code. But it also provides enough flexibility to allow you to do all the context engineering your heart desires.
Built on top of LangGraph
LangChain’s agents are built on top of LangGraph. This allows us to take advantage of LangGraph’s durable execution, human-in-the-loop support, persistence, and more.
Debug with LangSmith
Gain deep visibility into complex agent behavior with visualization tools that trace execution paths, capture state transitions, and provide detailed runtime metrics.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.
Was this page helpful?
⌘I