Skip to content

LangChain

LangChain is an open-source Python framework, from the company of the same name, for building AI agents and other applications powered by large language models (LLMs).

Harrison Chase released the project in October 2022, and its GitHub repository has since drawn more than 145,000 stars. Version 1.0 arrived on October 22, 2025 and cut the library back to a single agent loop. The create_agent() function builds an agent from a model, a set of tools, and a system prompt, replacing older constructors like create_react_agent() and AgentExecutor.

Middleware hooks run before and after each model and tool call, which is where customization lives instead of in subclasses. Step the run below one beat at a time to see where each hook fires, then attach another middleware and watch the same loop pick up more hook firings without changing shape.

Interactive diagram — enable JavaScript to view.

Legacy chains, retrievers, and the hub moved to a separate langchain-classic package, while provider support sits in integration packages like langchain-openai and langchain-anthropic. Agents execute on the LangGraph runtime, which adds persistence and human-in-the-loop interrupts.

Python developers install it from PyPI as langchain. It’s MIT licensed and needs Python 3.10 or later, and a TypeScript port ships as LangChain.js.

The company also builds LangSmith, a hosted commercial platform for tracing and LLM observability, and maintains deepagents, an agent harness that adds a filesystem, sub-agent delegation, and long-term memory. Alternatives include LlamaIndex, CrewAI, Pydantic AI, Haystack, and Microsoft Agent Framework.

Official website: langchain.com

Build an LLM RAG Chatbot With LangChain

Course

First Steps With LangChain

Large language models (LLMs) have taken the world by storm. In this step-by-step video course, you'll learn to use the LangChain library to build LLM-assisted applications.

intermediate ai databases data-science

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Martin Breuss • Updated Sept. 27, 2026