openclaw-agent-reputation
v0.1.0
Published
On-chain credit scoring and soulbound identity for autonomous agents
Downloads
91
Maintainers
Readme
Agent Reputation
On-chain credit scoring and soulbound identity for autonomous agents
Overview
Agent Reputation is a blockchain-based reputation system that provides verifiable, immutable credit scores for autonomous AI agents. It combines:
- Soulbound Tokens (SBT): Non-transferable on-chain identities
- Credit Scoring: FICO-style scoring (300-850) based on behavior metrics
- Behavior Registry: Permanent on-chain history of agent actions
- Attestation System: Community-driven trust verification
Why Agent Reputation?
As autonomous agents become more prevalent, we need a trustworthy way to evaluate their reliability, security, and performance. Traditional reputation systems are:
- ❌ Centralized - Single point of failure
- ❌ Mutable - Scores can be manipulated
- ❌ Opaque - Black-box algorithms
Agent Reputation solves this with:
- ✅ Decentralized - Runs on Base blockchain
- ✅ Immutable - Permanent, tamper-proof records
- ✅ Transparent - Open-source scoring algorithm
Quick Start
Installation
npm install openclaw-agent-reputation
# or
yarn add agent-reputationBasic Usage
import { AgentReputationSDK } from "openclaw-agent-reputation";
// Initialize SDK
const sdk = new AgentReputationSDK({
network: "baseSepolia",
privateKey: process.env.PRIVATE_KEY,
});
// Create agent identity
const { tokenId } = await sdk.identity.createIdentity({
agentAddress: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
name: "My GPT-4 Agent",
agentType: "gpt-4",
});
// Query credit score
const score = await sdk.scoring.getScore(tokenId);
console.log(`Credit Score: ${score.score}/850`);
// Output: Credit Score: 720/850 (Good)CLI Usage
# Install globally
npm install -g agent-reputation
# Create identity
reputation create \
--agent 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb \
--name "GPT-4 Assistant" \
--type gpt-4
# Query score
reputation score --token 42
# Record attestation
reputation attest --token 42 --positiveFeatures
🆔 Soulbound Identity (AgentSBT)
Non-transferable NFT that represents an agent's identity:
- Binds agent to controller wallet
- Cannot be sold or transferred
- Permanent on-chain presence
📊 Credit Scoring (300-850)
Multi-dimensional scoring algorithm:
| Metric | Weight | Description | |--------|--------|-------------| | Task Success Rate | 30% | Completion vs failure ratio | | Uptime | 20% | Total operational time | | Security | 20% | Incident-free history | | Attestations | 15% | Community trust signals | | Economic | 15% | Transaction volume + staking |
📝 Behavior Registry
Immutable record of agent actions:
- Task completions/failures
- Security incidents
- Uptime tracking
- Economic activity
✅ Attestation System
Third-party verification:
- Positive attestations boost scores
- Negative reports decrease scores
- Weighted by attester reputation (future)
Architecture
agent-reputation/
├── contracts/ # Solidity smart contracts
│ ├── AgentSBT.sol # Soulbound Token (ERC-721 modified)
│ ├── ReputationScore.sol # Credit scoring engine
│ └── BehaviorRegistry.sol # Behavior tracking
│
├── src/
│ ├── sdk/ # TypeScript SDK
│ │ ├── identity.ts # Identity management
│ │ ├── scoring.ts # Score queries
│ │ └── index.ts # Main SDK entry
│ ├── cli/ # Command-line tool
│ └── types/ # TypeScript types
│
└── docs/ # DocumentationDocumentation
- Architecture - System design and components
- API Reference - Complete SDK documentation
- Smart Contracts - Contract specifications
- Quick Start - Getting started guide
Deployment
Supported Networks
| Network | Chain ID | Status | |---------|----------|--------| | Base Mainnet | 8453 | 🚧 Coming Soon | | Base Sepolia | 84532 | ✅ Testnet Live | | Localhost | 31337 | ✅ Development |
Contract Addresses (Base Sepolia)
AgentSBT: 0x... (Deploy after testing)
ReputationScore: 0x... (Deploy after testing)
BehaviorRegistry: 0x... (Deploy after testing)Development
Prerequisites
- Node.js >= 18
- npm or yarn
- Hardhat (for contracts)
Setup
# Clone repository
git clone https://github.com/ZhenRobotics/openclaw-agent-reputation.git
cd agent-reputation
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Edit .env with your private key
# Compile contracts
npm run compile:contracts
# Build TypeScript
npm run build
# Run tests
npm testDeploy Contracts
# Local network
npx hardhat node
npm run deploy:local
# Base Sepolia testnet
npm run deploy:baseUse Cases
1. AI Agent Marketplaces
- Problem: How do buyers trust unknown agents?
- Solution: Check on-chain reputation scores before purchase
2. Autonomous Trading Bots
- Problem: DeFi protocols need to assess bot reliability
- Solution: Require minimum credit score for access
3. Agent-to-Agent Collaboration
- Problem: Agents need to evaluate peers before collaboration
- Solution: Query reputation before forming work relationships
4. Insurance/Bonding
- Problem: Risk assessment for agent operations
- Solution: Credit score determines premium rates
Roadmap
Phase 1: MVP (Current)
- [x] Smart contracts (AgentSBT, ReputationScore, BehaviorRegistry)
- [x] TypeScript SDK
- [x] CLI tool
- [x] Documentation
- [ ] Testnet deployment
Phase 2: Enhancement (Q2 2026)
- [ ] Advanced scoring models (ML-based)
- [ ] Reputation delegation
- [ ] Zero-knowledge proofs for privacy
- [ ] Multi-chain support (Polygon, Arbitrum)
Phase 3: Ecosystem (Q3 2026)
- [ ] Reputation marketplace
- [ ] Agent discovery platform
- [ ] Integration with major agent frameworks
- [ ] Governance DAO
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Security
- Smart contracts audited by: TBD
- Bug bounty program: TBD
- Security contact: [email protected]
License
MIT License - see LICENSE file
Links
- Website: https://agent-reputation.dev (coming soon)
- GitHub: https://github.com/ZhenRobotics/openclaw-agent-reputation
- Documentation: https://docs.agent-reputation.dev
- Discord: https://discord.gg/agent-reputation
- Twitter: https://twitter.com/AgentReputation
Acknowledgments
- Built on Base - Coinbase L2
- Inspired by EIP-5192 (Soulbound Tokens)
- Credit scoring model adapted from traditional FICO methodology
Made with ❤️ for the autonomous agent ecosystem
