--- id: langchain-mistralai version: "1.1.6" license: MIT license_treatment: permissive maintenance: active --- # langchain-mistralai — An integration package connecting Mistral and LangChain License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does langchain-mistralai is a bridge package that integrates Mistral AI's language models into the LangChain ecosystem. It wraps Mistral's API behind LangChain's standard model interfaces, so you can drop Mistral models into existing LangChain agents, chains, and workflows without rewriting integration code. The package depends on langchain-core for the base interfaces, httpx and httpx-sse for HTTP communication with Mistral's servers, pydantic for configuration validation, and tokenizers for token counting. It's designed for developers already working within LangChain who want to experiment with or deploy Mistral models as their LLM backbone. The integration is maintained as part of the larger LangChain project and follows its release and versioning policies. You provide your Mistral API credentials, instantiate a model class, and use it like any other LangChain LLM—no special Mistral-specific code needed in your application logic. Use it for: - Build a LangChain agent that uses Mistral models instead of OpenAI or Anthropic. - Swap Mistral into an existing LangChain RAG pipeline without rewriting the retrieval or chain logic. - Prototype multi-model applications by comparing Mistral outputs alongside other providers in the same LangChain workflow. - Deploy a production chatbot using LangChain's memory and tool-calling features backed by Mistral's API. - Integrate Mistral models into a LangChain-based data analysis or summarization pipeline. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Connects Mistral AI language models to LangChain, enabling you to use Mistral's models within LangChain's agent and chain frameworks. Yes, if you are already using LangChain and want to integrate Mistral models. The package is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. Install it when you need Mistral as your LLM provider within a LangChain application; skip it if you are not using LangChain or do not need Mistral specifically. ## Install pip install langchain-mistralai uv add langchain-mistralai poetry add langchain-mistralai ## Installing langchain-mistralai Before you install: Low friction install with a pure-Python wheel. Active maintenance with a recent release 40 days ago; the parent LangChain project has substantial community engagement (144266 stars) and ongoing development. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install langchain-mistralai from langchain_mistralai import ChatMistralAI model = ChatMistralAI(api_key="your-key") response = model.invoke("Hello") Requires a valid Mistral API key and Python 3.10 or later. Verify before relying: - Whether the package supports streaming responses or only synchronous calls. - Which Mistral models are available through this integration and their current availability. - Whether tool-calling or function-calling features are supported. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags mistral ai langchain integration, mistral language models python, langchain mistral provider, mistral llm integration, mistral ai api wrapper, langchain ai model provider, llm-integration, langchain-provider [View on SkillFed](https://skillfed.io/packages/langchain-mistralai) · [View on PyPI](https://pypi.org/project/langchain-mistralai/)