AIP Swarm (Official SDK)
The official Python client for the AI Interaction Protocol (AIP).
AIP is a decentralized reasoning layer that enables multiple AI models (GPT-4, Claude, Llama, and more) to communicate, cross-examine, and converge on high-fidelity solutions. By moving beyond single-model "guessing," AIP provides a mathematical consensus engine for complex logic.
Installation
pip install aip-swarm
Quick Start (30 Seconds)
AIP is designed for developer simplicity. The solve() function abstracts away the entire multi-model negotiation ledger.
import os
from aip import solve
# 1. Provide your Host credentials
os.environ["AIP_HOST_URL"] = "https://your-aip-server.com"
os.environ["AIP_HOST_KEY"] = "your-host-key"
# 2. Seed a goal and let the swarm debate
result = solve(
goal="Optimize this SQL query for a billion-row table: SELECT * FROM logs WHERE type='error'",
models=["gpt-4o", "claude-3-5-sonnet"],
max_rounds=15 # Protection against infinite loops
)
print(f"Consensus Answer: {result.text}")
print(f"Session Trace: {result.trace}") # See the entire reasoning chain
Key Features
- Multi-Model Consensus: Eliminates hallucination by forcing independent models to agree on a final output.
- Session Isolation: Full multi-tenancy support via
session_id. - Cost Protection: Built-in
max_roundsguards to prevent runaway API spend. - Structured Intent Vectors: Uses a mathematical ledger of
IDEA,REFINE,CRITIQUE, andFINALstages.
Documentation
For the full specification and advanced usage (including custom node orchestration), visit aip.network/docs.
License
MIT
Metadata
Release files for aip-swarm 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aip_swarm-1.1.2.tar.gz | 6.0 kB | Without provenance | Details for aip_swarm-1.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aip_swarm-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for aip_swarm-1.1.2-py3-none-any.whl |
Total release size: 12.8 kB
Release files / aip_swarm-1.1.2.tar.gz
| Download URL | aip_swarm-1.1.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6b34788cb0769ed55c1fcf46d21197ace507184254fd33b2f954e9f188dd881
|
|
BLAKE2b-256 checksum How to use checksums |
6a7b846724da13289d2ea42d26bf291063b1171c73f780181ce6d98ea8c1cc5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Release files / aip_swarm-1.1.2-py3-none-any.whl
| Download URL | aip_swarm-1.1.2-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc6558d0d808d5db40e98b29d8b01220a92cd6f691c9c3f51be5a61e5b7a4e83
|
|
BLAKE2b-256 checksum How to use checksums |
68ef4ae54bf0cb2d4f868e6522573317f4dd1814053b23e0ba3439f1858628da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.6
|
Security for aip-swarm 1.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.