Cohere and LangChain (Integration Guide)
Cohere and LangChain (Integration Guide)
Cohere has support for LangChain, 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) — requireslangchain-cohere >= 0.5.1 - Command A Vision (
command-a-vision-07-2025) — requireslangchain-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 ascreate_stuff_documents_chain,load_summarize_chain, andContextualCompressionRetriever)pip install langchain-text-splitters(text splitters such asCharacterTextSplitter)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. - A Cohere API Key. For more details on pricing see this page. 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: