Open source · ★ 147,812 GitHub stars (as of 2026-10-14)
langchain
LangChain is an open-source framework for building LLM-based agents and applications.
Overview
LangChain is a framework for building agents and LLM-based applications. It simplifies AI application development by combining interoperable components and third-party integrations.
It provides standard interfaces for models, embeddings, vector stores and more, making it easy to swap models. create_agent is a lightweight Agent Harness made up of a prompt, tools and middleware, and it can be used alongside the higher-level Deep Agents, LangGraph for low-level orchestration, and LangSmith for tracing and evaluation.
It suits Python and JS developers who build agents or RAG apps while switching among models from OpenAI, Anthropic, Google and others.
What it is used for
- Build an agent with custom tools using create_agent.
- Connect LLMs to multiple data sources and internal systems.
- Switch between model providers to test which model fits the application.
- Trace, debug and evaluate agents with LangSmith.
Pricing and license
MIT
Getting started
- Install with uv add langchain or pip install -qU langchain "langchain[openai]".
- Get an API key from the model provider you will use.
- Define the model and tools with init_chat_model or create_agent and run them.
- If needed, set up LangSmith tracing.
Links
Related terms and companies
Sources
Compiled from public sources (official pages, READMEs). Pricing and features change, so check the official site.