Please visit our technical documentation for more details
agent-runtime
- Core agent execution environment with ZK proof generationregistry-api
- Agent discovery and verification API servicefrontend
- User interface for agent interaction and management
circuits
- Zero-knowledge proof circuits for quality and compliancepayment-layer
- Micropayment infrastructure with revenue splittingcontracts
- Smart contracts for agent registry and proof inheritance
- Dependency caching across all packages and apps
- Parallel builds with smart dependency resolution
- Hot reload development environment
- Production-optimized Docker builds
- Individual service manifests for each component
- Auto-scaling configurations based on demand
- Resource limits and requests optimization
- Health checks and readiness probes
- Multi-stage builds for minimal image sizes
- Security scanning and vulnerability patches
- Optimized for decentralized compute environments
- Persistent volume configurations
- Trusted execution environment setup
- Secure key management and attestation
- Privacy-preserving agent execution
- Hardware-based security guarantees
- Cost-optimized compute configurations
- Dynamic scaling based on usage patterns
- Network bandwidth optimization
- Storage allocation strategies
- Agent Metadata: Stored on IPFS with Pinata pinning service
- ZK Proofs: Distributed storage for proof artifacts and circuits
- Proof Inheritance: IPFS-based linking for composable proof chains
- Content Addressing: Immutable references via IPFS hashes
// IPFS client setup with Pinata
const pinataConfig = {
pinataApiKey: process.env.PINATA_API_KEY,
pinataSecretApiKey: process.env.PINATA_SECRET_KEY,
pinataJWT: process.env.PINATA_JWT
}
// Agent registration on IPFS
const agentMetadata = {
id: agentId,
name: "AI Agent",
proofHash: zkProofHash,
inheritanceChain: [parentProofHash1, parentProofHash2],
verificationLevel: 3,
creator: creatorAddress
}
const ipfsHash = await pinata.pinJSONToIPFS(agentMetadata)
Features:
- Express.js server
- ZK proof generation pipeline
- Payment verification via x402pay
- Revenue splitting with CDP Wallet
- SGX-enabled secure execution environment
- Real-time agent monitoring and logging
Features:
- Next.js API for agent discovery
- IPFS with Pinata for decentralized storage
- On-chain verification integration
- Composable proof inheritance tracking
- Agent reputation and quality scoring
- Distributed search and indexing capabilities
Features:
- Quality, ethics, and compliance circuits
- Groth16 proof generation with snarkjs
- Privacy-preserving verification system
- Composable proof inheritance
- Batch verification optimization
- Circuit parameter generation
Features:
- x402pay micropayment integration
- CDP Wallet programmable revenue splits
- Automated gas estimation and optimization
- Multi-token payment support
- Escrow and dispute resolution
- Real-time payment tracking
Features:
- Agent registry with proof inheritance
- Royalty system for proof creators
- Verification level tracking
- Composable agent architecture
- On-chain governance mechanisms
- Upgrade-safe contract design
The x402pay integration provides seamless micropayments for AI agent services powered by Amazon Nova foundation models, without requiring user accounts or traditional payment processing.
Core Components:
- Payment Channels: Lightning Network-style channels for instant AI inference payments
- Revenue Splitting: Automated distribution via CDP Wallet programmable splits
- Model Usage Billing: Per-token pricing for Amazon Nova model inference
// Revenue splitting configuration for AI agents
const revenueConfig = {
agentCreator: 40, // 40% to agent creator
proofProvider: 30, // 30% to proof inheritance chain
platform: 20, // 20% to platform maintenance
validators: 10 // 10% to proof validators
}
// Automated split execution after AI inference
await cdpWallet.executeSplit({
amount: inferencePayment,
recipients: calculateRecipients(revenueConfig),
trigger: 'bedrock_inference_complete'
})
- Nova Micro: Fastest model for real-time agent responses
- Nova Lite: Balanced performance for general agent tasks
- Nova Pro: Advanced reasoning for complex agent workflows
- Multimodal Capabilities: Vision and text processing for comprehensive agents
AI-Powered Payment Flow:
- User initiates agent request with x402pay micropayment
- Payment covers estimated Amazon Nova model inference costs
- Agent processes request using Amazon Bedrock with Nova models
- Token usage tracked and billed in real-time
- Upon completion, payment split via CDP Wallet to all contributors
- ZK proofs generated to verify quality and compliance
// x402pay payment for AI inference
const paymentChannel = await x402pay.createChannel({
amount: estimatedInferenceCost,
recipient: agentWallet,
metadata: {
agentId: selectedAgent.id,
modelType: 'amazon.nova-pro-v1:0',
maxTokens: 4000,
inheritanceChain: proofInheritanceIds
}
})
// Amazon Bedrock Nova inference with payment tracking
const bedrockResponse = await bedrock.invokeModel({
modelId: 'amazon.nova-pro-v1:0',
body: JSON.stringify({
messages: agentPrompt,
max_tokens: paymentChannel.maxTokens,
temperature: 0.7
}),
paymentChannelId: paymentChannel.id
})
// Automatic revenue split after inference
await processInferencePayment(bedrockResponse.usage, paymentChannel)
This integration ensures that AI agent creators are compensated for their Nova-powered agents, proof inheritance creators receive royalties, and the entire system operates with seamless micropayments tied directly to Amazon Bedrock inference costs.
// Store agent data on IPFS
const storeAgentOnIPFS = async (agentData) => {
const metadata = {
...agentData,
timestamp: Date.now(),
ipfsVersion: "1.0"
}
const result = await pinata.pinJSONToIPFS(metadata, {
pinataMetadata: {
name: `agent-${agentData.id}`,
keyvalues: {
type: 'agent_registry',
verification_level: agentData.verificationLevel
}
}
})
return result.IpfsHash
}
// Retrieve agent data from IPFS
const getAgentFromIPFS = async (ipfsHash) => {
const response = await fetch(`https://gateway.pinata.cloud/ipfs/${ipfsHash}`)
return response.json()
}
// Update smart contract with IPFS reference
const registerAgent = async (agentId, ipfsHash) => {
await agentRegistry.registerAgent(agentId, ipfsHash, {
gasLimit: 500000
})
}
This IPFS integration ensures that agent data is stored in a decentralized manner while maintaining fast access through Pinata's pinning service. The smart contracts only store IPFS hashes, keeping on-chain storage costs minimal while preserving immutability and censorship resistance.
- Agents can inherit proofs from each other while maintaining privacy through zero-knowledge verification
- Payment layer handles microtransactions seamlessly without requiring user accounts
- SGX ensures secure execution in untrusted environments
- Akash Network provides decentralized compute infrastructure
- CDP Wallet enables programmable revenue distribution
- Amazon Nova integration optimizes compute costs and performance
Each component can be deployed independently on Akash Network, creating a resilient and scalable decentralized agent platform that incentivizes quality through economic mechanisms and cryptographic proofs.