Adversa

Decentralized AI swarm that reviews code with adversarial red-team debate & on-chain identity

Adversa

Created At

Open Agents

Project Description

ADVERSA is a decentralized AI code review swarm that eliminates confirmation bias and single reviewer bottlenecks. Six specialist agents — Security, Red-Team, Performance, Style, Coder, and Gateway, run on an encrypted AXL peer-to-peer mesh network, each with a cryptographic ed25519 identity. When a developer submits a goal, the Coder agent generates
code and opens a GitHub PR. The remaining agents review in parallel: the Red Team generates real exploit payloads (SQL injection, auth bypass, race conditions), while the Security agent defends or concedes in a live adversarial debate. All LLM inference runs through 0G Compute on TEE hardware, so every AI response comes with a cryptographic attestation proving it ran in a trusted enclave,protecting your code's IP. Consensus is weighted by role and onchain reputation score. The full review pipeline runs offline-first on the mesh; GitHub merges, 0G Storage uploads, and 0G Chain recordings queue and drain automatically when connectivity returns. Each agent is an ERC-7857 iNFT that evolves its embedded intelligence as it discovers new attack patterns.

How it's Made

ADVERSA is built in TypeScript (Node 20) with six containerized agents communicating over Gensyn's AXL encrypted mesh using ed25519 keypairs, not config strings as agent identity. Each agent runs as its own AXL node, advertising MCP services (/mcp/{peer}/security-scan, /perf-analysis, /style-check, /exploit-scan) for direct work routing, and listening on GossipSub topics (adversa:pr-opened, adversa:goals, adversa:critical-vuln) for broadcasts. Adversarial debate messages use A2A routing (/a2a/{peer}) so the RedTeam and Security agents hold structured challenge/defense exchanges independent of the orchestrator.

  All LLM inference routes through 0G Compute's TEE broker (@0glabs/0g-serving-broker). Every  response includes a chat, a cryptographic TEE attestation from SGX/TDX hardware, which is validated before the output is used and stored on-chain as a verifiable proof.                                   Three Solidity contracts (Solidity 0.8.24, OpenZeppelin v5) deploy to 0G Chain (chainId         16602): AdversaRegistry records review outcomes with the 0G Storage Merkle root and TEE proof ID; AdversaReputation tracks per-agent exploit discovery accuracy; AdversaINFT implements ERC-721 + ERC-7857 so each agent is an on-chain iNFT whose intelligence blob (system prompt + learned patterns) lives on 0G Storage and whose evolution count increments via evolveAgent() when new patterns are learned.

  KeeperHub handles all on-chain write coordination — nonce management, gas estimation, and retry logic, preventing the six concurrent agents from colliding on nonces. It also provides the multi-RPC failover that makes the 0G Chain recordings reliable.                                             The offline-first layer serializes queued remote actions (GitHub merges, 0G Storage uploads,   KeeperHub workflows) to a local JSON file and replays them in order via a SyncEngine when   internet connectivity returns, meaning the full review pipeline runs air-gapped on the mesh.                     The real time dashboard (Express + Socket.IO) streams the live debate, red exploit             challenges, green security defenses, consensus vote tallies and is accessible from mobile   via QR code.  

background image mobile

Join the mailing list

Get the latest news and updates