Tribunal

The agentic economy is here, disagreements amongst agents are inevitable, Tribunal resolves them.

Tribunal

Created At

Open Agents

Project Description

Tribunal is a verifiable AI court for autonomous agents. With upcoming agent economy, there will be a lot of agents surfing and transacting the web. With these transactions come disagreements and failures which need resolution. Currently humans need to step in to clear these issues which is not at all ideal. Here is where Tribunal comes in to save the bag.

It has a multi-judge dispute-resolution layer for autonomous AI agents that transact on-chain. When two agents disagree over a contract like a missed delivery, a quality dispute, a refund claim, either side can file a case to Tribunal and get a binding, verifiable ruling executed automatically.

It has escrow smart contracts to enable contract (binding document) between users with specific terms behind it. Users/agents can dispute it. Disputes execute similar to a real legal trial, agent's case is handled by their lawyer agent. All agents (including judges, clerk, user's agents and lawyers) communicate over Gensyn AXL (an encrypted P2P transport), evidence and arguments are streamed through a court "clerk," and a judge agent (jury in future), minted as ERC-7857 iNFTs on 0G Chain, deliberate and vote (in future after jury). The judge runs in an Reproducible Execution Environment (gensynai/ree), which packages model export, compilation, inference, and output decoding into a single containerised pipeline for verifiable AI execution. This ensures reproducible modes, cryptographic receipts for completed runs, and validated results without requiring identical hardware ensuring that the judge agent or its outputs are not compromised. For audit trail of the proceeding, we use 0G Storage for content-addressed audit, we store every single response received over AXL from every agent to ensure case is completely verified and using the REE receipts retraceable. A majority ruling finalizes the verdict on TribunalCore (contract), releases or claws back escrow via EscrowAdapter (contract).

User's agents can connect to the Tribunal via MCP servers and the web UI directly.

How it's Made

Tribunal is a TypeScript monorepo with four cleanly separated workspaces:

  • contracts/ — Hardhat + Solidity 0.8.27 (EVM cancun), OpenZeppelin ERC-721 base. Eight contracts, 25/25 tests, deterministic deploy script that writes addresses to docs/deployment.json consumed by every other workspace.

  • agents/ — TypeScript + Vitest runtime for clerk / lawyer / judge / QA roles. Pluggable Llm interface (canned, OpenAI, Anthropic, OpenRouter, REE) so tests run on stub models and prod runs on real ones. Pluggable Transport (AXL or in-memory) so the full courtroom can run end-to-end without external nodes. Deliberation loop (agents/src/judge/) is a pure state machine that emits a content-addressed "chain manifest" of every reasoning step.

  • web/ — Next.js 14 App Router + Tailwind. Server-sent events stream the live trial; route handlers under /api/cases/, /api/escrow/, /api/rulebook/, /api/governance/ read directly from on-chain state via ethers/viem with a small in-memory cache. ENS names are resolved client-side via a custom useEnsName hook backed by a Sepolia adapter.

  • mcp/ — @tribunal/mcp stdio MCP server, signs locally with the user's key. Lets any LLM client (Claude Desktop, Cursor) file cases, fund escrow, submit evidence, answer questions, and read verdicts as first-class tools.

0G - all contracts (AgentRegistry, TribunalCore, EscrowAdapter, TribunalEscrow, VerdictLog, JudgeINFT, RuleBook, RuleBookGovernor) are deployed on 0G. iNFT (ERC-7857), judges as evolving NFTs (append-only log of case-ruling hashes (the judge's evolving precedent memory). 0G Storage for content-addressed audit trail log for the whole dispute proceeding. 0G explorers linked across the whole project to contracts, addresses and transactions).

ENS - every agent (judge, lawyer, litigant, clerk) gets an ENSIP-25 verifiable identity as a subname of tribunal.eth on Sepolia, with text records (verified-agent:eip155:16602:<registry>:<addr>, agent.role, agent.axl-peer-id, agent.pubkey, agent.credentials. We cross-link the Sepolia name to the agent's entry in the 0G AgentRegistry via ERC-7930 interoperable address. User agents get memorable subnames (e.g. amber-fox.tribunal.eth) auto-allocated from a 200+ word adjective/noun list, deterministically derived from the wallet. The entire legal rulebook is ENS-anchored, RuleBook.sol on 0G stores only (articleId, ensNode, chapter) tuples while each article's title and body live as ENS text records (description, tribunal.title, tribunal.chapter) on chapter-X-Y.rulebook.tribunal.eth subnames; judges resolve these at deliberation time to cite from the corpus.

Gensyn — AXL is the P2P transport between every Tribunal agent; agents/src/transport/axl.ts wraps the local Go node's HTTP API (/send with X-Destination-Peer-Id, /recv long-poll, /topology for own peer id). Four nodes run side-by-side, clerk, lawyer-A, lawyer-B, judge, and all courtroom traffic (case filing, evidence, lawyer arguments, judge rulings, receipt envelopes) flows over AXL instead of any centralized broker. Each agent's hex64 ed25519 peer id is published as the agent.axl-peer-id ENS text record, so peers can discover and verify each other end-to-end. Judge inference runs in a Reproducible Execution Environment (REE) enclave (agents/enclave/): the judge's LLM call shells out to gensynai/ree:v0.2.0 run, captures the per-call receipt, and returns { text, receipt: { hash, url } }. Receipt hash + URL are anchored on-chain via VerdictLog.attachReceipt, so anyone can re-run REE in verify mode and confirm the verdict was produced by the claimed model on the claimed inputs, the web UI's VerdictCard renders a "verifiable inference" badge with a link to the receipt blob. Wire format and signing flow are TEE-shaped (separate enclave key, /attestation endpoint) so swapping in a real TEE later (Phala/Marlin) is contained.

background image mobile

Join the mailing list

Get the latest news and updates

Tribunal | ETHGlobal