Docs / Capabilities
Capability — Paid

Nitro Routing

High-throughput execution mode. Batches cross-chain operations, bridges, and compute tasks into optimistic bundles — settled on-chain with a single proof. Sub-second agent operations on 0G without waiting for individual transaction finality.

What it is

Nitro is the priority execution lane in Opacus. When Nitro is enabled for an agent, its tasks are placed in a fast-path bundle queue that bypasses the standard per-transaction finality wait. Bundles are flushed on a configurable interval (default 2 seconds) and settled on-chain with a single ERC-7750 proof. Between flush cycles, operations are available immediately for dependent tasks — latency is close to off-chain, with on-chain guarantees on settlement. Nitro is especially effective when agents need to execute many small operations per second.

Who it's for

What you get

How to enable

💡
No code changes needed. Nitro is a network-layer capability — your agent code (e.g. a MEV bot on Base) stays exactly the same. Opacus handles the fast-path routing transparently.

Step-by-step (Agentboard)

  1. Upgrade plan: Agentboard → Billing → select Pro or Enterprise → confirm. Nitro is included in these plans at no extra per-agent charge.
  2. Open Capabilities: In the sidebar click Capabilities. If your plan is Pro/Enterprise you will see a green "Nitro & H3 included in your plan" banner at the top with an Activate Nitro now → button.
  3. Select your agent: Click Activate Nitro now → (or the Activate on an agent → button on the Nitro card). A modal opens with a dropdown — choose the agent you want (e.g. your Base MEV bot).
  4. Configure: After confirming, the routing config modal opens. Leave defaults for most bots:
    • Routing Mode: Auto (recommended)
    • Max Egress / Request: 256 KB
    • Latency Budget: 500 ms
    Click Save.
  5. Done. The agent card in the Agents list now shows an ⚡ Nitro badge. All future task executions for that agent use the priority queue.

Programmatic activation (REST API)

POST https://opacus.xyz/api/kinetic/agents/{agentId}/capabilities/nitro/enable
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "config": {
    "routingMode": "auto",      // auto | custom | regional
    "maxEgressKb": 256,
    "latencyBudgetMs": 500
  }
}

Response: { "ok": true, "agentId": "...", "capability": "nitro", "enabled": true }

Self-hosted kernel: Add to agent-kernel/.env:

OPACUS_NITRO_ENABLED=true
OPACUS_NITRO_BATCH_SIZE=10        # max ops per bundle (default: 10)
OPACUS_NITRO_FLUSH_MS=2000        # flush interval in ms (default: 2000)
OPACUS_NITRO_SETTLE_CHAIN=0g      # settlement chain: base | 0g

Then restart Agent Kernel and set nitro: true on any task call.

Pricing

Nitro is included in the Pro ($29.99/mo) and Enterprise plans. No separate per-agent subscription is needed when you are on these tiers.

PlanNitro included?Execution fee
FreeNo1.00%
StarterNo0.75%
Pro✓ Yes0.50%
Enterprise✓ Yes0.30%

Additional per-use bundle operation fees (on top of the plan’s execution fee):

Operation inside bundlePer-use fee
Kinetic task launch1% of budget
0G compute job5% of budget
Bridge within bundle0.3%
Storage upload0.3% of file cost
On-chain settlement proofFree (bundle subsidy)

Operational notes

Examples

Launch a Nitro-accelerated task

import { createOpacusWorker } from 'opacus-kinetic-mcp';

const worker = createOpacusWorker({
  apiKey:    process.env.OPACUS_API_KEY,
  kernelUrl: process.env.OPACUS_KERNEL_URL || 'http://localhost:3006',
});

const task = await worker.callTool('launch_secure_task', {
  template:   'compute_0g',
  prompt:     'Analyze USDC/ETH liquidity on 0G Jaine DEX',
  budgetUsdc: 0.5,
  nitro:      true,   // opt-in to Nitro batching
});

console.log('Task ID:', task.taskId);
console.log('Execution time:', task.execution_ms, 'ms');

Monitor Nitro bundles

# List recent bundles
curl -H "Authorization: Bearer YOUR_API_KEY" \
     http://localhost:3006/api/nitro/bundles?limit=10

# Check a specific bundle
curl -H "Authorization: Bearer YOUR_API_KEY" \
     http://localhost:3006/api/nitro/bundles/BUNDLE_ID

Architecture & User Flow

The diagram below shows how a user (or Virtuals agent) on any chain interacts with Opacus to reach the 0G network — fully gasless, with fees settled off-chain.

Base USDC Ethereum L1 USDC Solana USDC / SOL Virtuals Agent GAME SDK + createOpacusWorker() Opacus Bridge Relayer Base ↔ 0G • 0.3% fee • ~30s Opacus Agent Kernel Kinetic MCP • REST API • Kinetic Ledger (off-chain fees) ⛽ Gasless Facilitator Sponsors A0GI gas 0G Storage upload / download rootHash verified 0G DA Layer blob publish ZK proof anchoring H3 Routing ERC-7751 registry CitadelDID lookup 0G Compute GPU inference 5% fee 0G Network (Aristotle Mainnet — Chain ID 16661) A0GI gas sponsored by Citadel Facilitator • USDC settlements off-chain via Kinetic Ledger Kinetic Ledger (off-chain fees) Bridge 0.3% • Compute 5% • Kinetic 1% • Swap 0.3% ERC Standards ERC-7750 Nitro • ERC-7751 H3 • ERC-7752 Bridge • ERC-7753 Escrow Data / Token flow Gas / Fee flow Agent flow Registry / ERC flow

Gasless Transactions from Other Chains to 0G

Sending value or data to the 0G network from Base, Ethereum, or Solana normally requires the execution wallet to hold A0GI (0G's native gas token). Opacus removes this requirement entirely via the Citadel Facilitator and a two-step bridge-then-execute model.

Zero native token required. Deposit USDC on Base once. Opacus bridges and executes operations on 0G automatically — gas is sponsored.

How the flow works

  1. Fund once: Deposit USDC to your executionWalletAddress on Base (or the 0G network directly).
  2. Bridge call: Agent Kernel calls executeRealBridge() using the MCP bridge_funds tool. USDC is moved Base → 0G via the native Opacus bridge relayer.
  3. Gas sponsorship: Before any 0G transaction, GasStationService.ensure0gGas(address) is automatically called. If A0GI balance is below threshold (0.001 A0GI default), the facilitator wallet tops up the execution wallet.
  4. Execute on 0G: The actual operation — storage upload, compute job, swap on Jaine DEX — proceeds with gas already covered.
  5. Fee deducted off-chain: A 0.3% bridge fee + any operation fee is deducted from your Kinetic Ledger in USDC. No extra on-chain transaction.

Supported source chains

Source chainAssetBridge methodTypical time
BaseUSDCNative Opacus bridge relayer~30 seconds
Ethereum L1USDCVia Base bridge → Opacus relay~5 minutes
SolanaUSDC / SOLWormhole + Opacus relay~2 minutes
0G NetworkUSDCDirect (no bridge needed)Instant

MCP tool: bridge_funds

// From Claude / GPT-4o via Kinetic MCP
"Bridge 10 USDC from Base to 0G network"

// From TypeScript (createOpacusWorker)
await worker.callTool('bridge_funds', {
  fromChain: 'base',
  toChain:   '0g',
  amountUsdc: 10,
});

The MCP response includes txHash, bridgedAmountUsdc, platformFee, and destinationChain. The fee (0.3%) is deducted from the ledger — not from the bridged amount.

Verify the bridge completed

// Check pending bridges
"Check status of my pending bridge transactions"

// REST endpoint
GET /api/bridge/pending
Authorization: Bearer <apiKey>
📝
If you are building an autonomous agent that needs to operate on 0G, call bridge_funds once in the agent's onStart hook to pre-fund the 0G wallet before running tasks.

0G Storage & Data Availability (DA)

0G provides two distinct data services used by Opacus agents: Storage for persistent file retrieval, and DA (Data Availability) for publishing verifiable data blobs that smart contracts and proofs can verify.

Storing files — upload_0g_file

Files are chunked, Merkle-hashed, and committed to 0G storage nodes. The returned rootHash is the permanent identifier.

// Via natural language
"Upload the file /tmp/agent-report.json to 0G decentralized storage"

// Via TypeScript SDK
import { createOpacusWorker } from 'opacus-kinetic-mcp';

const worker = createOpacusWorker({ apiKey: process.env.OPACUS_API_KEY });
const result = await worker.callTool('upload_0g_file', {
  data: Buffer.from(JSON.stringify(reportData)).toString('base64'),
  filename: 'agent-report.json',
});
// result.rootHash — save this!
console.log('Stored at:', result.rootHash);

Retrieving files — download_0g_file

// Via natural language
"Download the 0G file with root hash 0xabc123def456…"

// Via SDK
const file = await worker.callTool('download_0g_file', {
  rootHash: '0xabc123def456…',
});

Verifying integrity — verify_0g_merkle

Any party can verify that a file stored on 0G is intact at any time — no trust required.

const check = await worker.callTool('verify_0g_merkle', {
  rootHash: '0xabc123def456…',
});
// { valid: true, blockNumber: 1234567, confirmedAt: 1735000000 }

Data Availability (DA) blobs

0G DA is used when on-chain contracts need to verify that a data blob was published without storing the full data on L1. This is most useful for:

// Post a DA blob (from agent task result)
const da = await worker.callTool('post_0g_da_blob', {
  data: JSON.stringify({ taskId, result, timestamp: Date.now() }),
  namespace: 'opacus-agent-v1',
});
// da.blobId — reference for smart contract or audit log
ToolUse caseKey output
upload_0g_filePersistent file storagerootHash
download_0g_fileRetrieve stored filefile data / path
verify_0g_merkleIntegrity checkvalid: bool
post_0g_da_blobData availability publishingblobId

H3 Geospatial Agent Routing (ERC-7751)

H3 is Uber's open-source hexagonal hierarchical geospatial indexing system. The globe is divided into hexagonal cells at 16 resolution levels — from continental (level 0) down to building-scale (level 15). Opacus bakes H3 into its on-chain agent registry via ERC-7751, enabling agents to be discovered, routed, and paid based on geographic proximity — without revealing exact GPS coordinates.

🗺️
Why hexagons? Each H3 hexagon has exactly 6 equidistant neighbours. This makes proximity queries numerically stable — no corner-case cells, no distorted distances near the poles.

H3 resolution levels

ResolutionCell areaTypical use case in Opacus
04,357,449 km²Continental broadcast routing
312,393 km²Country-level agent clusters
5252 km²City-level Citadel zones
8 ← default0.74 km²Neighbourhood precision — Opacus default
100.015 km²Building-level IoT sensor anchoring
120.00034 km²Room-level micropayment granularity

CitadelDID — your agent's on-chain geospatial identity

Every agent registered through Opacus gets a CitadelDID that encodes its geographic cell plus its execution wallet:

did:opacus:h3:{h3CellIndex}:{walletAddress}

// Example — agent in Istanbul, resolution 8
did:opacus:h3:88091dbdbffffff:0xDEAD…BEEF

This DID is stored on-chain in the ERC-7751 registry on 0G. Any agent query by capability or location resolves against these DIDs.

Register an agent by location

import { H3RoutingClient, latLngToH3Cell, citadelDID } from 'opacus-sdk/h3';

const h3 = new H3RoutingClient(signer, CONTRACT_ADDRESS);

// 1. Convert GPS → H3 cell (resolution 8, ~0.74 km²)
const h3Index = latLngToH3Cell(41.0082, 28.9784); // Istanbul
// → '88091dbdbffffff'

// 2. Build the CitadelDID
const did = citadelDID(h3Index, await signer.getAddress());
// → 'did:opacus:h3:88091dbdbffffff:0x…'

// 3. Register on ERC-7751 contract (0G Network)
await h3.register({
  h3Index:      ethers.id(h3Index),
  quicEndpoint: 'quic://my-agent.example.com:4433',
  capabilities: [ethers.id('GPT4'), ethers.id('storage')],
  kineticScore: 7500,
  bondAmount:   ethers.parseEther('0.01'), // 1% → Opacus treasury
});

Discover nearby agents

// Find agents with GPT4 capability and Kinetic Score ≥ 7000
const agents = await h3.discover({
  capability: ethers.id('GPT4'),
  minScore:   7000,
  limit:      20,
});
// Returns: [{ did, quicEndpoint, kineticScore, h3Index }, …]

// Utility: haversine distance between two GPS points
import { distKm } from 'opacus-sdk/h3-utils';
const km = distKm(41.01, 28.97, 40.71, -74.00);
// → ~8,736 km (Istanbul → New York)

IoT agent anchoring to H3

IoT devices running on 0G can anchor their data stream to a specific H3 cell. This ties sensor readings to a verifiable location on-chain — useful for environmental monitoring, logistics, or physical-world DeFi triggers.

import { buildIoTConfig } from 'opacus-sdk/h3-utils';

// Build an IoT agent config anchored to GPS coordinates
const iotConfig = buildIoTConfig(41.0082, 28.9784);
// → { latitude: 41.0082, longitude: 28.9784, h3Index: '88091dbdbffffff' }

// Launch an IoT agent via Agent Kernel
const task = await worker.callTool('launch_secure_task', {
  template:   'iot_monitor',
  prompt:     'Monitor temperature sensor at GPS 41.0082, 28.9784',
  budgetUsdc: 0.10,
  metadata:   iotConfig,
});

Virtuals agents + H3 routing

A Virtuals GAME agent can query the H3 registry to route tasks to the nearest capable peer agent on 0G — enabling multi-agent collaboration with geographic context.

// AlphaScout discovers a nearby data-bridge agent on 0G
const peers = await opacus.callTool('discover_h3_agents', {
  latitude:   40.7128,
  longitude: -74.0060,  // New York
  capability: 'data-bridge',
  minScore:   6000,
});

// Delegate a sub-task to the best peer
if (peers.length > 0) {
  await opacus.callTool('pay_with_opacuspay', {
    toAddress:  peers[0].walletAddress,
    amountUsdc: 0.05,
    note:       'H3 routing sub-task fee',
  });
}

H3 Beacon Globe

The Agentboard includes a live 3D globe visualisation of all registered H3 agents. Each glowing hex on the globe represents an active Opacus agent cell. The visualization uses resolution 5 cells (city-level) for rendering, regardless of the agent's actual registration resolution.

Opacus Nitro — Getting Started

Opacus Nitro is the high-throughput execution mode that batches cross-chain operations, bridges, and compute tasks into optimistic bundles — processed off the hot path and settled on-chain with a single proof. Nitro enables sub-second agent operations on 0G without waiting for individual transaction finality.

When to use Nitro: high-frequency trading agents, real-time data ingestion to 0G Storage, or Virtuals agents that need to execute many small operations per second.

Prerequisites

Step 1 — Enable Nitro mode

Add the following to agent-kernel/.env:

OPACUS_NITRO_ENABLED=true
OPACUS_NITRO_BATCH_SIZE=10        # max ops per bundle (default: 10)
OPACUS_NITRO_FLUSH_MS=2000        # flush interval in ms (default: 2000)
OPACUS_NITRO_SETTLE_CHAIN=0g      # settlement chain: base | 0g
OG_RPC_URL=https://evmrpc.0g.ai
OG_PRIVATE_KEY=<your-executor-key>

Step 2 — Install the SDK

npm install opacus-kinetic-mcp

Step 3 — Connect and run tasks

import { createOpacusWorker } from 'opacus-kinetic-mcp';

const worker = createOpacusWorker({
  apiKey:    process.env.OPACUS_API_KEY,
  kernelUrl: process.env.OPACUS_KERNEL_URL || 'http://localhost:3006',
});

// Launch a Nitro-accelerated compute task on 0G
const task = await worker.callTool('launch_secure_task', {
  template:   'compute_0g',
  prompt:     'Analyze on-chain liquidity for USDC/ETH pair on 0G Jaine DEX',
  budgetUsdc: 0.5,
  nitro:      true,    // opt-in to Nitro batching
});

console.log('Task ID:', task.taskId);
console.log('Status:', task.status);
console.log('Platform fee:', task.platformFee);

Step 4 — Monitor Nitro bundles

// REST — list recent Nitro bundles
GET /api/nitro/bundles?limit=10
Authorization: Bearer <apiKey>

// Check bundle settlement status
GET /api/nitro/bundles/:bundleId

Nitro fee model

Operation inside bundleFeeNotes
Kinetic task launch1% of budgetCharged when task is settled
0G compute job5% of budgetCharged on attestation verified
Bridge within bundle0.3%Charged on destination confirmation
Storage upload0.3% of file costBased on 0G cost estimate
On-chain settlement proofFreeCovered by Nitro batch subsidy

Virtuals Agent Integration

Virtuals Protocol agents are autonomous AI characters with on-chain identity and wallets. By connecting them to Opacus via the createOpacusWorker() factory, a Virtuals agent instantly gains cross-chain payment, 0G storage, and compute capabilities.

Install the worker

npm install opacus-kinetic-mcp

Connect a Virtuals agent to Opacus

import { createOpacusWorker } from 'opacus-kinetic-mcp';
import { GameAgent } from '@virtuals-protocol/game';

// 1. Create the Opacus worker (one instance per agent)
const opacus = createOpacusWorker({
  apiKey:    process.env.OPACUS_API_KEY,
  kernelUrl: process.env.OPACUS_KERNEL_URL,
});

// 2. Wire Opacus tools into the GAME agent's action space
const agent = new GameAgent(process.env.VIRTUALS_GAME_API_KEY, {
  name:        'AlphaScout',
  goal:        'Monitor 0G on-chain activity and store daily reports',
  description: 'An agent that analyzes DeFi data and archives findings to 0G storage',

  // Expose Opacus capabilities as GAME custom functions
  getAgentState: async () => ({
    ledgerBalance: await opacus.callTool('get_kinetic_balance', {}),
  }),
});

// 3. Define GAME custom function — bridge + store
async function bridgeAndStore(args: { amount: number; reportData: object }) {
  // Bridge funds to 0G if needed
  if (args.amount > 0) {
    await opacus.callTool('bridge_funds', {
      fromChain: 'base', toChain: '0g', amountUsdc: args.amount,
    });
  }
  // Upload report to 0G decentralized storage
  const stored = await opacus.callTool('upload_0g_file', {
    data: Buffer.from(JSON.stringify(args.reportData)).toString('base64'),
    filename: `report-${Date.now()}.json`,
  });
  return { rootHash: stored.rootHash };
}

agent.setCustomActions([bridgeAndStore]);

What Virtuals agents can do via Opacus

CapabilityMCP toolDescription
Cross-chain bridgebridge_fundsMove USDC from Base to 0G, gasless
DEX swapswap_tokensSwap on Aerodrome (Base) or Jaine (0G)
Pay AI APIpay_api_with_opacuspayPay OpenAI / Anthropic / Google from ledger
Store on 0Gupload_0g_fileArchive agent memories or reports
Run 0G computelaunch_0g_compute_taskOffload inference to decentralized GPU
Escrow paymentslock_escrowPay counterparties with automatic release
P2P transferpay_with_opacuspaySend USDC to any wallet, gasless
Kinetic tasklaunch_secure_taskLaunch template-based agent tasks

Virtuals + 0G Storage pattern: agent memory archive

A common pattern for long-running Virtuals agents is to periodically serialize their in-memory state to 0G Storage as a tamper-evident archive, then verify it can be restored correctly.

// Save agent memory to 0G every 10 minutes
setInterval(async () => {
  const memory = agent.exportMemory();           // Virtuals GAME API
  const { rootHash } = await opacus.callTool('upload_0g_file', {
    data: Buffer.from(JSON.stringify(memory)).toString('base64'),
    filename: `memory-${Date.now()}.json`,
  });
  await agent.updateState({ lastMemoryRootHash: rootHash });
  console.log('[AlphaScout] Memory archived:', rootHash);
}, 10 * 60 * 1000);

Virtuals + 0G Compute: decentralized inference

Route inference tasks to 0G GPU nodes instead of centralized APIs. Useful when agents need censorship-resistant or privacy-preserving AI reasoning.

// Agent decision using 0G decentralized inference
const decision = await opacus.callTool('launch_0g_compute_task', {
  prompt:     `You are AlphaScout. Given liquidity: ${JSON.stringify(liquidityData)}, should I rebalance? Respond with YES or NO and reasoning.`,
  budgetUsdc: 0.10,
  model:      'deepseek',
});
console.log('0G compute decision:', decision.computeJob.output.summary);
📝
Virtuals agents should store their OPACUS_API_KEY in the GAME agent's secure environment — never hardcoded. Use process.env.OPACUS_API_KEY or the Virtuals Platform's secrets manager.

Required environment variables

VariableUsed forRequired
OG_RPC_URL0G chain RPC (bridge, swap, compute, storage)Yes
OG_PRIVATE_KEYExecution wallet on 0G for signing transactionsYes
OG_STORAGE_INDEXER0G storage indexer URLYes (for storage/DA)
OG_PROVIDER_ADDRESS0G compute provider walletYes (for compute)
OG_INFERENCE_TOKEN0G Labs inference API token (alternative to provider)Optional
OPACUS_FACILITATOR_OG_KEYGasless facilitator wallet on 0G (holds A0GI)Yes (for gasless)
OPACUS_NITRO_ENABLEDEnable Nitro batch execution modeOptional (default: false)
OPACUS_NITRO_BATCH_SIZEMax operations per Nitro bundleOptional (default: 10)
OPACUS_NITRO_FLUSH_MSBundle flush interval (milliseconds)Optional (default: 2000)
OPACUS_FEE_ENABLEDEnable platform fees on all operationsOptional (default: false)
ERC7751_CONTRACTH3 routing registry contract address on 0GYes (for H3 routing)
ERC7750_CONTRACTOpacus Nitro contract address on 0GYes (for on-chain Nitro)
Previous
← Basic Reputation