LangChain
Open source framework for building agents that work with many models and tools
Linked from langchain.com · checked 29 Oct
- Tool type
- Open source agent framework
- Made for
- Developers building AI agents
- Runs on
- Python library, self-hosted code
- Installed via pip and run in your own environment
What it does
LangChain is an open source Python framework for building AI agents. You write code that supplies a model, a set of tools (plain functions the agent can call) and a system prompt, and the create_agent function returns an agent you invoke with a list of messages. It gives you a single interface for chat models and embeddings across providers such as OpenAI, Anthropic, Google, Azure, AWS Bedrock, Ollama and Hugging Face.
Developers use it to assemble tool-calling agents, then adjust behavior through middleware, for example adding human-in-the-loop approval, compressing long conversations, or removing sensitive data. Agents run on LangGraph's durable runtime, which provides persistence, checkpointing, rewind and human-in-the-loop support. The framework is meant to let you swap models, tools and databases without rewriting your application. It connects to LangSmith, a separate paid platform for tracing, evaluation and deployment, using environment variables.
It suits software developers and engineering teams comfortable writing Python who want a customizable agent harness rather than a no-code builder. The library is MIT-licensed and free to use, installed with pip. You supply your own model-provider access, which carries its own costs. LangSmith tracing and deployment are optional add-ons with separate pricing. Teams needing heavier orchestration may prefer LangGraph, and the docs point to Deep Agents for a batteries-included option.
What it can do
- Create tool-calling agents with the create_agent function
- Standard interface for chat models and embeddings across providers
- Middleware hooks for human approval, conversation compression and sensitive-data removal
- Durable execution with persistence, checkpointing, rewind and human-in-the-loop
- Optional tracing and evaluation through LangSmith via environment variables
Works with
- OpenAI
- Anthropic
- Google Gemini
- OpenRouter
- Fireworks
- Baseten
- Ollama
- Azure
- AWS Bedrock
- Hugging Face
Example workflows
- Build a tool-calling agent
- Input: a Python function and a model identifier. Steps: install langchain plus a provider package, define the tool, call create_agent with model, tools and system prompt, then invoke it with a user message. Output: a response message from the agent after any tool calls.
- Add approval and tracing to an agent
- Input: an existing agent. Steps: add middleware for human-in-the-loop approval, set LANGSMITH_TRACING=true and an API key. Output: an agent that pauses for approval and sends traces to LangSmith for debugging.
Before you choose
- The library is free, but model-provider usage and optional LangSmith services are billed separately.
- Code-first Python framework; non-programmers would need a different tool such as the separate no-code LangSmith Fleet.
- LangChain, LangGraph, Deep Agents and LangSmith are distinct products; choose the layer that fits your needs.
Listed under
Get started
Install per the docs; model provider access is separate
- Install langchain and a provider package, for example pip install -qU langchain "langchain[openai]"
- Obtain an API key for your chosen model provider
- Follow the Quickstart to define tools and call create_agent
Plans and prices
Prices in USDThe LangChain library is MIT-licensed and free. Model-provider costs apply. The optional LangSmith platform has its own plans, not covered here.
- MIT-licensed library
- Free to use
Source: langchain.com/langchain, checked 29 Oct 2026. Prices can change; check before you buy.
Sources for this overview
Product pages, documentation, and pricing checked 29 Oct 2026. Each source supports part of the overview; availability and prices can change.
- LangChain: Open Source AI Agent Framework for Any Model ↗www.langchain.com
- LangChain overview - Docs by LangChain ↗docs.langchain.com
- LangSmith Plans and Pricing ↗www.langchain.com
- Home - Docs by LangChain ↗docs.langchain.com
Ratings and reviews
No ratings for LangChain yet.
What’s changed
Free accountSignals
Free accountData and security
Free accountCompare with similar tools
Free accountWhere this comes from
How we research- Company website
- langchain.com: product, pricing and policy pages
- YC directory mirror
- Batch and company name
- Social accounts
- Accounts the company links, and its posts on X
- Human review
- Checked by a person
- knowledge_base
Last checked 29 Oct 2026. Every field keeps its source and date; unknown means we couldn’t confirm it.