Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions python/packages/minimax/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# MiniMax Package (agent-framework-minimax)

Integration with MiniMax's Anthropic-compatible API for Microsoft Agent Framework.

## Main Classes

- **`MiniMaxClient`** - Chat client for MiniMax models via Anthropic-compatible API
- **`RawMiniMaxClient`** - Raw client without middleware or telemetry
- **`MiniMaxSettings`** - Settings TypedDict for MiniMax configuration

## Supported Models

| Model ID | Description |
|----------|-------------|
| `MiniMax-M2.7` | Peak Performance. Ultimate Value. Master the Complex |
| `MiniMax-M2.7-highspeed` | Same performance, faster and more agile |

## Usage

```python
from agent_framework_minimax import MiniMaxClient

# Set MINIMAX_API_KEY environment variable, then:
client = MiniMaxClient(model="MiniMax-M2.7")
response = await client.get_response("Hello from MiniMax!")
```

## Import Path

```python
from agent_framework_minimax import MiniMaxClient
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `MINIMAX_API_KEY` | Yes | MiniMax API key |
| `MINIMAX_CHAT_MODEL` | No | Default model to use |
| `MINIMAX_BASE_URL` | No | Override base URL (default: `https://api.minimax.io/anthropic`) |

## API Reference

- Chat (Anthropic Compatible): https://platform.minimax.io/docs/api-reference/text-anthropic-api
21 changes: 21 additions & 0 deletions python/packages/minimax/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
61 changes: 61 additions & 0 deletions python/packages/minimax/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Get Started with Microsoft Agent Framework MiniMax

Please install this package via pip:

```bash
pip install agent-framework-minimax --pre
```

## MiniMax Integration

The MiniMax integration enables communication with MiniMax's Anthropic-compatible API,
allowing your Agent Framework applications to leverage MiniMax's powerful language models.

### Environment Variables

Set the following environment variables before using the client:

```bash
export MINIMAX_API_KEY="your_minimax_api_key"
```

### Basic Usage Example

```python
import asyncio
from agent_framework_minimax import MiniMaxClient

async def main():
client = MiniMaxClient(model="MiniMax-M2.7")
response = await client.get_response("Hello! Tell me about yourself.")
print(response.messages[0].text)

asyncio.run(main())
```

### Streaming Example

```python
import asyncio
from agent_framework_minimax import MiniMaxClient

async def main():
client = MiniMaxClient(model="MiniMax-M2.7")
async for update in await client.get_streaming_response("Tell me a short story."):
if update.text:
print(update.text, end="", flush=True)
print()

asyncio.run(main())
```

### Supported Models

| Model | Description |
|-------|-------------|
| `MiniMax-M2.7` | Peak Performance. Ultimate Value. Master the Complex |
| `MiniMax-M2.7-highspeed` | Same performance, faster and more agile |

### API Documentation

- Chat (Anthropic Compatible): https://platform.minimax.io/docs/api-reference/text-anthropic-api
17 changes: 17 additions & 0 deletions python/packages/minimax/agent_framework_minimax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Microsoft. All rights reserved.

import importlib.metadata

from ._chat_client import MiniMaxClient, MiniMaxSettings, RawMiniMaxClient

try:
__version__ = importlib.metadata.version(__name__)
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0" # Fallback for development mode

__all__ = [
"MiniMaxClient",
"MiniMaxSettings",
"RawMiniMaxClient",
"__version__",
]
Loading
Loading