> This page is for version v1 API.
> For other versions, use one of these documentation indexes:
> - v2 API (default): https://docs.cohere.com/v2/llms.txt
> - v1 API: https://docs.cohere.com/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cohere.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cohere.com/_mcp/server.

# Cohere and LangChain (Integration Guide)

> Integrate Cohere with LangChain for advanced chat features, RAG, embeddings, and reranking; this guide includes code examples for each feature.

Cohere [has support for LangChain](https://python.langchain.com/docs/integrations/providers/cohere), a framework which enables you to quickly create LLM powered applications.  This guide outlines how to use features from supported Cohere models with LangChain.

## Supported Models

The LangChain-Cohere integration currently supports:

* Command (e.g., `command-a-03-2025`)
* Command A Reasoning (`command-a-reasoning-08-2025`) — requires `langchain-cohere >= 0.5.1`
* Command A Vision (`command-a-vision-07-2025`) — requires `langchain-cohere >= 0.6.0`
* Embed (e.g., `embed-english-v3.0`, `embed-multilingual-v3.0`)
* Rerank (e.g., `rerank-english-v3.0`, `rerank-multilingual-v3.0`)

To use Command A Reasoning or Command A Vision, upgrade to the latest release with `pip install -U langchain-cohere`.

## Prerequisite

To use LangChain and Cohere you will need:

* The core LangChain packages:
  * `pip install langchain` (the examples on these pages target LangChain v1)
  * `pip install langchain-cohere` (the Cohere integration; v0.5.1+ for Command A Reasoning, v0.6.0+ for Command A Vision)
* Depending on which example you run, you may also need:
  * `pip install langchain-community` (third-party integrations such as document loaders, the Wikipedia retriever, and SQL utilities)
  * `pip install langchain-classic` (legacy chains and retrievers such as `create_stuff_documents_chain`, `load_summarize_chain`, and `ContextualCompressionRetriever`)
  * `pip install langchain-text-splitters` (text splitters such as `CharacterTextSplitter`)
  * `pip install langchain-tavily` (the Tavily web-search tool used by the agent examples)
  * `pip install langchain-experimental` (the Python REPL tool used by the CSV agent example)
  * `pip install chromadb` (the Chroma vector store used in the RAG examples)
* Cohere's SDK. To install it, run `pip install cohere`. If you run into any issues or want more details on Cohere's SDK, [see this wiki](https://github.com/cohere-ai/cohere-python).
* A Cohere API Key. For more details on pricing [see this page](https://cohere.com/pricing). When you create an account with Cohere, we automatically create a trial API key for you. This key will be available on the dashboard where you can copy it, and it's in the dashboard section called "API Keys" as well.

## Integrating LangChain with Cohere Models

The following guides contain technical details on the many ways in which Cohere and LangChain can be used in tandem:

* [Chat on LangChain](../docs/chat-on-langchain)
* [Embed on LangChain](../docs/embed-on-langchain)
* [Rerank on LangChain](../docs/rerank-on-langchain)
* [Tools on LangChain](../docs/tools-on-langchain)