langchain-mistralai
An integration package connecting Mistral and LangChain
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 on this page — 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
langchain-mistralai on PyPI
pip
pip install langchain-mistralaiuv
uv add langchain-mistralaipoetry
poetry add langchain-mistralaiInstalling 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 the current Python release (<4.0.0,>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — httpx-sse, httpx, langchain-core, pydantic, tokenizers |
| Maintenance | actively maintained — 40 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,319,121/month — #4,065 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: langchain_mistralai-1.1.6-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
langchain-ollamaConnects LangChain applications to Ollama,…
permissive · top 5,000 on PyPI
langchain-openaiProvides LangChain integrations for OpenAI's…
permissive · top 1,000 on PyPI
langchain-xaiConnects xAI's language models to LangChain…
permissive · top 5,000 on PyPI
langchain-anthropicProvides LangChain integration for Anthropic's…
permissive · top 1,000 on PyPI
langchain-perplexityIntegrates Perplexity AI models into LangChain…
permissive · top 15,000 on PyPI
langchain-fireworksIntegrates Fireworks.ai language models with…
permissive · top 5,000 on PyPI
langchain-modalIntegrates Modal serverless compute sandboxes…
permissive · top 15,000 on PyPI
langchain-deepseekIntegrates DeepSeek language models into…
permissive · top 5,000 on PyPI
langchain-openrouterConnects LangChain applications to OpenRouter,…
permissive · top 15,000 on PyPI
langchain-awsConnects LangChain applications to AWS services…
permissive · top 5,000 on PyPI