Parallel Multi-Agent Inference.
Project description
Parallax-AI
Installation
You can install Parallax using pip:
pip install parallax-ai
Client
from parallax_ai import Client
# Initialize Client with multiple models and load balancing
client = Client(
# Add custom remote model addresses here
model_remote_address={
"openai/gpt-oss-20b": [
{"api_key": "EMPTY", "base_url": f"http://<YOUR_MODEL_ADDRESS>:8000/v1"},
],
# Load balance across multiple instances of the same model
"google/gemma-3-27b-it": [
{"api_key": "EMPTY", "base_url": f"http://<YOUR_MODEL_ADDRESS>:8000/v1"},
{"api_key": "EMPTY", "base_url": f"http://<YOUR_MODEL_ADDRESS>:8000/v1"},
{"api_key": "EMPTY", "base_url": f"http://<YOUR_MODEL_ADDRESS>:8000/v1"},
{"api_key": "EMPTY", "base_url": f"http://<YOUR_MODEL_ADDRESS>:8000/v1"},
],
},
)
Agent
from parallax_ai import Agent
# Create an Agent with structured input and output
agent = Agent(
model_name="google/gemma-3-27b-it",
system_prompt="You are a helpful assistant that translates English to French.",
input_structure={"text": str},
output_structure={"translation": str},
)
# Run the agent with batch of structured inputs
agent.run([
{"text": "Hello, how are you?"},
{"text": "What is your name?"},
{"text": "Where do you live?"},
])
MultiAgent
from parallax_ai import MultiAgent, AgentIO, Dependency
multi_agent = MultiAgent(
agents={
"translator": Agent(
model_name="google/gemma-3-27b-it",
system_prompt="You are a helpful assistant that translates English to French.",
input_structure={"text": str},
output_structure={"translation": str},
),
"summarizer": Agent(
model_name="openai/gpt-oss-20b",
system_prompt="You are a helpful assistant that summarizes text.",
input_structure={"translation": str},
output_structure={"summary": str},
),
},
agent_ios={
"translator": AgentIO(
dependency=Dependency(external_data=["text"]),
),
"summarizer": AgentIO(
dependency=Dependency(agent_outputs=["translator"]),
),
},
)
multi_agent.run([
{"text": "Hello, how are you?"},
{"text": "What is your name?"},
{"text": "Where do you live?"},
])
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
parallax_ai-0.4.0.tar.gz
(34.1 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 parallax_ai-0.4.0.tar.gz.
File metadata
- Download URL: parallax_ai-0.4.0.tar.gz
- Upload date:
- Size: 34.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd9e772d99fa86edd0a7f78dd77d4443bb1f24ed7d6427e174f17e094e723ff6
|
|
| MD5 |
e42d9b3b7a0a3a97efe284ce22bb1eca
|
|
| BLAKE2b-256 |
1d64a1466b1944b98948fc48349dacaa57b45b8d495381743364f4f927c5a8c6
|
File details
Details for the file parallax_ai-0.4.0-py3-none-any.whl.
File metadata
- Download URL: parallax_ai-0.4.0-py3-none-any.whl
- Upload date:
- Size: 39.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f440f339428356bf52cb474204be9062596c25e5adf09f91d334f301f0d1313
|
|
| MD5 |
d0c15603f7f190b60f37b7ad16dc7ac2
|
|
| BLAKE2b-256 |
ce1fe7da44703b3ddd7c914c2a329aa542e12ffa6c3dd925a04753eef09a4ad5
|