repowiselangchain-ai/langchain

langchain-ai / langchain Architecture and code health

The agent engineering platform.

Python★ 148,609Curated

github.com/langchain-ai/langchainIndexed at facf278Up to date with upstreamRefreshes weekly

What is langchain?

LangChain is a framework for building agents and LLM-powered applications. It helps developers chain together interoperable components and third-party integrations to simplify AI application development. The core code is written in Python.

Written by a model from the README and the source

2,965 files and 20,598 symbols in 2 modules, led by Python (2,630 files) and Makefile (24).

Code health

6.7out of 10Fair

Hotspots average 3.8, the place fixes pay off most.

On the leaderboards:#4 of 5 Agent frameworks#35 of 56 Python repos

Use langchain-ai/langchain in your agent

Point Claude Code, Cursor, Codex or VS Code at this repository. Your agent gets the index this page is built from: cited answers, callers, history and health for any file.

  1. 1.In Claude, open Customize → Connectors, click +, then Add custom connector. On a Team or Enterprise plan an owner adds it first under Organization settings → Connectors.
  2. 2.Paste the server URL below as the Remote MCP server URL, then click Add.
  3. 3.Click Connect. A Repowise sign-in window opens. Approve access.
  4. 4.Repowise's tools are now available in your Claude chats.

Connect with one click. Sign in with Repowise (OAuth), no API key to copy. Works in Claude on the web, desktop, and mobile.

Docs
bash
https://api.repowise.dev/mcp/langchain-ai/langchain
Editors need an API key: sign in to create one.Sign in to connect

This repo is public, so anyone with a Repowise account and an API key can connect.

Try asking

  • get_risk(["libs/core/langchain_core/language_models/_compat_bridge.py"])
  • get_answer("how is langchain put together?")
  • get_why("why is langchain structured this way?")

Explore langchain

Key features of langchain

  • Chains together interoperable components and third-party integrations to simplify AI application development.
  • Provides a standard interface for models, embeddings, vector stores and other components, so models can be swapped with limited changes to application code.
  • Connects LLMs to diverse data sources and external and internal systems through integrations with model providers, tools, vector stores and retrievers.
  • Supports work at different abstraction levels, from high-level chains for quick starts to low-level components for fine-grained control.
  • Integrates with LangSmith for monitoring, evaluation and debugging of LLM applications.

How langchain-ai/langchain works

Applications are assembled from components that LangChain provides, such as chat models, embeddings and vector stores, behind a shared interface. The core package is exposed through libs/core/langchain_core/__init__.py, which serves as its entry point, and its metadata is declared in libs/core/pyproject.toml. The libs/langchain_v1/langchain/__init__.py file is the entry point of the langchain package that the Quickstart imports from. Provider integrations live in separate packages, for example libs/partners/openai/langchain_openai/chat_models/base.py implements the OpenAI chat model integration. The libs/langchain/langchain_classic/__init__.py file is the entry point of the older langchain_classic package.

The codebase has 2,965 files and 20,598 symbols in 2 modules, led by Python, Makefile and Shell. Code health is 6.7 out of 10, rated fair.

Getting started with langchain

  1. Add the langchain package to a uv project.
    uv add langchain
  2. Create a chat model with init_chat_model and call invoke on it with a message.

Commands copied from the README

langchain-ai/langchain FAQ

What is LangChain?

LangChain is a framework for building agents and LLM-powered applications. It helps developers chain together interoperable components and third-party integrations. It is written in Python.

How does LangChain work?

LangChain gives developers a standard interface for models, embeddings and vector stores, which they combine into applications. A model is created with init_chat_model and then called with invoke, as shown in its Quickstart.

How do I install LangChain?

LangChain is installed with uv add langchain. After installing, a chat model can be created with init_chat_model and called with invoke.

What language is LangChain written in?

LangChain is written in Python. Its repository also includes Makefile, shell and JavaScript files.

How is the LangChain code organized?

The code is organized under the libs directory, with packages such as libs/core, libs/langchain, libs/langchain_v1 and libs/partners. The libs/partners packages hold integrations with model providers such as OpenAI and Anthropic.

When should I use LangChain?

LangChain suits developers who build LLM applications and want to swap models as their needs change. It also suits applications that must connect LLMs to external data sources and systems.

What license does LangChain use?

LangChain is released under the MIT license, identified as MIT.

The summary, features and answers on this page are written by a model from the README and the source, and refreshed with each index.

About this page

Get a page like this for your own codebase

Repowise built this map of langchain-ai/langchain from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Index your repo freeSee how Repowise worksFree for 2 public repos, with a page like this one.

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed.