Catalog PyPI
PACKAGE EXPLORERView in registry

agent-framework-mistral

PyPI

Mistral AI integration for Microsoft Agent Framework.

Versions collected1
Direct dependencies2From release 1.0.0b261015
Last observed20 Oct, 22:00 UTC

README

Version 1.0.0b261015 documentation

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 VariableDescription
MISTRAL_API_KEYYour Mistral AI API key
MISTRAL_CHAT_MODELChat model name (e.g., mistral-large-latest)
MISTRAL_SERVER_URLOptional 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 VariableDescription
MISTRAL_API_KEYYour Mistral AI API key
MISTRAL_EMBEDDING_MODELEmbedding model name (e.g., mistral-embed)
MISTRAL_SERVER_URLOptional server URL override

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.0b26101515 Oct 20262

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
microsoft/agent-framework

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:00 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c551500d2d591c8b57a232e41409fb564801eca9820473e57c5d4383b64d47d1