Metadata-Version: 2.4
Name: ai_mc2
Version: 2.1.1
Summary: AI-MC2 Fabric Intelligence Layer SDK — Autonomous Intelligence for Multi-Cluster Congestion Control
Author-email: AI-MC2 Engineering <mc2@honeypotz.net>
License-Expression: MIT
Project-URL: Homepage, https://github.com/HONEYPOTZ-AI/AI-MC2-FABRIC
Project-URL: Repository, https://github.com/HONEYPOTZ-AI/ai-mc2
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Networking
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: api
Requires-Dist: fastapi>=0.100.0; extra == "api"
Requires-Dist: uvicorn>=0.23.0; extra == "api"
Requires-Dist: httpx>=0.24.0; extra == "api"
Requires-Dist: pydantic>=2.0; extra == "api"
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: httpx>=0.24.0; extra == "test"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: httpx>=0.24.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# AI-MC2 Fabric Intelligence Layer SDK

[![PyPI version](https://img.shields.io/pypi/v/ai-mc2.svg)](https://pypi.org/project/ai-mc2/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

Python SDK for the AI-MC2 autonomous intelligence layer for multi-cluster
congestion control. Zero dependencies — standard library only.

## Install

```bash
# Open-source SDK (MIT) — zero dependencies
pip install ai-mc2
```

```bash
# From source (clone + editable install)
git clone https://github.com/HONEYPOTZ-AI/ai-mc2.git
cd ai-mc2
pip install -e .
```

## Quick Start

```python
from ai_mc2.topology import LatencyModel
from ai_mc2.models import TopologyType, FlowPriority

# Compare AI-MC2 vs Fat-tree latency at 6 hops
model = LatencyModel(TopologyType.AIMC2)
latency = model.p99_us(6, FlowPriority.LATENCY)
print(f"AI-MC2 p99 @ 6 hops: {latency:.2f} µs")  # 2.89 µs

# AI-MC2 is ~8× faster than Fat-tree
c = model.compare_all(6)
print(f"Fat-tree: {c['fat_tree']:.1f} µs, AI-MC2: {c['aimc2']:.1f} µs")
```

```bash
# CLI demo
python scripts/demo.py
```

### REST API (Proprietary)

```bash
# Install API extras
pip install ai-mc2[api]

# Start the API server
uvicorn api.main:app --reload --host 0.0.0.0 --port 8080

# Open OpenAPI docs
open http://localhost:8080/docs
```

## Subsystems

| Subsystem         | Path                        | Description                          |
|-------------------|-----------------------------|--------------------------------------|
| §1 Topology       | `/api/v1/topology`          | Near-linear hop-latency routing      |
| §2 Congestion     | `/api/v1/congestion`        | Incast suppression & flow admission  |
| §3 Failure Domain | `/api/v1/failure-domain`    | CXL/PCIe blast-radius isolation      |
| §4 Optical        | `/api/v1/optical`           | 800G DR8 power/thermal envelope      |
| Fabric            | `/api/v1/fabric`            | Unified orchestrator                 |

## Development

```bash
make install-dev   # Install SDK + API + test deps
make test          # Run unit + integration tests
make demo          # End-to-end walkthrough
make kpi           # Validate KPI targets
make smoke         # Smoke-test running API
make serve         # Start dev server on :8080
```

## Deployment

```bash
# Docker
docker compose up -d

# Kubernetes
kubectl apply -f deploy/k8s/all.yaml

# Helm
helm upgrade --install ai-mc2 deploy/helm/ai-mc2 \
  --set ingress.host=ai-mc2-api.your-domain.com
```

## License & Pricing

This repository uses a **dual-tier license** model:

| Tier | License | Price | Components |
|---|---|---|---|
| **Community** | MIT | $0 | `ai_mc2/` SDK, unit tests, integration tests, demo script |
| **Pro** | Proprietary | $2,500/mo or $25,000/yr | Full REST API, Docker + docker-compose, CI pipeline, smoke/integration tests, email support (2-day SLA) |
| **Enterprise** | Proprietary | Contact us | K8s/Helm deployment, KEDA autoscaling, Bicep IaC, KPI compliance harness, RBAC + audit logging, priority SLA |

SDK is open-source (MIT) to drive adoption and build trust — the moat is in the
operational, deployment, and compliance tooling.

📧 **[mc2@honeypotz.net](mailto:mc2@honeypotz.net)** for Pro/Enterprise inquiries.
