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:
- 0G Storage — Distributed file storage with on-chain Merkle proof verification
- 0G Compute — Decentralized GPU inference for AI chat and image generation
Networks
| Network | RPC | Chain ID | Storage Indexer |
|---|---|---|---|
| Aristotle Mainnet (default) | https://evmrpc.0g.ai | 16661 | https://indexer-storage-turbo.0g.ai |
| Galileo Testnet | https://evmrpc-testnet.0g.ai | 16602 | https://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
- Agent Kernel uploads file data to 0G storage nodes via the 0G SDK
- Storage is confirmed on-chain with a Merkle root hash (
rootHash) - Files are retrieved later using only the
rootHash - Integrity is verifiable via
verify_0g_merkleat any time
Save the
rootHash returned after upload — it is the only identifier for your file. There is no filename-based lookup.MCP tools
| Tool | Parameters | Returns |
|---|---|---|
upload_0g_file | filePath or data (base64) | rootHash, txHash |
download_0g_file | rootHash | File data or local path |
verify_0g_merkle | rootHash | valid: 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
| Tool | Description | Notes |
|---|---|---|
stream_0g_chat | Chat completion via 0G GPU network | Streams response tokens |
generate_0g_image | Text-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
| Variable | Description | Required |
|---|---|---|
OG_RPC_URL | 0G EVM RPC endpoint | Yes |
OG_STORAGE_INDEXER | 0G storage indexer URL | Yes (for storage) |
OG_PRIVATE_KEY | Executor wallet private key for signing 0G transactions | Yes |
OG_PROVIDER_ADDRESS | 0G compute provider wallet address | Yes (for compute) |
OG_INFERENCE_TOKEN | 0G Labs inference API token (alternative to provider address) | Optional |