Skip to content

Repository files navigation

Agent Bazaar Logo

Agent Bazaar

One Stop Marketplace for All Agents

Add your agent with few clicks and get support for monetization and reputation!


What is Agent Bazaar?

Agent Bazaar is a decentralized marketplace built around the Null Shot framework - designed specifically for Null Shot framework agents. Developers can easily list their agents and monetize them through micropayments. Users can discover, interact with, and rate agents, while developers earn automatically with every interaction.


Features

  • Agent Marketplace: Browse and discover AI agents by category with search and filtering capabilities
  • Micropayments via x402: Seamless payment processing using the x402 payment protocol for instant USDC transactions
  • On-Chain Ratings: Rate agents (1-5 stars) with ratings stored on-chain for transparency and trust
  • Reputation System: Track agent performance with success rates, earnings, and call statistics
  • Chat Interface: Interactive chat interface for communicating with agents
  • Wallet Integration: Connect your wallet using RainbowKit and Wagmi for secure transactions
  • Earnings Tracking: Real-time tracking of 24-hour earnings and total earnings per agent
  • Success Rate Monitoring: Track successful vs failed calls for each agent
  • Session-Based History: Chat history stored in session storage for seamless user experience

Upcoming Features

  • Direct Null Shot Framework Integration: Plans to integrate directly with the Null Shot framework to have monetization built-in natively, making it seamless for developers to add payment capabilities to their agents
  • API Agent Support: Coming soon with the same infrastructure for payment and reputation
  • Enhanced analytics dashboard for agent owners
  • Multi-chain support
  • Advanced filtering and sorting options
  • Agent performance insights

How to Run Project Locally

Prerequisites

  • Node.js 18+ installed
  • MongoDB database (local or cloud)
  • Wallet with testnet USDC (for Base Sepolia)
  • Smart contract deployed on Base Sepolia

Setup Steps

  1. Clone the repository

    git clone <repository-url>
    cd sumit-nuttshell
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file in the root directory:

    # MongoDB (SERVER-ONLY - NEVER use NEXT_PUBLIC_)
    MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/?appName=Cluster0
    
    # Private Key for Smart Contract Operations (SERVER-ONLY)
    PRIVATE_KEY=your_private_key_here
    
    # Smart Contract Address (PUBLIC)
    NEXT_PUBLIC_CONTRACT_ADDRESS=0x01aAFe8Bf46edDedF639CcA40E6cc4aa3885e444
    
    # RPC URL (PUBLIC)
    NEXT_PUBLIC_RPC_URL=https://base-sepolia-rpc.publicnode.com
    
    # x402 Payment Protocol Configuration (PUBLIC)
    NEXT_PUBLIC_X402_NETWORK=base-sepolia
    NEXT_PUBLIC_X402_FACILITATOR_URL=https://x402.org/facilitator
    
    # Node Environment
    NODE_ENV=development
  4. Run the development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm start - Start production server
  • npm run lint - Run ESLint

Tech Stack

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: MongoDB (via Mongoose)
  • Blockchain: Ethers.js, Wagmi, RainbowKit
  • Payments: x402 Payment Protocol
  • UI Components: Framer Motion, React Toastify
  • Smart Contracts: Solidity (Base Sepolia)

Project Structure

src/
  app/
    agent/[id]/        # Agent detail and chat page
    api/               # API routes
      agents/          # Agent CRUD operations
      config/          # Public configuration
    marketplace/       # Marketplace listing page
    layout.tsx         # Root layout
    page.tsx           # Landing page
  components/          # React components
  lib/                 # Utilities and helpers
    contract.ts        # Smart contract interactions
    db.ts              # MongoDB connection
    x402-*.ts          # x402 payment utilities
  config/
    env.ts             # Environment configuration
contract/
  bazaar.sol          # Smart contract

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages