skillfed

langchain-mistralai

An integration package connecting Mistral and LangChain

langchain-mistralai v1.1.6 1.3M downloads/30d#4,065 on PyPI144,266
Permissive license MIT Active released

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-mistralai

uv

uv add langchain-mistralai

poetry

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 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

mistral ai langchain integrationmistral language models pythonlangchain mistral providermistral llm integrationmistral ai api wrapperlangchain ai model provider
llm-integrationlangchain-provider

More Artificial Intelligence packages

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

huggingface-hub

Client library and CLI tool for downloading,…

permissive · top 100 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

hf-xet

hf-xet provides chunk-based deduplication and…

permissive · top 1,000 on PyPI

tokenizers

Tokenizers converts raw text into token…

permissive · top 1,000 on PyPI

transformers

Transformers provides a unified framework for…

permissive · top 1,000 on PyPI

langchain-ollama

Connects LangChain applications to Ollama,…

permissive · top 5,000 on PyPI

langchain-openai

Provides LangChain integrations for OpenAI's…

permissive · top 1,000 on PyPI

langchain-xai

Connects xAI's language models to LangChain…

permissive · top 5,000 on PyPI

langchain-anthropic

Provides LangChain integration for Anthropic's…

permissive · top 1,000 on PyPI

langchain-perplexity

Integrates Perplexity AI models into LangChain…

permissive · top 15,000 on PyPI

langchain-fireworks

Integrates Fireworks.ai language models with…

permissive · top 5,000 on PyPI

langchain-modal

Integrates Modal serverless compute sandboxes…

permissive · top 15,000 on PyPI

langchain-deepseek

Integrates DeepSeek language models into…

permissive · top 5,000 on PyPI

langchain-openrouter

Connects LangChain applications to OpenRouter,…

permissive · top 15,000 on PyPI

langchain-aws

Connects LangChain applications to AWS services…

permissive · top 5,000 on PyPI