waken-mistral
A Mistral Target adapter for
Waken — "nginx for AI agents." Routes
waken Events to Mistral AI's chat completion API and returns the result as
a waken Response.
Install
pip install waken-mistral
Usage
from waken import Runtime
from waken_mistral import MistralAdapter
runtime = Runtime()
runtime.target("mistral", MistralAdapter())
runtime.run()
MistralAdapter reads MISTRAL_API_KEY from the environment — that's the
mistralai SDK's own convention, nothing waken-specific. Pass api_key=...
(or any other Mistral client keyword, e.g. server_url=...) to override:
runtime.target("mistral", MistralAdapter(model="mistral-small-latest", api_key="..."))
Sessions
Unlike Claude or OpenAI, Mistral's chat completion API has no server-side
resumable session id — it's a stateless endpoint that expects the full
conversation history resent on every call. So MistralAdapter maps a waken
session_id to a plain, growing list of {"role": ..., "content": ...}
messages, appends the new user prompt and the assistant's reply to that list
on every turn, and resends the whole thing each time. History is kept
client-side, in this process's memory only — there's no persistence
layer, and it's lost on restart. That's the same tradeoff waken itself
makes for sessions in general: the runtime only stores the session id
mapping, never conversation content, so any content-level durability is the
adapter's responsibility, not the runtime's. An Event with no session_id
sends a fresh one-message list each call and is never stored.
Development
git clone https://github.com/WakenHQ/waken-mistral
cd waken-mistral
pip install -e ".[dev]"
pytest
Tests mock mistralai.client.Mistral entirely — no API key or network
access needed to run the suite.
License
Metadata
Release files for waken-mistral 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| waken_mistral-0.1.0.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| waken_mistral-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / waken_mistral-0.1.0.tar.gz
| Download URL | waken_mistral-0.1.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
109c3105e525e13ec257a10bb37f4614fab11bba5f45b65b2d51a0a0ed9f525e
|
|
BLAKE2b-256 checksum How to use checksums |
5411f2cd294b30eadd98cb2c598e39cdc35131111e27694038b5d443fbaa5cf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / waken_mistral-0.1.0-py3-none-any.whl
| Download URL | waken_mistral-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f8973d353002cffd209c989f727433eb36671e4c18046c76f22d25bbf5c95d6
|
|
BLAKE2b-256 checksum How to use checksums |
4b6b824deb9c2c49c828b195935332c760c42631793e66f480d68e5bf7026287
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency log