Install
pip install mistralaiMistral’s hosted Agents API. Launched May 2025 — server-managed agents with built-in connectors (web search, code interpreter, document QA), MCP support, and multi-agent orchestration. Think OpenAI Assistants but for Mistral models.
Install
pip install mistralaiVersion
mistralai 2.4.9 · June 2026 · Python 3.10+
Best for
Mistral-native workloads, hosted agents with connectors, MCP-heavy flows.
mistralai==2.4.9 confirmed latest stable on PyPI (2026-06-04); from mistralai.client import Mistral is the correct import path (top-level from mistralai import Mistral still raises ImportError).from mistralai.client import Mistral verified against installed mistralai==2.4.8 (.routine-envs/check-0529-mistral); from mistralai import Mistral still raises ImportError.guardrails parameter on client.beta.agents.create() and client.beta.conversations.start(): attach GuardrailConfig objects with Mistral moderation v1 (mistral-moderation-2411) or v2 (mistral-moderation-2603) models, with optional block_on_error enforcement. New handoff_execution parameter on all conversations methods: "client" (you handle handoff routing) or "server" (Mistral platform executes handoffs automatically). New prompt_cache_key parameter on agents.complete() (GA agents API) for prompt-level caching. All symbols verified against installed mistralai==2.4.7 (.routine-envs/mistralai); from mistralai.client import Mistral import confirmed correct; from mistralai import Mistral still raises ImportError.import osfrom mistralai.client import Mistral # import from mistralai.client, NOT from mistralai
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
agent = client.beta.agents.create( model="mistral-large-latest", name="Assistant", instructions="You are a helpful assistant.",)
conversation = client.beta.conversations.start( agent_id=agent.id, inputs="What is 15 + 27?",)print(conversation.outputs[0].content)Ready? Start Zero → Hero Step 1 →
| Date | Version | Changes | Reviewer |
|---|---|---|---|
| 2026-06-04 | mistralai 2.4.9 | Version bumped 2.4.8 → 2.4.9 (patch release); version card and “What’s new” updated; mistralai==2.4.9 confirmed latest stable on PyPI (2026-06-04). from mistralai.client import Mistral is confirmed correct import path; from mistralai import Mistral still raises ImportError. | Claude routine |
| 2026-05-29 | mistralai 2.4.8 | Version bumped 2.4.7 → 2.4.8 (patch release); version card and “What’s new” updated; from mistralai.client import Mistral verified against installed mistralai==2.4.8 (.routine-envs/check-0529-mistral); from mistralai import Mistral still raises ImportError. | Claude routine |
| 2026-05-27 | mistralai 2.4.7 | Version bumped 2.4.5 → 2.4.7; “What’s new” updated for 2.4.6 and 2.4.7; new features documented: guardrails on beta.agents.create() (GuardrailConfig with ModerationLlmv1Config/ModerationLlmv2Config), handoff_execution on conversations.start() ("client"/"server"), prompt_cache_key on agents.complete(). Verified against installed mistralai 2.4.7 (.routine-envs/mistralai); from mistralai.client import Mistral confirmed; from mistralai import Mistral still raises ImportError. | Claude routine |
| 2026-05-09 | mistralai 2.4.5 | Version bumped 2.4.4 → 2.4.5 (patch release); version card and “What’s new” updated; from mistralai.client import Mistral verified against installed 2.4.5 (.routine-envs/check-0509-py) — note: from mistralai import Mistral fails (top-level module is a namespace); correct path remains from mistralai.client import Mistral. | Claude routine |
| 2026-05-01 | mistralai 2.4.4 | Version bumped 2.4.3 → 2.4.4 (patch release); version card and “What’s new” updated; from mistralai.client import Mistral verified against installed 2.4.4 (.routine-envs/check-mistral2-0501). | Claude routine |
| 2026-04-28 | mistralai 2.4.3 | Version bumped 2.4.2 → 2.4.3 (patch release); version card and “What’s new” updated; from mistralai.client import Mistral verified against installed 2.4.3. | Claude routine |
| 2026-04-24 | mistralai 2.4.2 | Version bumped 2.4.1 → 2.4.2 (patch release April 23); version card and “What’s new” updated. | — |
| 2026-04-21 | mistralai 2.4.1 | Index redesigned with Zero → Hero + Jump-to-topic grid. | — |
| April 2026 | mistralai 2.4.1 | v2 SDK stabilised; connectors; MCP; orchestration. | — |
| May 2025 | Launch | Agents API public launch. | — |