Build secure entry points for AI agents to interact with other agents while protecting sensitive data. Enable agentic payments, information flow, and compliant data sharing with PrivacyPal's Privacy Twin technology.
import { PrivacyPalClient } from '@privacypal/sdk'; const client = new PrivacyPalClient({ apiUrl: 'https://api.privacypal.ai', apiKey: process.env.PRIVACYPAL_API_KEY }); // Encode sensitive data — PII replaced with Privacy Twins const encoded = await client.encode({ data: 'Patient: Jane Doe, DOB: 1985-03-15', sourceContainer: 'my-app', sourceElement: 'patient-record' }); // Safe to send to AI — real data stays protected await sendToAI(encoded.encodedData);
from privacypal_sdk import PrivacyPalClient import os client = PrivacyPalClient( api_url='https://api.privacypal.ai', api_key=os.environ['PRIVACYPAL_API_KEY'] ) # Encode sensitive data — PII replaced with Privacy Twins encoded = client.encode( 'Patient: Jane Doe, DOB: 1985-03-15', source_container='my-app', source_element='patient-record' ) # Safe to send to AI — real data stays protected send_to_ai(encoded['encodedData'])
npm install @privacypal/sdk
pip install privacypal-sdk
Add to your project with npm or pip
Sign up for PrivacyPal Cloud access
Encode PII and build privacy-safe AI apps
Built for production workloads. Scale with confidence.
Build secure agent entry points, enable agentic payments, and control information flow between AI agents
Create secure entry points for your agents to interact with other agents. Control sensitive data flow while enabling agent-to-agent transactions and information sharing.
Coming soon: Enable agentic payments with x402 protocol. Agents will be able to request payment before sharing sensitive data, creating win-win economies for agent-to-agent transactions.
Meet HIPAA, GDPR, and SOC 2 requirements out of the box. Automated PII detection and anonymization for all major data types.
Deploy on your infrastructure with PrivacyPal Cloud. Complete control over sensitive data with data sovereignty guarantees.
Control how sensitive data flows between agents. Your agent maintains responsibility for data protection while enabling necessary information sharing for workflows.
DSPM capabilities to discover and classify sensitive data in your internal databases, ensuring comprehensive data governance.
Build secure agent entry points and enable compliant information flow between AI agents
Encode sensitive data before sharing with other agents, then decode results back to original values
import { PrivacyPalClient } from '@privacypal/sdk'; const client = new PrivacyPalClient({ apiUrl: 'https://api.privacypal.ai', apiKey: process.env.PRIVACYPAL_API_KEY }); // Encode sensitive input — PII replaced with Privacy Twins const encoded = await client.encode({ data: 'User: John Smith, Email: john@acme.com, ID: user-123', sourceContainer: 'my-agent', sourceElement: 'user_input' }); // Share encoded data with external agent — real values protected const response = await sendToExternalAgent(encoded.encodedData); // Decode the response back to original values const decoded = await client.decode({ continuationId: encoded.continuationId, data: response.text }); console.log(decoded.decodedData); // Real values restored
from privacypal_sdk import PrivacyPalClient import os client = PrivacyPalClient( api_url='https://api.privacypal.ai', api_key=os.environ['PRIVACYPAL_API_KEY'] ) # Encode sensitive input — PII replaced with Privacy Twins encoded = client.encode( 'User: John Smith, Email: john@acme.com, ID: user-123', source_container='my-agent', source_element='user_input' ) # Share encoded data with external agent — real values protected response = send_to_external_agent(encoded['encodedData']) # Decode the response back to original values decoded = client.decode( continuation_id=encoded['continuationId'], data=response['text'] ) print(decoded['decodedData']) # Real values restored
Encode PHI before sending to vendor APIs, then decode the response — HIPAA compliant by design
import { PrivacyPalClient } from '@privacypal/sdk'; const privacypal = new PrivacyPalClient({ apiUrl: 'https://api.privacypal.ai', apiKey: process.env.PRIVACYPAL_API_KEY }); // Encode patient record — PHI replaced with Privacy Twins const encoded = await privacypal.encode({ data: 'Patient: Jane Doe, DOB: 1985-03-15, Dx: Condition X', sourceContainer: 'ehr-system', sourceElement: 'patient-record' }); // Send Privacy Twin to vendor API — no real PHI exposed const analysis = await fetch('https://vendor-api.com/analyze', { method: 'POST', body: JSON.stringify({ data: encoded.encodedData }) }); // Decode vendor response — restore real patient values const result = await privacypal.decode({ continuationId: encoded.continuationId, data: (await analysis.json()).report }); // HIPAA compliant ✅
from privacypal_sdk import PrivacyPalClient import os, requests privacypal = PrivacyPalClient( api_url='https://api.privacypal.ai', api_key=os.environ['PRIVACYPAL_API_KEY'] ) # Encode patient record — PHI replaced with Privacy Twins encoded = privacypal.encode( 'Patient: Jane Doe, DOB: 1985-03-15, Dx: Condition X', source_container='ehr-system', source_element='patient-record' ) # Send Privacy Twin to vendor API — no real PHI exposed response = requests.post( 'https://vendor-api.com/analyze', json={'data': encoded['encodedData']} ) # Decode vendor response — restore real patient values result = privacypal.decode( continuation_id=encoded['continuationId'], data=response.json()['report'] ) # HIPAA compliant ✅
Encode trade info to protect trader identity, match via Privacy Twins, then decode only after payment (future x402 integration)
import { PrivacyPalClient } from '@privacypal/sdk'; // Future: import { x402Middleware } from '@x402/payment'; const privacypal = new PrivacyPalClient({ apiUrl: 'https://api.privacypal.ai', apiKey: process.env.PRIVACYPAL_API_KEY }); // Encode trade info — trader identity and strategy protected const encoded = await privacypal.encode({ data: 'Trader: trader-789, Symbol: AAPL, Qty: 1000', sourceContainer: 'dark-pool', sourceElement: 'trade-request' }); // Share Privacy Twin — real identity hidden const match = await findCounterparty(encoded.encodedData); if (match.found) { // Future: x402 payment required before decode const realData = await privacypal.decode({ continuationId: encoded.continuationId, data: match.counterpartyData }); return realData.decodedData; // Real counterparty info }
from privacypal_sdk import PrivacyPalClient import os # Future: from x402 import middleware privacypal = PrivacyPalClient( api_url='https://api.privacypal.ai', api_key=os.environ['PRIVACYPAL_API_KEY'] ) # Encode trade info — trader identity and strategy protected encoded = privacypal.encode( 'Trader: trader-789, Symbol: AAPL, Qty: 1000', source_container='dark-pool', source_element='trade-request' ) # Share Privacy Twin — real identity hidden match = find_counterparty(encoded['encodedData']) if match['found']: # Future: x402 payment required before decode real_data = privacypal.decode( continuation_id=encoded['continuationId'], data=match['counterpartyData'] ) return real_data['decodedData'] # Real counterparty info