Skip to main content

[ ![🦜️🔗 Langchain](/img/brand/wordmark.png) ![🦜️🔗
Langchain](/img/brand/wordmark-dark.png) ](/) [ Docs
](/docs/get_started/introduction) [ Use cases ](/docs/use_cases) [
Integrations ](/docs/integrations/platforms/) [ Guides
](/docs/guides/debugging) [ API  ](https://api.python.langchain.com)

More

  * [ People ](/docs/people/)
  * [ Versioning ](/docs/packages)
  * [ Changelog ](/docs/changelog)
  * [ Contributing ](/docs/contributing)
  * [ Templates ](/docs/templates/)
  * [ Cookbooks  ](https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md)
  * [ Tutorials ](/docs/additional_resources/tutorials)
  * [ YouTube ](/docs/additional_resources/youtube)

🦜️🔗

  * [ LangSmith  ](https://smith.langchain.com)
  * [ LangSmith Docs  ](https://docs.smith.langchain.com/)
  * [ LangServe GitHub  ](https://github.com/langchain-ai/langserve)
  * [ Templates GitHub  ](https://github.com/langchain-ai/langchain/tree/master/templates)
  * [ Templates Hub  ](https://templates.langchain.com)
  * [ LangChain Hub  ](https://smith.langchain.com/hub)
  * [ JS/TS Docs  ](https://js.langchain.com)

[ 💬  ](https://chat.langchain.com) [ ](https://github.com/langchain-
ai/langchain)

Search

  * [ Get started ](/docs/get_started)

    * [ Introduction ](/docs/get_started/introduction)
    * [ Installation ](/docs/get_started/installation)
    * [ Quickstart ](/docs/get_started/quickstart)
    * [ Security ](/docs/security)
  * [ LangChain Expression Language ](/docs/expression_language/)

    * [ Get started ](/docs/expression_language/get_started)
    * [ Why use LCEL ](/docs/expression_language/why)
    * [ Interface ](/docs/expression_language/interface)
    * [ Streaming ](/docs/expression_language/streaming)
    * [ How to ](/docs/expression_language/how_to/)

    * [ Cookbook ](/docs/expression_language/cookbook/)

    * [ LangChain Expression Language (LCEL) ](/docs/expression_language/)
  * [ Modules ](/docs/modules/)

    * [ Model I/O ](/docs/modules/model_io/)

    * [ Retrieval ](/docs/modules/data_connection/)

    * [ Agents ](/docs/modules/agents/)

    * [ Chains ](/docs/modules/chains)
    * [ More ](/docs/modules/memory/)

  * [ LangServe ](/docs/langserve)
  * [ LangSmith ](/docs/langsmith/)

  * [ LangGraph ](/docs/langgraph)

  * [ ](/)
  * [ Modules  ](/docs/modules/)
  * Chains 

#  Chains

Chains refer to sequences of calls - whether to an LLM, a tool, or a data
preprocessing step. The primary supported way to do this is with [ LCEL
](/docs/expression_language) .

LCEL is great for constructing your own chains, but it’s also nice to have
chains that you can use off-the-shelf. There are two types of off-the-shelf
chains that LangChain supports:

  * Chains that are built with LCEL. In this case, LangChain offers a higher-level constructor method. However, all that is being done under the hood is constructing a chain with LCEL. 

  * [  Legacy  ]  Chains constructed by subclassing from a legacy ` Chain ` class. These chains do not use LCEL under the hood but are rather standalone classes. 

We are working creating methods that create LCEL versions of all chains. We
are doing this for a few reasons.

  1. Chains constructed in this way are nice because if you want to modify the internals of a chain you can simply modify the LCEL. 

  2. These chains natively support streaming, async, and batch out of the box. 

  3. These chains automatically get observability at each step. 

This page contains two lists. First, a list of all LCEL chain constructors.
Second, a list of all legacy Chains.

##  LCEL Chains  ​

Below is a table of all LCEL chain constructors. In addition, we report on:

**Chain Constructor**

The constructor function for this chain. These are all methods that return
LCEL runnables. We also link to the API documentation.

**Function Calling**

Whether this requires OpenAI function calling.

**Other Tools**

What other tools (if any) are used in this chain.

**When to Use**

Our co