Skip to main content

0G Integration

ClawMind’s production path is built on the 0G stack: LLM agent inference uses 0G Compute, reports and memory receipts use 0G Storage, and report hashes are anchored on 0G Chain. Local fallbacks exist only for development or misconfigured deployments, and they are surfaced as fallback providers in the API.
All integrations run on 0G Mainnet (Chain 16661). The active v4 signed registry is 0x24bAAC6720ae5B01A1CC90eCC1C15AFcb903E121.

Component Map


0G Compute

ClawMind routes LLM agent inference through the 0G Router. Memory retrieval and memory writing use local embeddings plus 0G Storage, while Planner, Researcher, Risk, Architect, Critic, and Final use the router. The LLM-backed agents share the same router endpoint. The router handles model dispatch and load balancing across 0G Compute nodes. How to verify compute is active:
Look for "integration": { "compute": { "provider": "0G_COMPUTE", "status": "active" } } in the response. If the provider is LOCAL_FALLBACK, the router key or endpoint is missing.

0G Storage — Reports

After the Final agent produces a report, ClawMind serialises it to JSON and uploads it to 0G Storage. The storage layer returns two identifiers:
  • Root hash — a content-addressed hash of the report JSON
  • 0g:// URI — a permanent reference in the format 0g://<root-hash>
Both are shown in the Integrity Panel after every run and are included in the on-chain transaction. Retrieve a report by URI:
Retrieve a report by root hash:
If ZERO_G_STORAGE_ENABLED is not set to true, reports are returned in-memory only and are not persisted. The on-chain anchoring step will also fail.

0G Storage — Memory

ClawMind maintains a persistent memory index across runs. After the Final agent writes its report, the Memory writer agent compresses the key findings into a structured memory entry and appends it to the index. On the next run, Step 1 (Memory retrieval) performs semantic search over this index and injects the most relevant past analyses into the Planner’s context. How to verify memory is active:
Look for "memory": { "semanticRetrievalActive": true } in the response. The memory index receipt is shown in the UI separately from the report receipt. Both receipts include a 0g:// URI.

0G Chain

The most critical integrity layer. After the report is stored on 0G Storage, ClawMind submits an on-chain transaction to AnalysisRegistry.sol on 0G Chain (Chain 16661). The transaction records: Contract address:

View on 0G Explorer

Inspect all recorded analyses, transaction hashes, and operator signatures.
How EIP-712 signing works: The operator wallet signs a typed data payload before every recordAnalysis call. This means every on-chain entry is:
  1. Tied to a specific operator address
  2. Verifiable without trusting the ClawMind backend
  3. Detectable if tampered — a changed report hash will not match the stored signature
Environment variables:
ZERO_G_ALLOW_LEGACY_REGISTRY_WRITES must be false in production. Setting it to true bypasses EIP-712 signing and produces unauthenticated writes.
Earlier v3 registry deployments are historical. The public app, /stats, /api/judge, /analysis, and the MCP flow all use the v4 signed registry above.

OpenClaw Manifest

ClawMind exposes an OpenClaw manifest — a machine-readable description of the agent pipeline, its artifacts, and its security policies. This makes ClawMind composable with other agent systems in the 0G ecosystem.
The JSON format includes live evidence fields: the current contract address, pipeline step count, memory status, and recent analyses — all pulled at request time. The manifest is defined in openclaw.yaml at the root of the repository.

Full Verification Checklist

Run these checks to confirm all four 0G integrations are live:

Deploying the Registry

If you are self-hosting ClawMind and need to deploy your own AnalysisRegistry.sol:
The deployer wallet is automatically authorised as the first EIP-712 operator. Replace ZERO_G_ANALYSIS_REGISTRY_ADDRESS in your .env with the deployed address.