"Know Your Agent" - The first trustless identity, reputation, and authorization protocol for autonomous AI agents on Solana
Agnic Trust is a comprehensive protocol that enables trustless autonomous AI agents through:
- 🆔 W3C Standards-Based Identity - Decentralized Identifiers (DIDs) & Verifiable Credentials
- ⭐ On-Chain Reputation System - Cryptographic attestations with multi-factor scoring
- 🔐 Capability Authorization - Fine-grained permissions and access control
- 💰 X402 Payment Integration - Identity-aware autonomous payments with reputation-based pricing
- ⚡ Solana-Native - Sub-second finality, ultra-low transaction costs
Built for the Solana X402 Hackathon - Best Trustless Agent Category
- W3C DID Core 1.0 compliant identifiers
- Hierarchical identity relationships (Developer → Agent → Task)
- Verifiable Credentials for authorization
- On-chain credential revocation
- Multi-component scoring (0-1000 points)
- Real-time on-chain attestations
- Reputation-based tier pricing (Bronze → Platinum)
- Slashable stakes for accountability
- Automated payment flow with identity verification
- Reputation-based dynamic pricing discounts
- Trustless facilitator attestation
- Complete transaction transparency
┌─────────────────────────────────────────────────────────────┐
│ Agnic Trust Protocol │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Agent │ │ Reputation │ │ Revocation │ │
│ │ Registry │ │ Oracle │ │ Registry │ │
│ │ Program │ │ Program │ │ Program │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ └──────────────────┴──────────────────┘ │
│ │ │
│ Solana Blockchain │
│ │
└─────────────────────────────────────────────────────────────┘
│
┌──────────────┴──────────────┐
│ │
┌───────▼────────┐ ┌──────────▼─────────┐
│ TypeScript │ │ X402 Payment │
│ SDK │ │ Integration │
└────────────────┘ └────────────────────┘
Score Formula (0-1000):
- Task Completion Rate: 40% (400 points)
- Payment Reliability: 20% (200 points)
- Service Ratings: 20% (200 points)
- Time in Operation: 10% (100 points)
- Economic Stake: 10% (100 points)
Tier Benefits:
- 🥉 Bronze (0-299): Standard pricing
- 🥈 Silver (300-599): 25% discount
- 🥇 Gold (600-849): 50% discount
- 💎 Platinum (850-1000): 75% discount
Ensure you have the following installed:
# Install Rust (required for Solana programs)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
# Install Anchor (Solana smart contract framework)
cargo install --git https://github.com/coral-xyz/anchor avm --locked --force
avm install 0.30.1
avm use 0.30.1
# Install Node.js (v18+)
# Visit https://nodejs.org/ or use nvm# Clone the repository
git clone https://github.com/yourusername/agnic-trust.git
cd agnic-trust
# Install dependencies
npm install# Build all Solana programs
anchor build
# Deploy to Solana devnet
anchor deploy --provider.cluster devnet
# Run tests
npm testagnic-trust/
├── programs/ # Solana programs (Rust/Anchor)
│ ├── agent-registry/ # DID creation and management
│ ├── reputation-oracle/ # Reputation scoring
│ └── revocation-registry/ # Credential revocation
├── packages/ # TypeScript packages
│ ├── sdk/ # Main SDK
│ ├── types/ # Shared types
│ ├── crypto/ # Crypto utilities
│ └── x402-integration/ # X402 protocol integration
├── apps/ # Applications
│ └── docs/ # Documentation
├── demo/ # Demo application
└── demo-x402/ # X402 integration demo
import { AgnicTrustClient } from '@agnic-trust/sdk';
import { Connection, Keypair } from '@solana/web3.js';
// Initialize client
const connection = new Connection('https://api.devnet.solana.com');
const wallet = Keypair.generate();
const client = new AgnicTrustClient({
connection,
wallet,
network: 'devnet',
});
// Create agent DID
const did = await client.did.createDID({
verificationMethods: [
{
publicKey: wallet.publicKey,
purpose: 'Authentication',
keyId: 'key-1',
},
],
});
console.log('Agent DID:', did.id);
// Initialize reputation
await client.reputation.initialize(did.id);
// Submit task attestation
await client.reputation.submitTaskAttestation({
agentDID: did.id,
taskId: 'task-001',
success: true,
});
// Check reputation score
const reputation = await client.reputation.getReputation(did.id);
console.log('Score:', reputation.score);
console.log('Tier:', reputation.tier);import { X402Client } from '@agnic-trust/x402-integration';
// Initialize X402 client with identity
const x402 = new X402Client({
agnicClient: client,
agentDID: agentDID.id,
});
// Make authenticated API call with auto-payment
const response = await x402.get('https://api.example.com/premium-data', {
includeIdentity: true, // Include agent DID and reputation
autoPay: true, // Automatically pay if 402 received
});
// Response includes reputation-based discount
if (response.payment) {
console.log('Original price:', response.payment.baseAmount);
console.log('Your price:', response.payment.discountedAmount);
console.log('Discount:', response.payment.discount * 100, '%');
console.log('Tier:', response.payment.tier);
}# Run all tests
npm test
# Test Solana programs
anchor test
# Test SDK packages
npm test --workspace=@agnic-trust/sdk
# Run integration tests
npm run test:integration-
Decentralized Identifiers (DIDs)
- W3C DID Core 1.0 compliant
- Method:
did:agnic:<solana-pubkey> - Hierarchical identity relationships
-
Verifiable Credentials (VCs)
- W3C VC Data Model 2.0 compliant
- On-chain revocation registry
- Cryptographic verification
-
Reputation System
- Multi-component scoring algorithm
- Real-time on-chain attestations
- Economic stake mechanisms
-
X402 Integration
- Identity-aware HTTP 402 payments
- Reputation-based dynamic pricing
- Trustless payment verification
We welcome contributions from the community! Please see CONTRIBUTING.md for guidelines.
# Fork the repository and clone it
git clone https://github.com/yourusername/agnic-trust.git
cd agnic-trust
# Create a feature branch
git checkout -b feature/your-feature-name
# Make your changes and test
npm test
npm run lint
# Commit with conventional commits
git commit -m "feat: add your feature"
# Push and create a pull request
git push origin feature/your-feature-nameHackathon Requirements:
- ✅ Autonomous agents with decentralized identity
- ✅ Reputation and validation systems
- ✅ X402 payment protocol integration
- ✅ Trustless architecture
Agnic Trust Delivers:
- ✅ W3C standards-based identity (DID + VC)
- ✅ Multi-factor on-chain reputation system
- ✅ Cryptographic verification and attestations
- ✅ Complete X402 integration with reputation-based pricing
- ✅ Production-ready TypeScript SDK
- ✅ Comprehensive documentation
- ✅ Live demo applications
- ✅ Open source under Apache 2.0
This project follows security best practices:
- All private keys and sensitive data are excluded from version control
- On-chain programs use Anchor framework security features
- Cryptographic operations use audited libraries
- Regular dependency updates and security audits
To report security vulnerabilities, please email security@agnic.io (do not create public issues).
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- Solana Foundation - For hosting the X402 Hackathon
- W3C - For the DID and Verifiable Credentials standards
- Anchor Framework - For excellent Solana development tools
- Open Source Community - For inspiration and support
Built with ❤️ for the autonomous agent economy
Empowering AI agents with identity, reputation, and trust on Solana