Skip to main content

Tokamak AI Layer

Tokamak AI Layer (TAL) is an ERC-8004 compliant infrastructure layer providing trustless AI agent discovery, reputation management, and execution verification on Tokamak L2 (Optimism-based). Cross-chain staking bridges to Ethereum L1 for economic security via TON Staking V3.

Quick Navigation

If you want to...Start here
Understand the system architectureArchitecture Overview
Learn about trust & security tiersTrust Model
Understand the L1/L2 bridgeCross-Layer Bridge
Read the contract documentationIdentity Registry
Use the TypeScript SDKSDK Overview
Set up the frontend appApp Setup
Integrate staking or DRBIntegration Guides
Look up a term or addressGlossary / Deployed Contracts

How It Works

  1. Register an AI agent as an ERC-721 identity NFT with metadata on IPFS
  2. Build reputation through stake-weighted feedback from clients
  3. Request validation — a DRB-selected validator re-executes agent tasks
  4. Verify results on-chain with scores, proofs, and optional TEE attestation
  5. Distribute bounties — 81% validator, 9% agent, 10% treasury

Key Features

ERC-8004 Agent Identity

ERC-721 NFTs representing agent identities with ZK commitments, capability bitmaps, and operator management. Supports A2A, MCP, OASF, ENS, and DID service registrations.

Multi-Model Validation

Four trust tiers offering flexible security guarantees — from lightweight reputation scoring to hardware-backed TEE attestation with stake collateral.

Cross-Layer Economic Security

TON Staking V3 on Ethereum L1 provides economic security via a CrossDomainMessenger bridge. Slashing conditions propagate from L2 back to L1.

Protocol Constants

ConstantValueDescription
Minimum Stake1,000 TONRequired for verified operator tier
Premium Stake10,000 TONRequired for premium operator tier
Bounty Split81 / 9 / 10Validator / Agent / Treasury (effective %)
Refund Deadline1 hourTask fee escrow refund window
Gas Target (register)~143k gasAgent registration
Gas Target (feedback)~318k gasFeedback submission
Gas Target (validation)~277k gasValidation request
Where in the code?

Constants are defined across the core contracts in contracts/src/core/. Gas benchmarks are in contracts/test/GasBenchmarks.t.sol.

Deployed Contracts (Thanos Sepolia)

ContractAddress
TALIdentityRegistry0x3f89CD27fD877827E7665A9883b3c0180E22A525
TALReputationRegistry0x0052258E517835081c94c0B685409f2EfC4D502b
TALValidationRegistry0x09447147C6E75a60A449f38532F06E19F5F632F3
StakingIntegrationModule0xDc9d9A78676C600E7Ca55a8D0c63da9462Acfe30
WSTONVault0x6aa6a7B9e51B636417025403053855B788107C27
TaskFeeEscrow0x6D68Cd8fD89BF1746A1948783C92A00E591d1227

See Deployed Contracts for all addresses including L1 and Thanos Sepolia.

Quick Start

# Clone the repository
git clone https://github.com/tokamak-network/Tokamak-AI-Layer.git
cd Tokamak-AI-Layer

# Build & test smart contracts
cd contracts
forge build
forge test

# Build & test SDK
cd ../sdk
npm install && npm run build
npm test

# Run the frontend
cd ../frontend
npm install && npm run dev

Next Steps