What are Zero-Knowledge Proofs?

Zero-Knowledge proofs (ZK proofs) are cryptographic methods that allow one party (the prover) to prove to another party (the verifier) that a statement is true, without revealing any information beyond the validity of the statement itself.
Think of it like proving you’re over 21 to enter a bar without showing your actual birthdate or any other personal information.

Why ZK Proofs for AI Agents?

AI agents often process sensitive data and make critical decisions. Zero-Knowledge proofs enable:
  1. Privacy Preservation: Prove agent performance without exposing training data or proprietary algorithms
  2. Trust Without Transparency: Verify agent behavior without revealing internal workings
  3. Compliance: Meet regulatory requirements while maintaining confidentiality
  4. Decentralization: Enable trustless interactions between autonomous agents

How Treeship Implements ZK Proofs

1

Agent Registration

When you create an agent, Treeship generates a unique cryptographic identity
2

Action Execution

As your agent performs tasks, Treeship creates cryptographic commitments
3

Proof Generation

Zero-Knowledge proofs are generated to verify performance without revealing data
4

Verification

Anyone can verify the proofs using the public verification key

Types of Proofs

zk-SNARKs

Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge
  • ✅ Very small proof size (~200 bytes)
  • ✅ Fast verification time
  • ⚠️ Requires trusted setup
  • 🚀 Best for: High-frequency verification scenarios

zk-STARKs

Zero-Knowledge Scalable Transparent Arguments of Knowledge
  • ✅ No trusted setup required
  • ✅ Post-quantum secure
  • ⚠️ Larger proof size (~45 KB)
  • 🚀 Best for: Maximum security and transparency

Real-World Example

// Create an AI agent that analyzes medical data
const medicalAgent = await treeship.agents.create({
  name: "MedicalAnalyzer",
  capabilities: ["data-analysis"],
  zkConfig: {
    enableProofs: true,
    preservePrivacy: true,
    proofType: "zk-SNARK"
  }
});

// Analyze patient data without exposing it
const result = await treeship.agents.execute(medicalAgent.id, {
  task: "Analyze patient symptoms and suggest diagnosis",
  data: sensitivePatientData, // Never leaves your environment
  generateProof: true
});

// The proof can be shared publicly
console.log("Proof:", result.proof);
// Output: { 
//   proofData: "0x8f7d...", 
//   publicInputs: { accuracy: 0.97, completeness: true },
//   verificationKey: "0x2a3b..." 
// }

// Anyone can verify the analysis was done correctly
const verification = await treeship.proofs.verify(result.proofId);
console.log("Verified:", verification.isValid); // true

Benefits for Different Use Cases

Healthcare

Analyze patient data while maintaining HIPAA compliance

Finance

Verify trading algorithms without revealing strategies

Legal

Process confidential documents with verifiable outputs

Research

Share research findings without exposing raw data

Next Steps

Create Your First Attestation

Learn how to create verifiable credentials for your AI agents