Agent-to-Agent
Workflows

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.

Node.js
Python
PrivacyPal Cloud
stream-example.js
import { PrivacyPalClient } from 'privacypal-sdk';

const client = new PrivacyPalClient({
  apiKey: 'your-api-key',
  mode: 'streaming'
});

// Create secure entry point for agent-to-agent communication
const agentEndpoint = await client.createAgentEndpoint({
  sensitiveData: agentPayload,
  encoding: 'two-way'
});

// Safe to share with other agents - real data stays protected
await sendToAgent(agentEndpoint.protected);
Get Started

Quick Installation

Get up and running with PrivacyPal SDK in seconds

Install via npm

npm install privacypal-sdk
1

Install SDK

Add to your project with npm or yarn

2

Get API Key

Sign up for PrivacyPal Cloud access

3

Start Streaming

Create privacy-safe data streams

Performance

Lightning-Fast Streaming

Built for production workloads. Scale with confidence.

0.10ms
Latency per 100 Records
Near-instant data anonymization for real-time applications
0
Data Limits
Process unlimited data volumes without throttling
1-way & 2-way
Encoding Options
One-way anonymization or two-way secure data encoding
SDK Features

Agent-to-Agent Infrastructure

Build secure agent entry points, enable agentic payments, and control information flow between AI agents

Agent Entry Points

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.

x402 Payment Integration Future Release

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.

Compliance by Default

Meet HIPAA, GDPR, and SOC 2 requirements out of the box. Automated PII detection and anonymization for all major data types.

Self-Hosted Option

Deploy on your infrastructure with PrivacyPal Cloud. Complete control over sensitive data with data sovereignty guarantees.

Protected Information Flow

Control how sensitive data flows between agents. Your agent maintains responsibility for data protection while enabling necessary information sharing for workflows.

Database Scanning

DSPM capabilities to discover and classify sensitive data in your internal databases, ensuring comprehensive data governance.

Use Cases

Agent-to-Agent Workflows

Build secure agent entry points and enable compliant information flow between AI agents

Agent Entry Point for Secure A2A Communication

Create a protected entry point for your agent to interact with other agents while controlling sensitive data flow

agent-entry-point.js
import { PrivacyPalClient } from 'privacypal-sdk';

const client = new PrivacyPalClient({
  apiKey: process.env.PRIVACYPAL_API_KEY
});

// Your agent receives sensitive data it's responsible for
const agentData = {
  userId: 'user-123',
  sensitiveInfo: 'confidential-data',
  metadata: { source: 'internal' }
};

// Create protected entry point before sharing with other agents
const protectedEndpoint = await client.createAgentEndpoint({
  data: agentData,
  encoding: 'two-way',
  accessControl: { requirePayment: true }
});

// Share Privacy Twin with other agents - real data stays protected
await sendToExternalAgent(protectedEndpoint.anonymized);
// Your agent maintains control over sensitive data

Healthcare AI: Patient Data to 3rd Party Analysis

Enable healthcare AI agents to send patient data to vendor APIs and agents for analysis while maintaining HIPAA compliance

healthcare-agent.js
import { PrivacyPalClient } from 'privacypal-sdk';

const privacypal = new PrivacyPalClient({
  apiKey: process.env.PRIVACYPAL_API_KEY,
  encoding: 'two-way'
});

// Healthcare agent receives patient data
const patientRecord = {
  patientId: 'P-12345',
  name: 'Jane Doe',
  dob: '1985-03-15',
  diagnosis: 'Condition X',
  labResults: ['result1', 'result2']
};

// Protect patient data before sending to 3rd party vendor agent
const protected = await privacypal.createStream(patientRecord);

// Send Privacy Twin to vendor's analysis API/agent
const analysis = await fetch('https://vendor-api.com/analyze', {
  method: 'POST',
  body: JSON.stringify(protected.anonymized)
});

// Vendor agent processes Privacy Twin - no real PHI exposed
// HIPAA compliant ✅

Financial Services: Decentralized Dark Pool x402 Coming Soon

Best trade match bot protects trade information and trader identity. Future: Only shares real counterparty data after successful x402 payment request

dark-pool-agent.js
import { PrivacyPalClient } from 'privacypal-sdk';
// Future: import { x402Middleware } from '@x402/payment';

const privacypal = new PrivacyPalClient({
  apiKey: process.env.PRIVACYPAL_API_KEY
});

// Best trade match agent receives trade request
const tradeRequest = {
  traderId: 'trader-789',
  tradeDetails: { symbol: 'AAPL', quantity: 1000 },
  sensitiveInfo: 'confidential-strategy'
};

// Protect trade info with Privacy Twin
const protectedTrade = await privacypal.createStream(tradeRequest);

// Match agent shares Privacy Twin (no real data) to find counterparty
const match = await findCounterparty(protectedTrade.anonymized);

// Future: Counterparty agent receives 402: Payment Required via x402
if (match.found) {
  // Future: After successful x402 payment, reveal real counterparty info
  // await x402Middleware({
  //   'GET /counterparty': {
  //     accepts: ['usdc', 'eth'],
  //     description: 'Counterparty trade information'
  //   }
  // });
  
  // Only after payment: decode and share real data
  const realData = await privacypal.decode(protectedTrade);
  return realData; // Real counterparty info shared
}