Metadata-Version: 2.4
Name: shipright
Version: 0.1.0
Summary: Open-source AI model monitoring with automated compliance documentation
Project-URL: Homepage, https://shipright.run
Project-URL: Documentation, https://shipright.run/docs
Project-URL: Repository, https://github.com/ShiprightAI/shipright
Project-URL: Issues, https://github.com/ShiprightAI/shipright/issues
Project-URL: Changelog, https://github.com/ShiprightAI/shipright/blob/main/CHANGELOG.md
Author: ShipRight AI
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai,compliance,drift-detection,eu-ai-act,llm,mlops,model-monitoring,nist-ai-rmf
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.9
Requires-Dist: numpy>=1.21.0
Requires-Dist: requests>=2.28.0
Requires-Dist: scipy>=1.7.0
Provides-Extra: all
Requires-Dist: openai>=1.0.0; extra == 'all'
Requires-Dist: scikit-learn>=1.0.0; extra == 'all'
Requires-Dist: tiktoken>=0.5.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Provides-Extra: llm
Requires-Dist: openai>=1.0.0; extra == 'llm'
Requires-Dist: tiktoken>=0.5.0; extra == 'llm'
Provides-Extra: sklearn
Requires-Dist: scikit-learn>=1.0.0; extra == 'sklearn'
Description-Content-Type: text/markdown

<p align="center">
  <h1 align="center">ShipRight</h1>
  <p align="center">
    <strong>Open-source AI model monitoring with automated compliance documentation.</strong>
  </p>
  <p align="center">
    <a href="https://pypi.org/project/shipright/"><img src="https://img.shields.io/pypi/v/shipright?color=blue" alt="PyPI"></a>
    <a href="https://github.com/ShiprightAI/shipright/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License"></a>
    <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/pypi/pyversions/shipright" alt="Python"></a>
    <a href="https://github.com/ShiprightAI/shipright/actions"><img src="https://img.shields.io/github/actions/workflow/status/ShiprightAI/shipright/ci.yml?branch=main" alt="CI"></a>
  </p>
</p>

---

ShipRight monitors your AI models in production — traditional ML and LLMs — and automatically generates audit-ready compliance documentation for NIST AI RMF, the EU AI Act, Colorado CAIA, and other regulations.

**3 lines of code. Zero config. Continuous compliance.**

```python
import shipright as sr

sr.init(api_key="sr-...", project="fraud-detector")
model = sr.wrap(your_model, reference_data=X_train)

# That's it. Every prediction is now monitored.
predictions = model.predict(X_new)
```

## Why ShipRight?

AI regulations are here. Colorado's AI Act takes effect **June 30, 2026** with fines up to $20,000 per violation per consumer. The EU AI Act reaches full application **August 2, 2026**. Texas, California, and Illinois have active AI laws already.

Most compliance tools cost $50,000+/year and require months to implement. ShipRight gives you:

- **Drift detection on autopilot** — PSI, KS test, Jensen-Shannon divergence running continuously on your production data
- **NIST AI RMF alignment** — maps your monitoring to Govern/Map/Measure/Manage functions, providing [safe harbor](https://shipright.run/blog/nist-safe-harbor) under Colorado, Texas, and California laws
- **Auto-generated compliance docs** — model cards, impact assessments, risk assessments, and audit trail exports in PDF/DOCX
- **LLM monitoring** — semantic drift, hallucination detection, PII scanning, and provider change tracking for OpenAI, Anthropic, and open-source models
- **< 5ms overhead** — async telemetry that won't slow down your inference pipeline

## Quick Start

```bash
pip install shipright
```

### Traditional ML

```python
import shipright as sr
from sklearn.ensemble import RandomForestClassifier

# Initialize
sr.init(api_key="sr-...", project="fraud-detector")

# Wrap your model — works with sklearn, PyTorch, XGBoost, LightGBM, TensorFlow
model = RandomForestClassifier()
model.fit(X_train, y_train)
monitored = sr.wrap(model, reference_data=X_train)

# Use exactly like before — monitoring is automatic
predictions = monitored.predict(X_new)
probabilities = monitored.predict_proba(X_new)
```

### LLM / GenAI

```python
import shipright as sr

# Wrap OpenAI — one line, zero code changes to your LLM calls
client = sr.wrap_openai(
    api_key="sk-...",
    project="customer-chatbot",
    compliance=["nist-ai-rmf", "eu-ai-act", "colorado-caia"]
)

# Use exactly like the OpenAI client
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Analyze my portfolio"}]
)
```

### RAG Pipelines

```python
import shipright as sr

# Wrap LangChain RAG chains
monitored_chain = sr.wrap_langchain(
    chain=retrieval_qa_chain,
    project="hr-policy-bot",
    compliance=["nist-ai-rmf", "colorado-caia"]
)

result = monitored_chain.invoke({"query": "What is our parental leave policy?"})
```

## What Gets Monitored

| Signal | Traditional ML | LLM / GenAI |
|--------|:-:|:-:|
| Feature drift (PSI, KS, JS) | ✅ | — |
| Prediction distribution shift | ✅ | — |
| Semantic drift (embedding distance) | — | ✅ |
| Hallucination / faithfulness | — | ✅ |
| PII leakage detection | — | ✅ |
| Output consistency | — | ✅ |
| Provider drift (silent model updates) | — | ✅ |
| Bias / disparate impact | ✅ | ✅ |
| Performance metrics (accuracy, F1, AUC) | ✅ | — |
| Latency + cost tracking | ✅ | ✅ |

## Compliance Frameworks Supported

| Framework | Status | Safe Harbor |
|-----------|--------|:-----------:|
| NIST AI RMF (Govern/Map/Measure/Manage) | ✅ Supported | CO, TX, CA |
| EU AI Act (Art. 9–15, Annex III) | ✅ Supported | — |
| Colorado CAIA (SB 24-205) | ✅ Supported | ✅ NIST |
| Texas TRAIGA (HB 149) | ✅ Supported | ✅ NIST |
| California SB 942 / SB 53 / AB 2013 | 🔜 Coming | ✅ NIST |
| CCPA ADMT | 🔜 Coming | — |
| ISO 42001 | 🔜 Coming | — |

## ShipRight Cloud

The open-source SDK gives you drift detection and alerting for free. [ShipRight Cloud](https://shipright.run) adds:

- **Auto-generated compliance reports** — model cards, CAIA impact assessments, NIST alignment evidence, audit exports
- **Safe harbor documentation** — proves NIST AI RMF alignment for legal protection
- **Consumer disclosure templates** — pre-written notice language per jurisdiction
- **Multi-model dashboard** — compliance status across all your models
- **Team collaboration** — RBAC, shared dashboards, compliance officer views
- **3-year evidence retention** — meets CAIA retention requirements

→ **[Start free at shipright.run](https://shipright.run)**

## Configuration

```python
sr.init(
    api_key="sr-...",              # or set SHIPRIGHT_API_KEY env var
    project="my-project",          # project name
    environment="production",      # production | staging | dev
    role="deployer",               # deployer | developer (per CAIA)
    compliance=[                   # frameworks to map against
        "nist-ai-rmf",
        "eu-ai-act",
        "colorado-caia",
    ],
)
```

Or use environment variables:

```bash
export SHIPRIGHT_API_KEY=sr-...
export SHIPRIGHT_PROJECT=my-project
export SHIPRIGHT_ENVIRONMENT=production
```

## Contributing

We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

- 🐛 [Report a bug](https://github.com/ShiprightAI/shipright/issues/new?template=bug_report.md)
- 💡 [Request a feature](https://github.com/ShiprightAI/shipright/issues/new?template=feature_request.md)
- 💬 [Join the discussion](https://github.com/ShiprightAI/shipright/discussions)

## License

Apache 2.0 — see [LICENSE](LICENSE) for details.

---

<p align="center">
  <a href="https://shipright.run">Website</a> · <a href="https://shipright.run/docs">Docs</a> · <a href="https://github.com/ShiprightAI/shipright/discussions">Community</a> · <a href="https://twitter.com/shiprightai">Twitter</a>
</p>