langchain-cohere
An integration package connecting Cohere and LangChain
What it is and what it does
langchain-cohere is a bridge package that exposes Cohere's language models and retrieval tools through LangChain's standard interfaces. It provides four main capabilities: a chat interface for building conversational applications, text embeddings for semantic search, a retrieval-augmented generation (RAG) retriever for connecting to external data sources, and a reranking tool for sorting results by relevance. The package also includes a ReAct agent for multi-step reasoning with tool use.
The package was migrated from langchain-community starting at version 0.0.30, consolidating Cohere integrations into a dedicated namespace. It requires Python 3.10 or later and depends on cohere (the Cohere Python SDK), langchain-core (LangChain's base abstractions), pydantic (for data validation), and types-pyyaml (type hints). You authenticate by setting a COHERE_API_KEY environment variable before instantiating any Cohere component.
Use it for:
- Build chatbots and conversational agents using Cohere's chat models through LangChain's message interface.
- Embed documents and queries into vector space for semantic search and similarity matching.
- Implement retrieval-augmented generation pipelines that fetch and rank external documents before generating responses.
- Rerank search or retrieval results by relevance without building a full RAG pipeline.
- Create multi-step reasoning agents that use tools and external data sources to answer complex questions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Connects LangChain applications to Cohere's language models, providing chat, text embedding, retrieval-augmented generation, and reranking capabilities through a unified integration layer.
Yes. The package is actively maintained, has no known vulnerabilities, and low installation friction. Install it if you are building LangChain applications that need Cohere's models or embeddings. The MIT license poses no restrictions. Verify that your environment can set the COHERE_API_KEY before deploying.
Install
langchain-cohere on PyPI
pip
pip install langchain-cohereuv
uv add langchain-coherepoetry
poetry add langchain-cohereInstalling langchain-cohere
Before you install
Low friction installation with a pure Python wheel. The package is actively maintained with a recent release and no known vulnerabilities. Four runtime dependencies (cohere, langchain-core, pydantic, types-pyyaml) are all standard ecosystem packages.
License in practice
MIT license permits commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely provided you retain the license notice.
Quickstart
pip install langchain-cohere
from langchain_cohere import ChatCohere
from langchain_core.messages import HumanMessage
llm = ChatCohere()
messages = [HumanMessage(content="Hello, can you introduce yourself?")]
print(llm.invoke(messages))
Requires a Cohere API key set as the COHERE_API_KEY environment variable; Python 3.10 or later.
Verify before relying
- Whether Cohere SDK v5+ is automatically installed or must be managed separately in your environment.
- Performance characteristics and rate limits when used with large document sets or high-volume embedding requests.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — cohere, langchain-core, pydantic, types-pyyaml |
| Maintenance | actively maintained — 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 960,330/month — #4,635 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_cohere-0.6.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
coherePython SDK for accessing Cohere's language…
permissive · top 1,000 on PyPI
langchain-qdrantConnects LangChain applications to Qdrant…
permissive · top 5,000 on PyPI
langchain-nvidia-ai-endpointsIntegrates NVIDIA AI Foundation Models and chat…
permissive · top 5,000 on PyPI
langchain-cerebrasIntegrates Cerebras AI inference services with…
permissive · top 15,000 on PyPI
langchain-ociIntegrates LangChain with Oracle Cloud…
unclear · top 15,000 on PyPI
langchain-chromaConnects LangChain applications to Chroma, a…
permissive · top 5,000 on PyPI
langchain-ibmIntegrates IBM watsonx.ai models with…
permissive · top 15,000 on PyPI
langchain-sambanovaConnects LangChain applications to SambaNova's…
permissive · top 15,000 on PyPI
langchain-basetenIntegrates Baseten's chat models and embeddings…
permissive · top 15,000 on PyPI
langchain-groqConnects Groq's inference API to LangChain,…
permissive · top 5,000 on PyPI