Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Get Started with Microsoft Agent Framework Mistral AI

Please install this package:

pip install agent-framework-mistral --pre

and see the README for more information.

See the Mistral agent sample and the Mistral embedding sample for runnable examples.

Chat Client

The MistralChatClient provides chat completions using Mistral AI models, with support for streaming, function tools, and structured output.

Quick Start

from agent_framework import Agent
from agent_framework.mistral import MistralChatClient

# Using environment variables (MISTRAL_API_KEY, MISTRAL_CHAT_MODEL)
# Parameters can also be passed directly:
# MistralChatClient(model="mistral-large-latest", api_key="your-api-key")
client = MistralChatClient()
try:
    agent = Agent(client=client, instructions="You are a helpful assistant.")
    response = await agent.run("Hello!")
    print(response.text)
finally:
    await client.close()

Configuration

Environment Variable Description
MISTRAL_API_KEY Your Mistral AI API key
MISTRAL_CHAT_MODEL Chat model name (e.g., mistral-large-latest)
MISTRAL_SERVER_URL Optional server URL override

Chat connection settings belong on the client, not on individual requests. Both MistralChatClient and RawMistralChatClient reject server_url, http_headers, retries, and timeout_ms in per-call options or client_kwargs. Configure the endpoint with the constructor's server_url, or inject a configured SDK client or http_client. Normal model generation options remain per-call.

Embedding Client

The MistralEmbeddingClient provides embedding generation using Mistral AI models.

Quick Start

from agent_framework.mistral import MistralEmbeddingClient

# Using environment variables (MISTRAL_API_KEY, MISTRAL_EMBEDDING_MODEL)
client = MistralEmbeddingClient()

try:
    # Parameters can also be passed directly:
    # MistralEmbeddingClient(model="mistral-embed", api_key="your-api-key")
    result = await client.get_embeddings(["Hello, world!", "How are you?"])
    for embedding in result:
        print(f"Dimensions: {embedding.dimensions}")
        print(f"Vector: {embedding.vector[:5]}...")
finally:
    await client.close()

Configuration

Environment Variable Description
MISTRAL_API_KEY Your Mistral AI API key
MISTRAL_EMBEDDING_MODEL Embedding model name (e.g., mistral-embed)
MISTRAL_SERVER_URL Optional server URL override

Metadata

Release files for agent-framework-mistral 1.0.0b261030

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-framework-mistral 1.0.0b261030
File Size Uploaded Provenance Actions
agent_framework_mistral-1.0.0b261030.tar.gz 17.5 kB Without provenance Details for agent_framework_mistral-1.0.0b261030.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-framework-mistral 1.0.0b261030
File Interpreter ABI Platform Actions
agent_framework_mistral-1.0.0b261030-py3-none-any.whl Python 3 none any Details for agent_framework_mistral-1.0.0b261030-py3-none-any.whl

Total release size: 37.2 kB

Release files / agent_framework_mistral-1.0.0b261030.tar.gz

Download URL agent_framework_mistral-1.0.0b261030.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6c97247d3c654bdf578066c9b67a6a0672e5d544eab23462cb1f7f468a3ddda2
BLAKE2b-256 checksum
How to use checksums
3de97288638f4e2b0bc6f8baa3183b1ed3c7e5ab7f2f681a87897f00b4a77c87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / agent_framework_mistral-1.0.0b261030-py3-none-any.whl

Download URL agent_framework_mistral-1.0.0b261030-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4dbcd6b0a9f4991af6e6d68d3e41fe3efcc820aa8bbb1615ddbe6a2e64e9bee
BLAKE2b-256 checksum
How to use checksums
540882ed77857014c4f3e05ef9302f9a4a59c4e58e5755e5e31623d02ef0e778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for agent-framework-mistral 1.0.0b261030

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page