Skip to content

ToXMon/agentbond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🀝 AgentBond

Reputation-Backed Agent Lending Protocol

Celo Venice AI License: MIT

Overview β€’ Features β€’ Architecture β€’ Quickstart β€’ Contracts β€’ API


πŸ“– Overview

AgentBond solves the "chicken-egg problem" in AI agent markets: new AI agents cannot get hired without reputation, but cannot build reputation without being hired.

The Solution

Enable established AI agents to vouch for new agents by staking their ERC-8004 reputation score as collateral:

  • βœ… If the new agent performs well β†’ Both earn reputation
  • ❌ If the new agent fails β†’ The voucher loses their stake

This creates a web of trust where reputation flows from proven agents to newcomers, making agent reputation a tradable, composable DeFi primitive.


🎯 Features

Core Protocol

Feature Description
πŸ†” ERC-8004 Agent Registration Agents register with metadata URI, receive unique agentId NFT
πŸ’° Reputation Staking Vouchers stake CELO tokens to back new agents
🀝 Vouching Mechanism Established agents (reputation > threshold) can vouch for newcomers
πŸ”’ Task Escrow Secure payment escrow with dispute resolution

AI-Powered Features

Feature Description
🏝️ Venice Risk Assessment Private API calls return risk scores without exposing agent data
πŸ” Privacy-Preserving All AI inference runs through Venice's private, uncensored API
πŸ“Š Dynamic Risk Scoring 0-100 scale with approve/review/reject recommendations

User Interface

Feature Description
πŸ“± Modern Dashboard Display agent cards with reputation, vouching history, risk scores
⚑ Task Execution Panel Real-time progress visualization with multi-stage tracking
πŸŽ‰ Completion Celebrations Confetti animations and reputation float effects
πŸŒ™ Dark/Light Theme Full theme support with smooth transitions

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        AgentBond Protocol                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚  β”‚   Frontend   β”‚    β”‚   Backend    β”‚    β”‚    Agent     β”‚       β”‚
β”‚  β”‚   (NextJS)   │◄──►│   (Bun/Hono) │◄──►│   (Venice)   β”‚       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚         β”‚                   β”‚                                   β”‚
β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                   β”‚
β”‚                   β–Ό                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚              Celo L2 (OP Stack)                          β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚   β”‚
β”‚  β”‚  β”‚AgentRegistryβ”‚ β”‚ Reputation  β”‚ β”‚ TaskEscrow  β”‚        β”‚   β”‚
β”‚  β”‚  β”‚  (ERC-8004) β”‚ β”‚  Staking    β”‚ β”‚             β”‚        β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜        β”‚   β”‚
β”‚  β”‚         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚   β”‚
β”‚  β”‚                         β–Ό                                β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚   β”‚
β”‚  β”‚  β”‚         ERC-8004 Identity/Reputation            β”‚   β”‚   β”‚
β”‚  β”‚  β”‚              (Pre-deployed on Celo)              β”‚   β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚                                                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quickstart

Prerequisites

Installation

# Clone the repository
git clone https://github.com/ToXMon/agentbond.git
cd agentbond

# Install dependencies
yarn install

# Install Foundry dependencies
cd packages/contracts && forge install

Environment Setup

# Copy environment templates
cp packages/nextjs/.env.example packages/nextjs/.env.local
cp packages/backend/.env.example packages/backend/.env

# Add your keys:
# - VENICE_API_KEY (from https://venice.ai)
# - CELOSCAN_API_KEY (from https://celoscan.io)
# - PRIVATE_KEY (for deployment)

Run Locally

# Terminal 1: Start local blockchain (Anvil)
yarn chain

# Terminal 2: Deploy contracts
yarn deploy

# Terminal 3: Start backend
cd packages/backend && bun run dev

# Terminal 4: Start frontend
yarn start

Visit http://localhost:3000 to see the app.


πŸ“œ Smart Contracts

Contract Addresses (Celo Alfajores Testnet)

Contract Address
ERC-8004 Identity Registry 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
ERC-8004 Reputation Registry 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
AgentRegistry Deploy with forge script
ReputationStaking Deploy with forge script
TaskEscrow Deploy with forge script

Core Contracts

AgentRegistry.sol

// Register a new agent
function registerAgent(string calldata metadataURI) external returns (uint256 agentId);

// Get agent info
function getAgent(address agent) external view returns (Agent memory);

ReputationStaking.sol

// Vouch for a new agent by staking CELO
function vouch(address vouchee, uint256 amount) external;

// Request unstake after cooldown
function requestUnstake(address vouchee) external;

TaskEscrow.sol

// Create a task with payment
function createTask(address agent, uint256 payment, uint256 deadline) external payable;

// Complete task and release payment
function completeTask(bytes32 taskId) external;

Run Tests

cd packages/contracts
forge test -vvv

Test Coverage: 62 tests across 5 suites, all passing βœ…


🏝️ Venice Integration

Risk Assessment Tool

import { RiskAssessmentTool } from '@agentbond/agent';

const riskTool = new RiskAssessmentTool();

const result = await riskTool.assessRisk({
  agentAddress: '0x...',
  taskContext: 'Code review task',
  stakeAmount: '10', // CELO
  includeHistory: true
});

console.log(result);
// {
//   riskScore: 25,
//   confidence: 0.85,
//   recommendation: 'approve',
//   factors: [...]
// }

Risk Score Guidelines

Score Recommendation Action
0-30 βœ… Approve Allow vouching immediately
31-60 ⚠️ Review Manual review recommended
61-100 ❌ Reject Do not allow vouching

πŸ“ Project Structure

agentbond/
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ contracts/          # Solidity smart contracts (Foundry)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ AgentRegistry.sol
β”‚   β”‚   β”‚   β”œβ”€β”€ ReputationStaking.sol
β”‚   β”‚   β”‚   β”œβ”€β”€ TaskEscrow.sol
β”‚   β”‚   β”‚   └── interfaces/
β”‚   β”‚   β”œβ”€β”€ test/
β”‚   β”‚   └── script/
β”‚   β”‚
β”‚   β”œβ”€β”€ nextjs/             # Frontend (Next.js + Scaffold-ETH 2)
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   └── services/
β”‚   β”‚
β”‚   β”œβ”€β”€ backend/            # API Server (Bun + Hono)
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── middleware/
β”‚   β”‚   └── data/
β”‚   β”‚
β”‚   └── agent/              # AI Agent (Venice)
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ tools/
β”‚       β”‚   β”‚   β”œβ”€β”€ assessRisk.ts
β”‚       β”‚   β”‚   └── payment.ts
β”‚       β”‚   β”œβ”€β”€ llm.ts      # Venice LLM Client
β”‚       β”‚   └── memory.ts
β”‚       └── dist/

πŸ”— Links


πŸ“„ License

MIT License - see LICENSE for details.


πŸ™ Acknowledgments

Built for Synthesis Hackathon 2026 with:


Making Agent Reputation a Tradable DeFi Primitive

About

AgentBond - Reputation-backed agent lending protocol for Synthesis Hackathon

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors