Mistral AI Integration
Updated on Aug 14, 2026
Use this integration when your app is implemented in Python.
Setup
- Install SDK
bash
pip install progress-observability
- Instrument your app
python
Observability.instrument(
app_name=os.getenv("OBSERVABILITY_APP_NAME"),
api_key=os.getenv("OBSERVABILITY_API_KEY")
)
- Complete example
python
import os
from dotenv import load_dotenv
from mistralai import Mistral
from progress.observability import Observability
load_dotenv()
Observability.instrument(
app_name=os.getenv("OBSERVABILITY_APP_NAME"),
api_key=os.getenv("OBSERVABILITY_API_KEY"),
)
client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])
model = os.getenv("MISTRAL_MODEL", "mistral-large-latest")
response = client.chat.complete(
model=model,
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the capital of France?"},
],
temperature=0.0,
max_tokens=64,
)
Observability.shutdown()
To get a richer trace tree when building agents on top of this provider, use the
@agent,@tool,@workflow, or@taskdecorators. See the Python SDK for details.