← All open source projects

LangChain

langchain-ai/langchain

LangChain is an agent engineering platform and Python framework for LLM applications, integrations, agents, and RAG workflows.

Forks 22,989
Author langchain-ai
Language Python
License MIT
Synced 2026-06-07

What LangChain is

LangChain is a framework and ecosystem for LLM-powered applications. It provides shared interfaces for chat models, embeddings, vector stores, tools, retrievers, and agent workflows so apps can be built from interchangeable components and integrations.

It began as a way to connect LLMs to external data and actions, then grew into an agent engineering platform around LangChain, LangGraph, integrations, Deep Agents, and LangSmith. Today it is not just one “chains” package; it is a set of layers for different complexity levels.

What is inside and how it is used

Minimal model call

This example shows the project shape and the usual way it is used.

Language: Python
from langchain.chat_models import init_chat_model

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

LangChain is useful when teams need provider switching, tools, RAG, agent workflow prototypes, or more controlled orchestration through LangGraph. It gives teams a shared vocabulary and interfaces.

Strengths and limits

Its limits come from abstraction. A quick start can hide evals, observability, retries, cost, latency, prompt/data safety, and agent state control. Production work often needs lower-level design and explicit workflow architecture.