Vascular AI Safety Protocol SDK for policy enforcement, RBAC, auditability, and AI safety governance.
Project description
VASP-AI-Safety
VASP SDK is a pip-installable Python SDK for the Vascular AI Safety Protocol, a biomimetic AI governance layer that wraps LLM calls with input security, RBAC, policy enforcement, output filtering, telemetry, and license-tier controls.
The SDK exposes a developer-friendly freemium tier for local prototyping and paid Pro/Enterprise tiers for production governance capabilities such as middleware deployment, compliance reporting, audit export, and multi-tenant policy packs. The free/community SDK is licensed under Apache License 2.0 and is provided on an AS IS / USE AT YOUR OWN RISK basis; Pro and Enterprise usage is governed by the separate EULA in docs/PRO_ENTERPRISE_EULA.md.
Install
From the repository root:
pip install -e .
After packaging to PyPI, the intended install command is:
pip install vasp-sdk
Optional integrations can be installed with extras:
pip install "vasp-sdk[openai]"
pip install "vasp-sdk[server]"
Quick Start
import asyncio
from vasp import VASPClient, UserIdentity, UserRole
async def main():
client = VASPClient.default("mock", "mock-safe")
response = await client.complete(
"Show me the customer database records",
identity=UserIdentity(user_id="analyst@corp.com", role=UserRole.ANALYST, authenticated=True),
)
print(response.policy_decision.action.value)
print(response.content)
asyncio.run(main())
Freemium and Enterprise Tiers
| Capability | Community / Freemium | Developer Pro | Enterprise |
|---|---|---|---|
| Core VASP pipeline | Included | Included | Included |
| Basic RBAC and PII redaction | Included | Included | Included |
| Local audit log | Included | Included | Included |
| Mock provider for no-key testing | Included | Included | Included |
| OpenAI provider support | Paywalled | Included | Included |
| Custom policy rules | Paywalled | Included | Included |
| Audit export | Paywalled | Included | Included |
| Middleware server | Paywalled | Paywalled | Included |
| Compliance reports | Paywalled | Paywalled | Included |
| Multi-tenant policy packs | Paywalled | Paywalled | Included |
| Daily governed requests | 100 | 10,000 | Unlimited |
Set VASP_LICENSE_KEY=vasp_enterprise_demo to test enterprise gating locally. For production, this repository now includes a functional SAL AI hosted licensing backend under license_server/, deployment resources under deploy/license-server/, and operator documentation in docs/LICENSING_BACKEND_DEPLOYMENT.md.
Examples
python examples/basic_completion.py
python examples/rbac_demo.py
python examples/standalone_test.py
python examples/license_demo.py
CLI
vasp plans
vasp license status
vasp license activate --key <license-key> --server-url https://licenses.sal-ai.com
vasp license verify --key <license-key> --server-url https://licenses.sal-ai.com
vasp complete "What is the capital of France?" --role analyst
Architecture
VASP uses a cardiovascular metaphor to make governance responsibilities intuitive:
| VASP Component | Biological Analogy | Function |
|---|---|---|
| Mitral Valve | Inflow valve | Canonicalizes prompts, redacts PII, flags injection and manipulation. |
| Policy Engine | Governance myocardium | Applies RBAC, sensitivity levels, domain controls, and policy decisions. |
| SA/AV/Purkinje Conduction | Heart rhythm | Tracks request flow, latency, and operational telemetry. |
| Tool Firewall | Coronary control | Authorizes function/tool calls by role and risk level. |
| Aortic Valve | Outflow valve | Filters model output for secrets, sensitive data, and compliance risk. |
| Audit Logger | Circulatory memory | Records hash-chained JSONL lifecycle events. |
| License Manager | Commercial valve | Separates freemium developer use from paid enterprise capabilities. |
Tests
python -m unittest discover -s tests -v
Publishing Notes
- Update
pyproject.tomlversion. - Run tests.
- Build distributions with
python -m build. - Upload with
python -m twine upload dist/*after configuring PyPI credentials.
License Model
| Distribution or usage path | Governing terms | Practical meaning |
|---|---|---|
| Community / Freemium SDK source and package | LICENSE — Apache License 2.0 |
Developers may use, modify, and distribute the free SDK under Apache 2.0 terms, including its patent grant and warranty disclaimer. |
| Community / Freemium runtime use | Apache 2.0 plus project notice | The free SDK is provided AS IS and USE AT YOUR OWN RISK. You remain responsible for validating safety, security, privacy, and compliance behavior before deployment. |
| Developer Pro and Enterprise features | docs/PRO_ENTERPRISE_EULA.md plus order form or accepted commercial terms |
Paid features, support, hosted licensing, SLAs, warranties, indemnities, and enterprise commitments are governed separately from the open/free SDK license. |
Security Note
This repository includes both a local SDK-level paywall for packaging demos and a functional hosted validation backend for SAL AI commercial licensing. Production operators should deploy the backend over HTTPS, protect the admin token, avoid logging plaintext license keys, configure backups, and review Pro/Enterprise terms with counsel. VASP does not guarantee that the SDK will prevent all prompt injection, data leakage, policy bypass, privacy incident, model error, regulatory violation, security event, or harmful output.
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
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 vasp_sdk-0.1.0.tar.gz.
File metadata
- Download URL: vasp_sdk-0.1.0.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
092e0f12894a37c61c2df1e3e6cfd5be43c21f73f6f986ccc40e36bccc83c83f
|
|
| MD5 |
9bf31d52b330591ed96d88b27a13c9b8
|
|
| BLAKE2b-256 |
8ff5219bdc820603544f7cc1cd621c6031d32974021dde7bd8cec6ba930dd054
|
File details
Details for the file vasp_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vasp_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
495ec580fb556ba2d2094000941f3897ca0466cb4b902591568182e24c314432
|
|
| MD5 |
144e6475dd23c61ffbad8c9054592040
|
|
| BLAKE2b-256 |
f3d1454a1f3264c72e4953dc5ab92c969019ec40529c9b24343fa9b0c0c3515e
|