Enterprise AI privacy middleware — reversible PII anonymization.
Project description
[!IMPORTANT] Membrane Enterprise
The open-source SDK is built for developers and rapid prototyping. For production deployments in highly-regulated environments requiring SOC2 compliance, AWS KMS / HashiCorp Vault integrations, centralized RBAC, and immutable Audit Logging, explore our Enterprise tier.
Request Enterprise Demo
Installation
pip install membrane-ai
Quick Start
Membrane intercepts your prompt, deterministically masks the PII locally, and seamlessly restores it from the LLM's response. It is specifically built to handle LLM paraphrasing.
from membrane import TrustLayer
layer = TrustLayer(provider="openai", api_key="sk-...")
# Membrane strips the PII, queries the LLM, and rehydrates the result automatically.
response = layer.call("My SSN is 123-45-6789. Send the report to john@example.com.")
print(response["final_response"])
Features Breakdown
| Capability | Open Source (Free) | Enterprise |
|---|---|---|
| Core Anonymization | Regex & Presidio NLP | Advanced Custom NER Models |
| Provider Support | OpenAI, Anthropic, Gemini, Ollama | Bring-Your-Own-Model (VPC) |
| Key Management | Environment Variables | AWS KMS, Azure KeyVault, HashiCorp Vault |
| Audit Logging | Local File-based | Datadog, Splunk, Immutable S3 Export |
| Access Control | N/A | Granular RBAC, SSO/SAML |
| Scaling & State | In-Memory (Single Node) | Distributed Redis Architecture |
Why Membrane?
- Zero Trust Security: Sensitive data never leaves your infrastructure. Masking happens entirely locally before the outbound network request to external APIs (OpenAI/Anthropic) is even constructed.
- Near-Zero Latency: Built for high-throughput streaming environments and rigorous production traffic without adding computational overhead.
- Deterministic Context Preservation: We don't just crudely mask data; we maintain contextual entity trackers. Even when an LLM radically paraphrases a response, we still resolve the identity deterministically and mathematically.
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 membrane_ai-3.1.7.tar.gz.
File metadata
- Download URL: membrane_ai-3.1.7.tar.gz
- Upload date:
- Size: 28.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
235287c32185e127fafa13252472f0d724267752ac00ec86212b5a2303645ebd
|
|
| MD5 |
c0ad4784b2109eff6dc632e817356794
|
|
| BLAKE2b-256 |
0f9c312157088fa22d470ec24f75c94d4159f6b424dec912f2c2364b7b3ce848
|
File details
Details for the file membrane_ai-3.1.7-py3-none-any.whl.
File metadata
- Download URL: membrane_ai-3.1.7-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7606559395dee4b5e7b5e8a0c55f7d2808c20b2875783555b6f6311c465bfb2
|
|
| MD5 |
068d6352b8baa90e0301ca525017b76c
|
|
| BLAKE2b-256 |
597070b8a53933bfb81444626e5cb0cdaa215c58335166a018dd5fa6d6bda207
|