Overview
xNUWA integrates with ERC8004 to discover and load agents that are registered on-chain. ERC8004 defines a standard registry interface that links an on-chain owner to off-chain service metadata (like endpoints and content identifiers). This lets clients resolve agents permissionlessly and verify provenance.How It Works In xNUWA
- Discovery: xNUWA can resolve ERC8004 records to fetch agent metadata, complementing the local
agent-registry/during development. - Provenance: Because entries are owned on-chain, users can verify who published an agent before running it.
- Payments: ERC8004 covers registration and discovery; payments continue to use x402 receipts. Your MCP tools or HTTP gateways still advertise x402
paymentRequirementsand settle normally.
Register Your Agent
Use the Nuwa ERC8004 reference implementation to register agents on-chain: Typical flow (high level):- Prepare your Agent Registration JSON and host it to obtain a URI (ipfs://… preferred, or a Gist raw https URL). Keep the URI and your service endpoint ready.
- Use the ERC8004 contract/SDK to create or update your registry entry, pointing to your content and owner address.
- Verify the entry on-chain, then test discovery in xNUWA.
During development, keep your Agent JSON in
agent-registry/ for quick iteration. When you are ready for wider discovery, register via ERC8004.End-to-end steps (deploy → publish → register)
- Deploy a registry using
nuwa-8004and note the contract address. - Open the contract on the appropriate blockchain explorer (BaseScan/Blockscout for your network) and switch to the Write tab.
- Prepare your Agent Registration JSON (see structure below), upload it to IPFS (preferred) or GitHub Gist, and copy the resulting URI.
- Call the registry
registerfunction and provide the hosted JSON link as the token URI; submit the transaction. - To make xNUWA auto-discover your registry by default, submit a PR to the
xnuwa.apprepo updating the8004-registries.config.jsonfile(s) with your network and registry address.
Nuwa Agent Registration JSON Schema (standard)
Nuwa-Compatible Agents follows the official ERC-8004 registration standard. register with a single JSON file. YAML is no longer supported. Use the following structure:Troubleshooting
- If an agent fails to load from ERC8004, confirm the registration URI (IPFS/Gist) is accessible and the metadata schema matches the current Agent registration format.
- Ensure the registry you publish to is supported by your target network (e.g., Base / Base Sepolia) and that xNUWA is pointed at the same network.
- Payments are unaffected by registry status—verify your x402 flow independently using the paid MCP/HTTP examples.

