A3M Router Python SDK
Intelligent LLM routing for Python — routes to cheapest capable model across 47+ providers.
Installation
pip install a3m-router
Usage
from a3m import A3MRouter
router = A3MRouter() # localhost:8787
response = await router.chat("What is 2+2?")
Framework Adapters
| Adapter | Import | Use Case |
|---|---|---|
| LangChain | from a3m import LangChainAdapter |
Chain-based AI workflows |
| LlamaIndex | from a3m import LlamaIndexAdapter |
RAG and document QA |
| Qdrant | from a3m import QdrantAdapter |
Vector search + RAG |
| Weaviate | from a3m import WeaviateAdapter |
Vector search + RAG |
Install adapters:
pip install a3m-router[langchain] # LangChain
pip install a3m-router[llamaindex] # LlamaIndex
pip install a3m-router[qdrant] # Qdrant
pip install a3m-router[weaviate] # Weaviate
pip install a3m-router[all] # All adapters
API Reference
| Method | Description |
|---|---|
chat(message) |
Send chat message with auto-routing |
route(query) |
Get routing decision (no execution) |
stream_chat(message) |
Stream response tokens |
models() |
List available models |
health() |
Provider health status |
Links
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
a3m_router-2.2.0.tar.gz
(11.6 kB
view details)
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 a3m_router-2.2.0.tar.gz.
File metadata
- Download URL: a3m_router-2.2.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
709fbcf24fb014c135b649816fc51a03501012dc311e2781dc6408072a1cc833
|
|
| MD5 |
4f9dde9418ec177c34b3f7c3faf9f07b
|
|
| BLAKE2b-256 |
51141484bcb8be9578c15eb6b4054dc6de3b299129378607f3b717be88da1c16
|
File details
Details for the file a3m_router-2.2.0-py3-none-any.whl.
File metadata
- Download URL: a3m_router-2.2.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55130429733099b1dcac9828804368b73c918b0a85aaaf1be3f1807f5c6084ea
|
|
| MD5 |
9eb2aa782c1627a8efede7765650b1c5
|
|
| BLAKE2b-256 |
bb9485ec16225781cc94b336bd719ade86013c359c60316b8c230516fc1b03d5
|