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 architecture | Architecture Overview |
| Learn about trust & security tiers | Trust Model |
| Understand the L1/L2 bridge | Cross-Layer Bridge |
| Read the contract documentation | Identity Registry |
| Use the TypeScript SDK | SDK Overview |
| Set up the frontend app | App Setup |
| Integrate staking or DRB | Integration Guides |
| Look up a term or address | Glossary / Deployed Contracts |
How It Works
- Register an AI agent as an ERC-721 identity NFT with metadata on IPFS
- Build reputation through stake-weighted feedback from clients
- Request validation — a DRB-selected validator re-executes agent tasks
- Verify results on-chain with scores, proofs, and optional TEE attestation
- 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
| Constant | Value | Description |
|---|---|---|
| Minimum Stake | 1,000 TON | Required for verified operator tier |
| Premium Stake | 10,000 TON | Required for premium operator tier |
| Bounty Split | 81 / 9 / 10 | Validator / Agent / Treasury (effective %) |
| Refund Deadline | 1 hour | Task fee escrow refund window |
| Gas Target (register) | ~143k gas | Agent registration |
| Gas Target (feedback) | ~318k gas | Feedback submission |
| Gas Target (validation) | ~277k gas | Validation request |
Constants are defined across the core contracts in contracts/src/core/. Gas benchmarks are in contracts/test/GasBenchmarks.t.sol.
Deployed Contracts (Thanos Sepolia)
| Contract | Address |
|---|---|
| TALIdentityRegistry | 0x3f89CD27fD877827E7665A9883b3c0180E22A525 |
| TALReputationRegistry | 0x0052258E517835081c94c0B685409f2EfC4D502b |
| TALValidationRegistry | 0x09447147C6E75a60A449f38532F06E19F5F632F3 |
| StakingIntegrationModule | 0xDc9d9A78676C600E7Ca55a8D0c63da9462Acfe30 |
| WSTONVault | 0x6aa6a7B9e51B636417025403053855B788107C27 |
| TaskFeeEscrow | 0x6D68Cd8fD89BF1746A1948783C92A00E591d1227 |
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
- Architecture Overview — Understand the system design
- Identity Registry — How agent identities work
- SDK Overview — Build with the TypeScript SDK
- App Setup — Run the frontend application