Skip to main content

Agent Privacy-Preserving Protocol - AP3

Project description

AP3 - Agent Privacy-Preserving Protocol

AP3 is a protocol for privacy-preserving computation between autonomous agents

What is AP3?

AP3 is designed to solve a critical challenge in the emerging agentic economy:
How can AI agents collaborate on sensitive computations while maintaining data confidentiality and competitive advantage?

Traditional agent communication requires data sharing, which creates risks:

  • Competitive Intelligence Leakage: Proprietary algorithms, cost structures, and business strategies could be exposed
  • Regulatory Compliance Issues: Data sharing may violate privacy regulations like GDPR and CCPA
  • Trust Barriers: Parties are reluctant to collaborate without cryptographic privacy guarantees

AP3 addresses these challenges by providing a standardized framework for privacy-preserving computation using advanced cryptographic techniques.

As the agentic economy grows, AP3 will become essential infrastructure for trusted, privacy-preserving computation between autonomous agents, enabling a new generation of collaborative AI applications that respect data sovereignty and competitive advantage.

Examples

Example Framework Description
psi Google ADK Private Set Intersection for sanctions screening

See examples/psi/README.md for full setup, Docker, and UI instructions.

View Documentation

Install the docs dependencies and run mkdocs serve to view the documentation locally:

uv sync
uv pip install -r requirements-docs.txt
uv run mkdocs serve

Build the static site into site/:

uv run mkdocs build --clean

AP3 SDK

Key Docs:

Features

  • Private Set Intersection (PSI) - Check memberships without revealing sets
  • Commitment System - Cryptographic data commitments
  • Agent Integration - Works with Google ADK, A2A protocol
  • Experimental proof fields - Result directives include placeholder OperationProofs fields for wiring/testing only (not cryptographic proofs yet)

Installation

Requires Python 3.11+.

uv sync && source .venv/bin/activate

Usage

Private Set Intersection

Note: PSI calls a native binary (libsanction_check_lib) bundled in packages/ap3-functions/ap3_functions/psi/binaries/. macOS (.dylib) and Linux (.so) are supported natively.

from ap3_functions import PSIOperation

initiator = PSIOperation()
receiver = PSIOperation()

sanction_list = ["Jane Smith,S001,456 Elm St", "Bob Brown,S002,789 Oak Ave"]

# Initiator starts the protocol
init_result = initiator.start(role="initiator", inputs={"customer_data": "John Doe,ID123,123 Main St"})
session_id = init_result["session_id"]

# Receiver processes msg1 against its sanction list
recv_result = receiver.receive(
    role="receiver",
    message=init_result["outgoing"],
    config={"sanction_list": sanction_list},
)

# Initiator processes msg2 and gets the result
final = initiator.process(session_id, recv_result["outgoing"])
is_match = final["result"]["is_match"]

🏗️ Architecture

ap3/
├── src/ap3/                          # Core SDK (publishes as `ap3`)
│   ├── types/                        # Pydantic models
│   ├── services/                     # Commitment & discovery services
│   ├── integrations/                 # LangChain, Google ADK adapters
│   └── crypto/                       # Cryptographic primitives
├── packages/
│   └── ap3-functions/                # Distribution: `ap3-functions`, import: `ap3_functions`
│       └── ap3_functions/            # Protocol implementations (FFI to Rust)
│           └── psi/                  # Private Set Intersection
└── examples/                         # Example agents
    └── psi_adk_simple/               # PSI sanctions screening with Google ADK

License

Licensed under the Apache License, Version 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ap3-1.0.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ap3-1.0.0-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file ap3-1.0.0.tar.gz.

File metadata

  • Download URL: ap3-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for ap3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0681d7bd6e1b9586bb15214b79924a0c23949042421d3b7aa9926c13fd1cf462
MD5 25164e05def3cd9bc4e4dcc5fc45c9d4
BLAKE2b-256 acac6f92c16173e3bdacaca6b27d2c0516ca6cdfb3e531767676435b00a30096

See more details on using hashes here.

File details

Details for the file ap3-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ap3-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 74.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.18

File hashes

Hashes for ap3-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15dc723d60b1aa4d2bf57f70371c1a43f58b971ab9c462acab1b031b0f05daf2
MD5 4f6c175d751880bbe7974c59abbe6105
BLAKE2b-256 98e905d1289672d6152af4f2fd2bd9d4465dd57050587ce9100297312f13b8e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page