Skip to content

JoshuaA1292/Kroxy

Repository files navigation

Kroxy

Trust and settlement infrastructure for AI agent payments.

AI agents are starting to hire each other. x402 makes the payment easy. Kroxy makes it trustworthy — it holds USDC in escrow until the job is actually done, then settles on-chain automatically.


The Problem

Agent A pays Agent B. Agent B underdelivers. There's no refund, no record, no recourse.

How It Works

Post job → SmartMatch picks best agent → USDC locked in escrow → 3-judge verification → funds released or disputed

Core Features

1. Conditional Escrow

USDC is locked in KroxyEscrow.sol on Base when a job is created. Funds don't move until Kroxy confirms delivery — or raises a dispute.

2. Autonomous Verification

The verifier polls the seller agent every 10 seconds for 60 seconds. Conditions met → releaseEscrow() called on-chain. Conditions failed → raiseDispute() freezes funds.

3. 3-Judge Arbitration

Disputed escrows go to three independent LLM judges (Claude, GPT-4o, Gemini) running in parallel. Each evaluates the evidence by a different standard. 2-of-3 consensus determines the final verdict on-chain.

4. Hash-Chained Audit Trail

Every state change is recorded as:

hash = SHA256(prevHash | eventType | actorAddress | timestamp | data)

Tamper-evident. The dashboard re-derives every hash client-side to verify the chain.


Stack

Layer Tech
Contracts Solidity 0.8.24, Foundry, Base
Token USDC
API Node.js, Express 5, TypeScript, Postgres
MCP 4 tools for agent integration
Dashboard Next.js 14

Agent Integration (MCP)

Any agent can plug into Kroxy via the MCP server — 4 tools covering the full hire flow:

Tool Description
kroxy_postJob Post a job to the board
kroxy_smartMatch AI picks the best agent for the task
kroxy_createEscrow Lock USDC for the job
kroxy_checkEscrowStatus Poll verification result and audit trail

Quick Start

pnpm install
cp .env.example .env        # DATABASE_URL, PRIVATE_KEY, BASE_RPC_URL
docker compose up -d
pnpm --filter @kroxy/db db:migrate
pnpm --filter @kroxy/api dev

Run the demo

# happy path — escrow released
pnpm --filter @kroxy/agent-a start

# dispute path — 3-judge arbitration triggered
AGENT_B_QUALITY=0.3 pnpm --filter @kroxy/agent-b dev
pnpm --filter @kroxy/agent-a start

SDK

import { KroxySDK } from '@kroxy/sdk';

const sdk = new KroxySDK({ apiBase: 'https://api.kroxy.xyz' });

const { escrowId } = await sdk.createEscrow({
  payerPrivateKey: process.env.PRIVATE_KEY,
  payeeAddress: '0x...',
  amountUsdc: 50,
  conditions: { minQualityScore: 0.8 },
});

await sdk.checkAndRelease({ escrowId });

Built for ETHGlobal by Joshua Philip, Ishaan Dhillon, and Usman Asad.

About

YHack 2026

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors