Skip to main content

AI Agent Integration

Omni.fun treats AI agents as first-class protocol participants. Agents can register, launch tokens, trade cross-chain, and monitor markets — all through a dedicated API. Every cross-chain agent action generates LayerZero messages.

Why This Matters for LayerZero

AI agents trade autonomously, 24/7, across multiple chains. Each cross-chain trade is a LayerZero message. As agent frameworks scale (ElizaOS, Virtuals, custom bots), the volume of LZ messages scales proportionally. Agent trading volume is LZ message volume.

Agent Lifecycle

1. REGISTER     →  EIP-712 signature proves wallet ownership
                   Agent receives API key (no private key exposure)

2. SELF-LAUNCH  →  Agent launches itself as a tradeable token
                   Token deploys on Base, auto-registers across all chains
                   Agent becomes its own economy

3. TRADE        →  Agent buys/sells on any supported chain
                   Cross-chain trades route through LZ infrastructure
                   API returns calldata — agent signs and submits

4. MONITOR      →  Real-time webhooks for autonomous strategies
                   Price changes, graduations, new launches
                   Agent reacts and trades without human input

API Overview

The Agent API provides 20+ endpoints organized into five categories:
CategoryCapabilities
AuthenticationEIP-712 registration, API key issuance, wallet verification
TradingQuote prices, build trade calldata, confirm trades, cross-chain routing
LaunchingBuild launch calldata, self-launch (agent becomes token), metadata
PortfolioHoldings across chains, PnL tracking, trade history
WebhooksSubscribe to events, real-time notifications, autonomous triggers
Rate limit: 60 requests/minute per API key.

Webhook Events

Agents can subscribe to real-time events for autonomous strategy execution:
  • trade.confirmed — A trade completed on-chain
  • trade.failed — A trade reverted (with reason)
  • launch.confirmed — New token launched
  • token.graduated — Token graduated to Uniswap V3
  • token.price_change — Significant price movement
  • token.new — New token appeared in the system
Webhooks are secured with HMAC-SHA256 signatures and auto-disable after repeated delivery failures.

Cross-Chain Agent Trading

When an agent trades cross-chain, the API builds the appropriate calldata based on the source chain:
Source ChainMechanismLZ Messages
BaseDirect curve interaction0 (same-chain)
Arbitrum, Optimism, Polygon, BSCAcross or CC Buy adapter1 (CC Buy) or 0 (Across)
EthereumAcross or CC Buy adapter1 (CC Buy) or 0 (Across)
SolanaCC Buyer Program via LZ1 (LZ cross-VM)
For CC Buy path trades, the agent’s buy triggers:
  1. LZ message from remote → Base
  2. Buy on bonding curve
  3. OFT bridge-back from Base → agent’s chain
That’s 2 LZ messages per cross-chain buy (inbound + OFT return).

ElizaOS Plugin

Omni.fun ships a native ElizaOS plugin — the most popular open-source AI agent framework.
ComponentCountDescription
Actions5Buy, Sell, Launch, Check Price, Portfolio
Providers2Market Data, Position Data
An ElizaOS agent with the Omni.fun plugin can autonomously discover tokens, evaluate prices, execute trades across chains, and manage a portfolio — using LayerZero for every cross-chain operation.

Agent-as-Token Model

When an agent calls the self-launch endpoint, it becomes a tradeable token:
  1. Agent registers via EIP-712 → receives API key
  2. Agent calls self-launch → token deploys on Base
  3. Token auto-registers for cross-chain trading
  4. OFT infrastructure deploys across 6+ chains
  5. Anyone on any chain can buy/sell the agent’s token
  6. Agent trades its own token and others autonomously
This is the Virtuals model but omnichain — agent tokens that are instantly tradeable from Solana, Ethereum, Arbitrum, BSC, and every other supported chain.

MCP Server

For external AI agents that use the Model Context Protocol, Omni.fun exposes an MCP server with tools for token lookup, price quotes, and trade building. This allows any MCP-compatible agent to integrate with Omni.fun programmatically.

Security

MeasureImplementation
RegistrationEIP-712 typed signatures — wallet ownership proof without private key exposure
API keysPrefixed format (omni_*), revocable, rate-limited
Rate limiting60 req/min per key, tiered for premium agents
Webhook securityHMAC-SHA256 signatures on all webhook deliveries
SSRF protectionPrivate IP blocking, DNS redirect validation on agent-provided URLs
Metadata safetyAvatar URL fetch with magic bytes validation, resize, CDN re-hosting

Volume Projections

Every agent trade through the CC Buy or CC Sell path generates LayerZero messages. As agent adoption grows:
  • 10 active agents × 50 trades/day × 2 LZ msgs/trade = 1,000 LZ messages/day
  • 100 active agents = 10,000 LZ messages/day
  • Agent-launched tokens with OFT deployment = 6 LZ messages per launch
Agent trading is inherently cross-chain (agents optimize across chains for best execution), which means a disproportionately high percentage of agent trades flow through LayerZero compared to human traders who often stay on one chain.