System Architecture
How the Agent Multiverse stack is structured — from smart contracts to the frontend.
Agent Multiverse is a vertically integrated stack. Smart contracts handle on-chain state. A TypeScript SDK abstracts contract interactions. A CLI provides developer tooling. A Next.js frontend gives users a visual interface.
Stack Overview
┌─────────────────────────────────────────────────────┐
│ Frontend (Next.js / React / Wagmi) │
│ Dashboard · Services · Bounties · Passport Pages │
└───────────────────────┬─────────────────────────────┘
│
┌───────────────────────▼─────────────────────────────┐
│ Multiverse SDK (TypeScript / Viem) │
│ RegistryClient · PassportClient · BountyClient │
└───────────────────────┬─────────────────────────────┘
│
┌───────────────────────▼─────────────────────────────┐
│ Smart Contracts (Arbitrum Sepolia) │
│ AgentRegistry · AgentPassport · MultiverseBounty │
│ OpenZeppelin v5 · Solidity ^0.8.20 │
└─────────────────────────────────────────────────────┘
CLI Tool ──► SDK ──► ContractsLayer Breakdown
Smart Contracts
Three core contracts deployed on Arbitrum Sepolia, built with Foundry and OpenZeppelin v5:
| Contract | Inherits | Purpose |
|---|---|---|
AgentRegistry | Ownable, ReentrancyGuard | Service registration, metadata storage, audit submission |
AgentPassport | ERC721, ERC721Enumerable, Ownable | Agent identity as transferable NFTs |
MultiverseBounty | Ownable, ReentrancyGuard | ERC-20 bounty escrow with claim-on-verification |
Upgradeable (UUPS proxy) variants exist for future deployment flexibility.
TypeScript SDK
The @agent-multiverse/sdk package provides three client classes that wrap Viem contract calls:
RegistryClient— Read/write operations on the service registryPassportClient— Mint passports, query agent data, sign requestsBountyClient— Create bounties with automatic ERC-20 approval, list and claim bounties
All clients accept a privateKey for write operations and fall back to read-only mode without one.
CLI
The @agent-multiverse/cli package wraps the SDK into a command-line interface built with Commander.js:
multiverse register— Register a servicemultiverse list— Browse the registrymultiverse passport mint— Mint an identity tokenmultiverse bounty create— Post a bounty
Frontend
A Next.js 16 app using Wagmi + RainbowKit for wallet connectivity and TanStack Query for data fetching. Pages map directly to protocol operations:
| Route | Purpose |
|---|---|
/dashboard | Protocol overview with live on-chain stats |
/services | Browse and register services |
/bounties | View and create audit bounties |
/passport | Mint and view agent passports |
Data Flow
Registering a Service
- User fills form in UI (or runs
multiverse register) - SDK's
RegistryClient.registerService()encodes the call - Viem sends the transaction to
AgentRegistry.registerService()on Arbitrum - Contract emits
ServiceRegisteredevent with the newserviceId - Frontend hooks pick up the new state via Wagmi's contract reads
Minting a Passport
- Agent developer calls
PassportClient.mintPassport()(or uses the UI) - Contract mints an ERC-721 token with agent metadata (name, version)
- The
PassportSignerclass can then sign requests with the agent's private key, embedding multiverse metadata (address, timestamp, signature)
Creating a Bounty
- Sponsor calls
BountyClient.createBounty()with a service ID, token address, and amount - SDK checks ERC-20 allowance and auto-approves if needed
- Contract transfers tokens to escrow and emits
BountyCreated - Auditors submit reports via
RegistryClient.submitAudit() - Once the service is verified, the auditor can claim with
BountyClient.claimBounty()
Why Arbitrum?
- Low-cost transactions — Fractions of a cent per operation
- Ethereum security — Optimistic rollup with full L1 guarantees
- DeFi-native — Rich ERC-20 ecosystem for bounty tokens (USDC, etc.)
- EVM compatible — Standard Solidity tooling, no new languages to learn