Docs / Integrations
Integrations

0G Network

Decentralized storage and GPU inference by 0G Labs — integrated natively into Opacus for verifiable file storage and AI compute.

What is 0G?

0G is a decentralized AI infrastructure network providing two core services:

Networks

NetworkRPCChain IDStorage Indexer
Aristotle Mainnet (default)https://evmrpc.0g.ai16661https://indexer-storage-turbo.0g.ai
Galileo Testnethttps://evmrpc-testnet.0g.ai16602https://indexer-storage-testnet-turbo.0g.ai
📝
Opacus defaults to 0G Mainnet (Aristotle). Set OG_RPC_URL and OG_STORAGE_INDEXER to testnet values for development.

0G Storage

How it works

  1. Agent Kernel uploads file data to 0G storage nodes via the 0G SDK
  2. Storage is confirmed on-chain with a Merkle root hash (rootHash)
  3. Files are retrieved later using only the rootHash
  4. Integrity is verifiable via verify_0g_merkle at any time
⚠️
Save the rootHash returned after upload — it is the only identifier for your file. There is no filename-based lookup.

MCP tools

ToolParametersReturns
upload_0g_filefilePath or data (base64)rootHash, txHash
download_0g_filerootHashFile data or local path
verify_0g_merklerootHashvalid: true/false, block details

Example prompts (Claude)

"Upload the file /data/report.pdf to 0G decentralized storage"
"Download 0G file with root hash 0xabc123def456..."
"Verify that 0G file 0xabc123 is still intact"

Agent template

Use storage_0g template in Launch Agent. Example from Claude:

"Launch a 0G storage agent with 0.5 USDC budget and upload /tmp/data.csv"

0G Compute (AI inference)

How it works

0G Compute routes inference requests to decentralized GPU providers on the 0G network. Provider selection is based on reputation and availability. Opacus uses 0G Compute as a fallback when OpenClaw is unavailable.

MCP tools

ToolDescriptionNotes
stream_0g_chatChat completion via 0G GPU networkStreams response tokens
generate_0g_imageText-to-image generation (Flux Turbo)Returns image URL or base64

Example prompts

"Use 0G AI to analyze market trends for ETH and BTC"
"Generate an image of a futuristic decentralized city using 0G AI"

Required environment variables

VariableDescriptionRequired
OG_RPC_URL0G EVM RPC endpointYes
OG_STORAGE_INDEXER0G storage indexer URLYes (for storage)
OG_PRIVATE_KEYExecutor wallet private key for signing 0G transactionsYes
OG_PROVIDER_ADDRESS0G compute provider wallet addressYes (for compute)
OG_INFERENCE_TOKEN0G Labs inference API token (alternative to provider address)Optional
Previous
← Escrow System