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
API Overview
The Agent API provides 20+ endpoints organized into five categories:| Category | Capabilities |
|---|---|
| Authentication | EIP-712 registration, API key issuance, wallet verification |
| Trading | Quote prices, build trade calldata, confirm trades, cross-chain routing |
| Launching | Build launch calldata, self-launch (agent becomes token), metadata |
| Portfolio | Holdings across chains, PnL tracking, trade history |
| Webhooks | Subscribe to events, real-time notifications, autonomous triggers |
Webhook Events
Agents can subscribe to real-time events for autonomous strategy execution:trade.confirmed— A trade completed on-chaintrade.failed— A trade reverted (with reason)launch.confirmed— New token launchedtoken.graduated— Token graduated to Uniswap V3token.price_change— Significant price movementtoken.new— New token appeared in the system
Cross-Chain Agent Trading
When an agent trades cross-chain, the API builds the appropriate calldata based on the source chain:| Source Chain | Mechanism | LZ Messages |
|---|---|---|
| Base | Direct curve interaction | 0 (same-chain) |
| Arbitrum, Optimism, Polygon, BSC | Across or CC Buy adapter | 1 (CC Buy) or 0 (Across) |
| Ethereum | Across or CC Buy adapter | 1 (CC Buy) or 0 (Across) |
| Solana | CC Buyer Program via LZ | 1 (LZ cross-VM) |
- LZ message from remote → Base
- Buy on bonding curve
- OFT bridge-back from Base → agent’s chain
ElizaOS Plugin
Omni.fun ships a native ElizaOS plugin — the most popular open-source AI agent framework.| Component | Count | Description |
|---|---|---|
| Actions | 5 | Buy, Sell, Launch, Check Price, Portfolio |
| Providers | 2 | Market Data, Position Data |
Agent-as-Token Model
When an agent calls the self-launch endpoint, it becomes a tradeable token:- Agent registers via EIP-712 → receives API key
- Agent calls self-launch → token deploys on Base
- Token auto-registers for cross-chain trading
- OFT infrastructure deploys across 6+ chains
- Anyone on any chain can buy/sell the agent’s token
- Agent trades its own token and others autonomously
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
| Measure | Implementation |
|---|---|
| Registration | EIP-712 typed signatures — wallet ownership proof without private key exposure |
| API keys | Prefixed format (omni_*), revocable, rate-limited |
| Rate limiting | 60 req/min per key, tiered for premium agents |
| Webhook security | HMAC-SHA256 signatures on all webhook deliveries |
| SSRF protection | Private IP blocking, DNS redirect validation on agent-provided URLs |
| Metadata safety | Avatar 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