Skip to content

swanandi-bhende/TrustBridge

Repository files navigation

TrustBridge: Autonomous AI Freelance Settlement Agent


✨ Overview

TrustBridge is a decentralized AI Agent built for the AGENT ARENA Hackathon that acts as an autonomous settlement officer for the gig economy.

Traditional freelance platforms charge high fees and have slow settlement times. TrustBridge solves this by using an AI Agent (powered by IQAI ADK and Gemini) to autonomously verify work submission (code repositories) and instantly release payments on the Base Sepolia blockchain.

It features a unique multi-currency settlement system, allowing global clients to pay in USDC while the agent calculates and settles the freelancer's preferred currency (KRWQ, INR, JPY, EUR) in real-time.

👉🏻 Website Link

Try out the website here: https://trust-bridge-iqai.vercel.app/

👉🏻 Demo Video

Watch the full demo here: https://youtu.be/uYB0Moi97Pc


✨ Key Features

  • Autonomous Work Verification: The agent uses Google Gemini (via IQAI ADK) to analyze submitted GitHub repository links, checking for code quality and security before authorizing payment.
  • Robust Fail-Safe Architecture: Includes a "Live/Demo" Toggle. If the AI API hits rate limits (429 errors), the system automatically falls back to a deterministic "Demo Mode" to ensure the application never crashes during testing.
  • Multi-Currency Settlement: The agent handles the "math" of international payments, converting the job value (USD) into local stablecoins (KRWQ, INR, JPY) dynamically.
  • On-Chain Execution: All payments are executed on Base Sepolia using real transaction hashes, ensuring transparency and trust.
  • Freelancer Dashboard: A professional UI tracking active jobs, escrow status, and payment history.

✨ Key Integrations

Integration Description
IQAI ADK The core framework powering the Agent's decision-making logic.
Google Gemini The LLM brain (2.0 Flash) used for understanding user intent and verifying code.
Base Sepolia The L2 blockchain layer where settlements occur.
Vercel Hosting infrastructure for the Next.js frontend and API routes.

✨ Prerequisites

Before running this project, ensure you have:

  • Node.js 18+ installed
  • pnpm or yarn package manager
  • MetaMask browser extension installed and connected to Base Sepolia
  • Google AI Studio Key (for Live AI mode)

✨ Quick Start

1️. Clone the Repository

git clone https://github.com/your-username/TrustBridge.git
cd TrustBridge

2️. Install Dependencies

pnpm install
# OR
npm install --legacy-peer-deps

3. Environment Setup

Create a .env file in the root directory:

GOOGLE_API_KEY=your_gemini_key
AGENT_PRIVATE_KEY=your_wallet_private_key

4. Run the Application

pnpm run dev

Open http://localhost:3000 in your browser.


✨ How to Use

Connectivity

  1. Launch the application.
  2. Click Connect Wallet in the top right.
  3. Ensure your wallet is on Base Sepolia.

The "Live vs Demo" Toggle

  1. Located in the header.
  2. LIVE AI: Uses real Google Gemini models. (Note: May hit rate limits on free tier).
  3. DEMO: Uses a deterministic logic path guaranteed to work for demonstrations.

Submitting Work

  1. Navigate to "Find Opportunities" and select a job (e.g., "Smart Contract Audit").
  2. You will be redirected to the Agent Chat.
  3. The Agent will ask for your work. Paste a GitHub Link (or type "My GitHub Link" for a quick test).

Getting Paid

  1. The Agent will verify the link.
  2. Upon approval, it will ask for your preferred currency.
  3. Type "Pay in KRWQ" (or INR, JPY, USDC).
  4. The Agent will calculate the exchange rate and fire a blockchain transaction.
  5. A confirmation with a BaseScan Link will appear.

✨ Smart Contract Info (Base Sepolia)

We deployed custom Mock Tokens to simulate the international stablecoin ecosystem:

Token Address
KRWQ 0xefE7f1C604F5b12a5158f0488757e80A86F2C526
INR 0x0f69453B716d4bA635deCD26B2F1001f123fD2D7
JPY 0xbdE674153aB6Da742d5a9BA3b4470ECB3c84A510
USDC 0xBF39E75DC2DbF364AeD0C199b06B213a496C8F38

✨ Technology Stack

Frontend

  • Next.js 15 (App Router)
  • Tailwind CSS (Styling)
  • Lucide React (Icons)
  • React Confetti (UI Polish)

AI Agent

  • IQAI ADK-TS (Agent Framework)

  • Google Gemini 2.0 Flash (LLM)

  • Tool Calling (Custom tools for verify_work and pay_freelancer)

    Blockchain

  • Ethers.js v6 (Wallet interaction)

  • Base Sepolia Testnet


✨ Future Improvements

  • Real Code Analysis: Integrate GitHub API to actually scan the repo contents rather than just the URL.
  • Dispute Resolution: Add a "Human in the Loop" feature where a third party can intervene if the Agent rejects valid work.
  • Mainnet Launch: Deploy real KRWQ (Stablecoin) contracts on Base Mainnet.

✨ License

This project is licensed under the MIT License — see the LICENSE file for details.

About

Submission for Agent Arena - University Hackathon 2025.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages