--- id: langchain-cohere version: "0.6.0" license: MIT license_treatment: permissive maintenance: active --- # langchain-cohere — An integration package connecting Cohere and LangChain License: permissive · Maintenance: active · Downloads: 960.3K/mo ## 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 above — 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 pip install langchain-cohere uv add langchain-cohere poetry add langchain-cohere ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 960.3K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags langchain cohere integration, cohere llm chat models, cohere embeddings langchain, rag retriever cohere, cohere rerank document relevance, langchain ai integration, cohere api wrapper, langchain-integration, llm-api-wrapper, embeddings-rag [View on SkillFed](https://skillfed.io/packages/langchain-cohere) · [View on PyPI](https://pypi.org/project/langchain-cohere/)