MUXI Python SDK
Project description
MUXI Python SDK
Official Python SDK for MUXI — infrastructure for AI agents.
Highlights
- Sync & async clients with pooled
httpxtransport - Context managers for automatic client cleanup
- Built-in retries, idempotency, and typed errors
- Streaming helpers for chat/audio and deploy/log tails
Need deeper usage notes? See the User Guide for streaming, retries, and auth details.
Installation
pip install muxi-client
Quick Start (sync)
from muxi import ServerClient, FormationClient
server = ServerClient(
url="https://server.example.com",
key_id="<key_id>",
secret_key="<secret_key>",
)
print(server.status())
formation = FormationClient(
server_url="https://server.example.com",
formation_id="<formation_id>",
client_key="<client_key>",
admin_key="<admin_key>",
)
print(formation.health())
Quick Start (async)
import asyncio
from muxi import AsyncServerClient, AsyncFormationClient
async def main():
server = AsyncServerClient(
url="https://server.example.com",
key_id="<key_id>",
secret_key="<secret_key>",
)
print(await server.status())
formation = AsyncFormationClient(
server_url="https://server.example.com",
formation_id="<formation_id>",
client_key="<client_key>",
admin_key="<admin_key>",
)
async for evt in await formation.chat_stream({"message": "hi"}):
print(evt)
break
asyncio.run(main())
Formation base URL override
- Default (via server proxy):
server_url + /api/{formation_id}/v1 - Direct formation: set
base_url="http://localhost:9012/v1"(or useurlfor dev modehttp://localhost:8001/v1)
Auth & headers
- Server: HMAC with
key_id/secret_keyon/rpc/*. - Formation:
X-MUXI-CLIENT-KEYorX-MUXI-ADMIN-KEYon formation API. - Idempotency:
X-Muxi-Idempotency-Keyauto-generated on every request. - SDK:
X-Muxi-SDK,X-Muxi-Clientheaders set automatically.
Streaming
- Chat/audio: POST
/chator/audiochatwithstream=True; consume SSE events. - Deploy/log streams: methods return generators/async generators.
Errors, retries, timeouts
- Typed errors for auth/validation/rate-limit/server/connection.
- Default timeout 30s (streaming is unbounded); retries on 429/5xx/connection with backoff.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file muxi-0.20260408.0.tar.gz.
File metadata
- Download URL: muxi-0.20260408.0.tar.gz
- Upload date:
- Size: 23.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4b2a8ebf452ef54042235dd4a8bfe44180094f9a9c0ca6c1deab295095c9cfa
|
|
| MD5 |
a7f43fdd3cf593cfafca60337c40d409
|
|
| BLAKE2b-256 |
b89256d19a905c2962dda0af508cf79b351d65b4580f9db60b9b80b2a47ddee3
|
Provenance
The following attestation bundles were made for muxi-0.20260408.0.tar.gz:
Publisher:
python-release.yml on muxi-ai/muxi-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muxi-0.20260408.0.tar.gz -
Subject digest:
b4b2a8ebf452ef54042235dd4a8bfe44180094f9a9c0ca6c1deab295095c9cfa - Sigstore transparency entry: 1258317957
- Sigstore integration time:
-
Permalink:
muxi-ai/muxi-python@dfb9f2f4f58fef251a0def72dfb9dd7177a35a51 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/muxi-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@dfb9f2f4f58fef251a0def72dfb9dd7177a35a51 -
Trigger Event:
push
-
Statement type:
File details
Details for the file muxi-0.20260408.0-py3-none-any.whl.
File metadata
- Download URL: muxi-0.20260408.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5268c61ac366c0e28b96e990bb5aa7eb4b9d6c262b234a7e267878029152241
|
|
| MD5 |
8a95afc6f9807536b6c935640e29931b
|
|
| BLAKE2b-256 |
b0393520c8b6b2b94b2a28f7e149d1c27a422af4a76dce7e3e5875a49da35b81
|
Provenance
The following attestation bundles were made for muxi-0.20260408.0-py3-none-any.whl:
Publisher:
python-release.yml on muxi-ai/muxi-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muxi-0.20260408.0-py3-none-any.whl -
Subject digest:
f5268c61ac366c0e28b96e990bb5aa7eb4b9d6c262b234a7e267878029152241 - Sigstore transparency entry: 1258317961
- Sigstore integration time:
-
Permalink:
muxi-ai/muxi-python@dfb9f2f4f58fef251a0def72dfb9dd7177a35a51 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/muxi-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yml@dfb9f2f4f58fef251a0def72dfb9dd7177a35a51 -
Trigger Event:
push
-
Statement type: