AVA - AI Visibility Anonymizer Protocol
Reason this release was yanked:
cleanup
Project description
AVA Protocol ๐ก๏ธ
AI Visibility Anonymizer Protocol โ A protocol-first approach to privacy-preserving AI interactions.
Authors
- Gerald Enrique Nelson Mc Kenzie (https://github.com/lordxmen2k)
Date
- 3/13/2026
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AVA LAYER โ
โ (AI Visibility Anonymizer Protocol) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ INGEST โ DETECT โ CLASSIFY โ TRANSFORM โ AUDIT โ AI โ
โ โ โ โ
โ Original Data Clean Responseโ
โ โ โ โ
โ RESTORE โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ What is AVA?
AVA is an open protocol and Python library for anonymizing sensitive data before sending it to AI/LLM services, with complete audit trails and reversible tokenization.
Core Principles
| Principle | Description |
|---|---|
| Visibility | Complete audit trail of what was sanitized and why |
| Reversibility | Secure token vault for restoring original data in responses |
| Interoperability | Works with any AI provider (OpenAI, Anthropic, local models) |
| Configurability | Policy-driven sensitivity levels per use case |
| Engine Agnostic | Pluggable detection engines (Presidio, AWS Macie, etc.) |
๐ Quick Start
Installation
# Core library only (gateway mode)
pip install ava-protocol
# With local detection engine (Presidio)
pip install ava-protocol[local]
# With all optional dependencies
pip install ava-protocol[all]
Basic Usage
import ava
import openai
# Initialize client (local Presidio engine)
client = ava.Client(
engine="presidio",
policy="healthcare_strict",
retention=3600 # Token expiry in seconds
)
# Sanitize โ AI โ Restore
with client.session(reversibility=True) as session:
# 1. Sanitize PII before sending to AI
clean_prompt = session.sanitize(
"Patient John Doe (john.doe@email.com) needs prescription refill"
)
# Result: "Patient AVA_PERS_7a3f9k2m (AVA_EMAI_x8n4p5qv) needs prescription refill"
# 2. Send to AI (AI never sees original PII)
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": clean_prompt}]
)
ai_output = response.choices[0].message.content
# 3. Restore original values in AI response
original_response = session.restore(ai_output)
# Result: "John Doe should contact john.doe@email.com..."
Gateway Mode (Enterprise)
import ava
# Connect to centralized AVA Gateway
client = ava.GatewayClient(
url="https://ava.internal.company.com",
api_key="your-api-key",
policy="finance_strict"
)
with client.session() as session:
clean = session.sanitize("Invoice to Acme Corp...")
# ... AI call ...
original = session.restore(ai_response)
๐ Supported Entity Types
| Category | Entities | Example |
|---|---|---|
| Identity | PERSON_NAME, USERNAME |
"John Doe" โ AVA_PERS_7a3f9k2m |
| Contact | EMAIL_ADDRESS, PHONE_NUMBER |
"john@email.com" โ AVA_EMAI_x8n4p5qv |
| Financial | CREDIT_CARD, BANK_ACCOUNT, SSN |
"123-45-6789" โ AVA_SSN_3x8k9n4p |
| Location | LOCATION, IP_ADDRESS |
"192.168.1.1" โ AVA_IPAD_q2m7n5vx |
| Medical | MEDICAL_LICENSE, DIAGNOSIS |
Condition-specific detection |
๐ง Configuration
Environment Variables
export AVA_MODE=embedded # or "gateway"
export AVA_ENGINE=presidio
export AVA_POLICY=healthcare_strict
export AVA_RETENTION=3600
export AVA_GATEWAY_URL=https://ava.internal.company.com
export AVA_API_KEY=your-api-key
YAML Config
# ava-config.yaml
mode: embedded
engine: presidio
policy: finance_strict
retention: 7200
# Or gateway mode:
mode: gateway
url: https://ava-gateway.company.com
api_key: ${AVA_API_KEY}
import ava
config = ava.Config.from_yaml("ava-config.yaml")
client = ava.create_client(config)
๐๏ธ Architecture
Protocol-First Design
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AVA PROTOCOL SPEC โ โ The standard (IETF-bound)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ AVA Python Library (this repo) โ โ Reference implementation
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Presidio | AWS Macie โ โ โ Pluggable engines
โ โ | Azure PII | Custom โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Manifest Format
Every transformation produces an AVA Manifest โ a complete audit record:
{
"ava_version": "1.0",
"manifest_id": "ava-a1b2c3d4-001",
"timestamp": "2025-03-13T15:05:59Z",
"policy": {
"domain": "healthcare",
"strictness": "strict",
"reversibility": true
},
"entities": [
{
"type": "PERSON_NAME",
"value_hash": "sha256:7f83b...",
"position": [8, 16],
"confidence": 0.98,
"action": "pseudonymize",
"token": "AVA_PERS_7a3f9k2m"
}
]
}
๐ Pluggable Engines
Swap detection engines without changing your code:
| Engine | Installation | Best For |
|---|---|---|
| Presidio (default) | pip install ava-protocol[local] |
Self-hosted, free, customizable |
| AWS Macie | pip install ava-protocol[aws] |
Enterprise, cloud-native |
| Mock (built-in) | No install | Testing, CI/CD |
| Custom | Extend DetectionEngine |
Domain-specific needs |
๐ฆ Project Structure
ava-protocol/
โโโ src/ava/
โ โโโ __init__.py # Main exports
โ โโโ client.py # Client & GatewayClient
โ โโโ session.py # Transaction context
โ โโโ config.py # Configuration management
โ โโโ protocol/ # Core protocol types
โ โ โโโ manifest.py # AVA Manifest
โ โ โโโ entities.py # DetectedEntity
โ โ โโโ token_vault.py # Vault implementations
โ โโโ engines/ # Detection engines
โ โ โโโ base.py # Abstract interface
โ โ โโโ presidio.py # Presidio adapter
โ โโโ gateways/ # Remote gateway clients
โ โโโ http.py # REST client
โโโ tests/ # Test suite
โโโ pyproject.toml # Package config
โโโ README.md # This file
โโโ PUBLISH.md # PyPI release guide
๐งช Development
# Clone repo
git clone https://github.com/ava-protocol/ava-protocol.git
cd ava-protocol
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[all,dev]"
# Download Presidio models (if using local)
python -m spacy download en_core_web_lg
# Run tests
pytest
# Lint
black src/ava tests/
ruff check src/ava tests/
๐ก๏ธ Security Considerations
- Zero-Retention Mode: Tokens auto-expire (default: 1 hour)
- Vault Isolation: Session-scoped token storage
- Audit Trail: Every transformation logged in manifest
- Hash-Only Storage: Original values never in manifests (only tokens)
๐ License
MIT License โ see LICENSE
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐ Links
- Documentation: https://ava-protocol.readthedocs.io
- PyPI: https://pypi.org/project/ava-protocol/
- Repository: https://github.com/ava-protocol/ava-protocol
- Issues: https://github.com/ava-protocol/ava-protocol/issues
AVA: Making AI interactions private by default, visible by design.
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 ava_protocol-0.1.0.tar.gz.
File metadata
- Download URL: ava_protocol-0.1.0.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
182e9bfed3fe47d7a0f22912dfaff616002ffed360ea8ece626782e6e4877777
|
|
| MD5 |
73de7460cf2d1545d9b51ce1b3936881
|
|
| BLAKE2b-256 |
c4c70832c523f1c7c9c07415ef0ed17f187a83ba72fe7ad10ff64b1f06aa9af5
|
File details
Details for the file ava_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ava_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4892b85e091fc7e4f417c2c5f5b98f14c16af90358cdaebdaa5a0607c3dea442
|
|
| MD5 |
03b8e9de3564417bbe850cdb283efd0b
|
|
| BLAKE2b-256 |
97cb016704efe9899ffd0856d05f6086df4c8975416fa26d58000372bfa446d0
|