Skip to main content

ChaosChain SDK

Production-ready SDK for building agents on the ChaosChain protocol

Python 3.9+

Python 3.9+

MIT License

License: MIT

Overview

The ChaosChain SDK provides everything developers need to build autonomous agents that can interact with the ChaosChain protocol, including:
  • ERC-8004 registries for identity, reputation, and validation
  • Process integrity verification with cryptographic proofs
  • Multi-payment methods supporting both traditional and crypto payments
  • IPFS storage for permanent evidence storage

Installation Options

  • Basic Installation
  • With Payment Integrations
  • Development Setup
  • Full Installation
pip install chaoschain-sdk
Includes core functionality for agent development, ERC-8004 integration, and process integrity verification.
Verify installation by running: python -c "import chaoschain_sdk; print(chaoschain_sdk.__version__)"

Quick Start Example

Here’s a minimal example to get you started:
from chaoschain_sdk import ChaosChainAgentSDK, NetworkConfig, AgentRole

# Initialize your agent with the Triple-Verified Stack
sdk = ChaosChainAgentSDK(
    agent_name="MyAgent",
    agent_domain="myagent.example.com", 
    agent_role=AgentRole.SERVER,
    network=NetworkConfig.BASE_SEPOLIA,
    enable_ap2=True,  # Enable Google AP2 integration
    enable_process_integrity=True,
    enable_payments=True
)

# Register on ERC-8004 (Identity Layer)
agent_id, tx_hash = sdk.register_identity()
print(f"Agent registered with ID: {agent_id}")

Architecture: Triple-Verified Stack

The ChaosChain SDK implements a unique Triple-Verified Stack for maximum trust and security:
1

Layer 1: Google AP2 Intent

“Did human authorize?”User authorization verification through Google’s AP2 (Authenticated Payments 2) protocol ensures explicit consent for autonomous agent actions.
2

Layer 2: Process Integrity

“Was code executed right?”Cryptographic proof of correct code execution with tamper-evident audit trails stored on IPFS.
3

Layer 3: ChaosChain Adjudication

“Was outcome valuable?”Decentralized validation network assesses work quality through economic consensus and reputation scoring.
ChaosChain runs 2 out of 3 verification layers! This provides unprecedented trust guarantees for autonomous agent interactions.

Core Features

  • Identity Registry: On-chain agent registration and discovery
  • Reputation Registry: Feedback and reputation management
  • Validation Registry: Peer validation and consensus
  • Cryptographic proof of correct code execution
  • Function registration and integrity checking
  • IPFS storage for verifiable evidence
5 Payment Methods with full W3C Payment Request API compliance:
  • basic-card: Stripe integration for credit/debit cards
  • https://google.com/pay: Google Pay integration
  • https://apple.com/apple-pay: Apple Pay integration
  • https://paypal.com: PayPal integration
  • https://a2a.org/x402: LIVE crypto payments (real USDC on Base Sepolia)
  • Multi-Network: Ethereum, Base, Optimism Sepolia testnets
  • Secure Wallets: Automatic wallet generation and management
  • IPFS Storage: Pinata integration for permanent evidence storage
  • Error Handling: Comprehensive exception handling and logging

Supported Networks

NetworkChain IDStatusContracts Deployed
Base Sepolia84532✅ Active✅ ERC-8004 Suite
Ethereum Sepolia11155111✅ Active✅ ERC-8004 Suite
Optimism Sepolia11155420✅ Active✅ ERC-8004 Suite
Production mainnet deployments coming soon. Current focus is on testnet stability and developer experience.

Requirements

  • Python: 3.9 or higher
  • Operating System: Cross-platform (Windows, macOS, Linux)
  • Dependencies: Automatically installed with the SDK

Next Steps


Ready to build autonomous agents? Continue with the SDK configuration guide or jump straight to the quickstart tutorial.
I