langchain README

The project's README from github.com/langchain-ai/langchain. As one markdown file: README.md.

LangChain Logo

The agent engineering platform.

PyPI - License PyPI - Downloads Version Twitter / X

LangChain is a framework for building agents and LLM-powered applications. It helps you chain together interoperable components and third-party integrations to simplify AI application development — all while future-proofing decisions as the underlying technology evolves.

[!TIP] Just getting started? Check out Deep Agents — a higher-level package built on LangChain for agents that have built-in capabilities for common usage patterns such as planning, subagents, file system usage, and more.

Quickstart

uv add langchain
from langchain.chat_models import init_chat_model

model = init_chat_model("openai:gpt-5.5")
result = model.invoke("Hello, world!")

If you're looking for more advanced customization or agent orchestration, check out LangGraph, our framework for building controllable agent workflows.

For an equivalent JS/TS library, check out LangChain.js.

[!TIP] For developing, debugging, and deploying AI agents and LLM applications, see LangSmith.

LangChain ecosystem

While the LangChain framework can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools when building LLM applications.

Why use LangChain?

LangChain helps developers build applications powered by LLMs through a standard interface for models, embeddings, vector stores, and more.


Resources

langchain (langchain-ai/langchain)

Searching Database…

What is this?LangChain is a framework for building agents and LLM-powered applications: it chains together interoperable components and third-party integrations to simplify AI app development.
Do I code it into my own app, or is it a hosted platform?You code against it: an open-source Python framework you import into your project, with an equivalent JS/TS library, LangChain.js, for the JavaScript side.
How do I go from zero to a first working agent?The Quickstart routes you by ambition: start with Deep Agents for common agent patterns, or move to LangGraph when you need advanced customization and orchestration.
Can I use it with models like OpenAI, Anthropic, or Gemini?Yes — integrations are the core idea: chat and embedding models plus tools and toolkits, and the repo lists OpenAI, Anthropic, and Gemini among its providers.
Is everything I might need inside this one package?No — the framework works standalone, but it is one piece of a larger ecosystem: Deep Agents, LangGraph, and LangSmith are separate packages and products you adopt as needed.
Is this for quick experiments or serious production apps?Both: it is built for rapid prototyping with modular components, and it grows into production with battle-tested patterns and built-in monitoring and evaluation support.
What is Deep Agents, the suggested starting point?A higher-level package built on LangChain: its agents ship with built-in planning, subagents, and file system usage, covering common agent patterns out of the box.
When would I reach for LangGraph instead?LangGraph is the low-level side of the ecosystem: a framework for building controllable agent workflows that reliably handle complex tasks, below Deep Agents' higher-level abstractions.
What is LangSmith and will I need it?It is the companion product for developing, debugging, and deploying agents — evals, observability, and debugging for LLM apps, plus a deployment platform for long-running, stateful workflows.
Size
595.5 MB
Stars
148K
Age
4y
Commits · 90 Days