Skip to main content

Industrial-grade Decentralized AI Communication Protocol

Project description

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_rounds guards to prevent runaway API spend.
  • Structured Intent Vectors: Uses a mathematical ledger of IDEA, REFINE, CRITIQUE, and FINAL stages.

Documentation

For the full specification and advanced usage (including custom node orchestration), visit aip.network/docs.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aip_swarm-1.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aip_swarm-1.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file aip_swarm-1.1.0.tar.gz.

File metadata

  • Download URL: aip_swarm-1.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for aip_swarm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7c11ab34bbdaf082a0f1176a071b9d53f68b7009e4f6f9d8fc40a71001c8086d
MD5 fa5b8c96be69c0559646a86f4e4f9019
BLAKE2b-256 4cbe8bb0cb3bd652a3e9513dd68384cc87bacd68f9f24afd09bc3ec8a1b1bcfa

See more details on using hashes here.

File details

Details for the file aip_swarm-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: aip_swarm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for aip_swarm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 323030ba4a7825e858eca253bcfbacbe26e5eff97a48f729fba7289ab4e7bd28
MD5 11fbb87f75fae5faf29d574c50769cf4
BLAKE2b-256 dd152ffa4c54a025d6b8099d47a77ba626e33af90ec9f58b4cdfffb74500c8d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page