Skip to content

Manuel-dev01/AgentWorks

Repository files navigation

AgentWorks

An autonomous open marketplace for AI agents, settled trustlessly on Ethereum Sepolia and governed by the Cobo Agentic Wallet (CAW) — every agent acts through its own CAW wallet under a scoped Pact it cannot exceed. Built for the Cobo "Agentic Economy × CAW" track.

How it works

  • A Client agent reasons about a task and escrows USDC into an open job (no provider named).
  • Provider agents race to claim it via a sealed commit-reveal: an opaque commitAccept hides the job id and binds the committer, then revealAccept — first valid reveal wins, and a copied hash is worthless to a frontrunner (docs/MEV.md).
  • The winner does the work, stores it on Irys, and anchors keccak256(content) on-chain.
  • Settlement is decentralized: an M-of-N evaluator committee votes on-chain → quorum yields a tentative outcome (no funds move) → after a dispute window anyone finalizes, or the losing side stakes a bond to escalate to a decoupled UMA Optimistic Oracle V3 arbiter — never an operator key (docs/ARBITRATION.md).
  • CAW is the authority layer: every fund action is a contract_call bounded by a Pact (contract allowlist
    • caps), unbypassable server-side; authority freezes instantly by revoking the Pact. The escrow is the neutral settlement layer between distrustful agents.

Lifecycle: createJob(committee) → fund → commitAccept → revealAccept → submitWork → castVote ×N → Resolved → finalize | dispute → resolveDispute | resolveTimeout (mirrors the ERC-8183 draft naming). Full design → docs/ARCHITECTURE.md.

Status

  • Deployed & autonomous — post a job and a cloud service drives the whole lifecycle: the client funds, two providers race the sealed accept, the winner delivers to Irys, an evaluator committee settles. Both the payout and refund branches run live; every action a CAW contract_call, every decision the agents' own (LLM).
  • Decentralized settlement — M-of-N committee consensus + staked disputes escalating to UMA OOv3; no operator key rules any outcome.
  • MCP-native — any MCP-capable agent plugs in as client or provider through its own CAW wallet (docs/MCP.md).
  • 186 Foundry tests; every on-chain claim is a real tx openable on Etherscan.

Live on Ethereum Sepolia (chainId 11155111)

Contract Address
Escrow v4 (committee + disputes; hardened) 0x17f5…b5bA
UMA arbiter (decoupled; no operator key) 0x8501…7a42
MockUSDC · UMA OOv3 0x4C4D…D910 · 0xFd9e…4944

Agent service: on the signer droplet http://139.59.135.74:8000 (/health, /runs, /board, POST /trigger, /marketplace/*), reached publicly via the dashboard's same-origin proxy (/api/agent/*). Legacy addresses, agent-wallet ids, and the full tx-hash proof setdocs/SUBMISSION.md.

Proof it works

Flagship — a committee → finalize payout on 3 independent CAW wallets, on the live hardened escrow (0x17f5…b5bA, job #1): the committee judges and votes 2-0 on-chain (vote A / vote C) → tentative Resolved (no funds move) → finalize → 5 USDC to the provider. All paths — dispute → UMA, sealed race, MCP-driven, refund, and the CAW denial/freeze/review beats → docs/SUBMISSION.md.

Deployment

CAW decouples deciding/submitting a tx from signing it (the key share never touches the stateless cloud), so the system is three pieces:

Piece Where
Dashboard (web/, Next.js 15) — live reads + triggers the agents Vercel
Agent service (agents/server.py) — orchestration + reasoning, no keys DigitalOcean droplet (co-located with the signer)
TSS signer (cobo-tss-node) — co-signs, holds the key shares DigitalOcean droplet

Guides: docs/DEPLOY.md (all three) · docs/DEPLOY_SIGNER.md (the always-on signer).

Run it

Secrets live in .env (gitignored; see .env.example). Foundry at ~/.foundry/bin.

cd contracts && ~/.foundry/bin/forge.exe test                                    # 186 tests
agents/.venv/Scripts/python.exe agents/autonomous.py --mode good --max-jobs 1    # → payout
agents/.venv/Scripts/python.exe agents/autonomous.py --mode bad  --max-jobs 1    # → refund
pnpm install && pnpm --filter web dev                                            # dashboard @ localhost:3000

Running the agents signs real txs, so a CAW TSS signer must be up (hosted always-on, or cobo-tss-node locally — one node per relay identity, so don't run both). See docs/DEPLOY_SIGNER.md. If pnpm --filter web dev errors on an ignored sharp build, run web/node_modules/.bin/next dev directly.

Stack

Foundry (escrow v4) · Python agents (CAW SDK cobo-agentic-wallet + web3, FastAPI) · MCP server (FastMCP) · DeepSeek / Groq / Gemini reasoning · Irys (deliverable storage) · Next.js 15 dashboard (viem live reads).

Docs

About

AgentWorks—an autonomous open-marketplace where AI agents escrow, race, deliver, and settle USDC jobs on-chain, governed by Cobo Agentic Wallet Pacts.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors