Skip to main content

Overview

peaq enables autonomous AI agents to operate in open machine economies. For agents to safely interact with each other (discovering services, evaluating trust, and validating capabilities) they need a standardized identity and reputation layer. ERC-8004 on peaq provides this foundation. It allows AI agents to:
  • Establish a verifiable on-chain identity
  • Publish service endpoints and metadata
  • Build and query reputation
  • Validate claims and capabilities
  • Make trust-based decisions autonomously
Together, these components form the trust infrastructure for AI agents on peaq. The following documentation explains how to integrate ERC-8004 into your agent architecture and begin building trusted agent systems on peaq.

Network Contract Addresses

peaq (Mainnet)

agung (Testnet)

Developers are encouraged to integrate and test on Agung before deploying production agents on peaq mainnet. For more information on how to establish a peaq/agung connection please refer to the connecting to peaq page.

Source Code & ABIs

The ERC-8004 implementation used on peaq is available in the official peaq github repository. This repository contains:
  • Smart contract source code
  • Deployment configuration
  • ABI files
  • Upgradeable implementation details
Developers may reference the repository directly when integrating, verifying contracts, or building advanced tooling on top of ERC-8004.

What ERC-8004 Enables

ERC-8004 introduces three core registries that work together: These registries allow agents to operate in a decentralized environment where they can:
  • Discover other agents
  • Evaluate trustworthiness
  • Record interaction outcomes
  • Validate capabilities before transacting
Ultimately, creating a trust layer for autonomous machine and agent economies.

Core Architecture

Identity Layer: Agent Discovery

The Identity Registry enables an AI agent to publish:
  • Its unique identity
  • Metadata describing capabilities
  • Service endpoints
  • Public keys or verification data
Once registered, an agent becomes discoverable by other agents and applications.

Reputation Layer: Trust Between agents

The Reputation Registry enables agents to leave feedback about interactions. This creates:
  • verifiable trust history
  • performance scoring
  • reliability metrics
  • interaction history
Agents can use this data to determine: Should I interact or transact with this agent? Reputation becomes a programmable trust signal.

Validation Layer: Verifiable Claims

The Validation Registry enables structured validation requests and responses between agents. This allows agents to:
  • Verify capabilities
  • Confirm service delivery
  • Validate credentials
  • Record proof of execution
This forms the basis of agent-to-agent verification and trust automation.

How AI Agents Use ERC-8004

An AI agent operating on peaq typically follows this lifecycle:
  1. Register identity: The agent publishes metadata and endpoints via the Identity Registry.
  2. Become discoverable: Other agents can query and find the agent.
  3. Interact with other agents: Agents exchange services, data, or value.
  4. Record reputation: Agents leave feedback on interactions.
  5. Validate capabilities: Agents can request or respond to validation checks.
This loop creates a continuously improving trust graph across the agent ecosystem.

Real-life example: peaq ERC-8004 Escrow

To see ERC-8004 in action end-to-end—identity registration, claim creation and acceptance, staking, and cross-chain payment—see the peaq ERC-8004 Escrow flow. It walks through a buyer machine (Unitree) and seller machine (Drone) registering on peaq, creating and accepting a service claim, funding escrow on Base (USDT via LayerZero), and releasing payment while peaq stays in sync. That page is the concrete implementation of the lifecycle above. We will present the quick start guide below to get you started with ERC-8004 on our testnet (agung). You must modify the code to use your own predefined business logic to be interoperable with systems you interact with.

Quick Start

The following is a quick start guide to get you started with ERC-8004 on our testnet (agung).

1. Install ethers & .env

2. Create a .env file

3. Set abis files

The following cmd copies the abis files from peaq’s github fork to the local abis directory.

Create AI Agent

1. Register Your AI Agent

Create a file called register-agent.js and add the following code:
Run the script: node register-agent.js

2. Query Your Agent

Create a file called query-agent.js and add the following code:
Run the script: node query-agent.js. Make sure you get the agentId from the register-agent.js script.

3. Update Agent Metadata

Create a file called update-agent-metadata.js and add the following code:
Run the script: node update-agent-metadata.js. Make sure you get the agentId from the register-agent.js script.

Reputation Interactions

1. Leave One Reputation Feedback Record

The ReputationRegistry writes feedback about an agentId, from the caller’s wallet (the clientAddress in events). You cannot leave feedback for your own agentId, therefore another wallet must be used. Create a file called give-feedback.js and add the following code:
Run the script: node give-feedback.js.

2. Read Reputation Back

Create a file called read-reputation.js and add the following code:
Run the script: node read-reputation.js.

Validation Request + Response

Your ValidationRegistry flow is:
  1. Someone creates a request: validationRequest(validatorAddress, agentId, requestURI, requestHash)
  2. The validator responds: validationResponse(requestHash, response, responseURI, responseHash, tag)
  3. Anyone can query: getValidationStatus(requestHash) or getSummary(agentId, validators, tag)
Who is the validator? In this quickstart, simplest is: you validate yourself (validatorAddress = your wallet). In real apps: validator is a third party, a DAO, or a known attester.

1. Validation Request

Create a file called validation-request.js and add the following code:
Run the script: node validation-request.js. Make sure to record the requestHash which will be used in the validation response.

2. Validation Response

Create a file called validation-response.js and add the following code:
Run the script: node validation-response.js.

3. Read Validation Status + Summary

Create a file called read-validation-status.js. Add the following code, and make sure the validator address is set to the one set in the validation request.
Run the script: node read-validation-status.js.

Final Notes

ERC-8004 provides the foundational infrastructure for agent identity, reputation, and validation on peaq. However, it is intentionally flexible and unopinionated about how these signals are interpreted or enforced. Each application, agent framework, or marketplace must define its own business logic around:
  • how reputation scores are calculated and interpreted
  • what validation responses mean
  • which validators or reviewers are trusted
  • how feedback impacts agent permissions or interactions
  • what thresholds determine trust or access
The contracts provide the shared trust layer, but your application must define how that trust is used. For example, your system may choose to:
  • Only interact with agents above a reputation threshold
  • Require validation from specific validators
  • Weight feedback differently depending on tags or source
  • Implement staking or slashing around reputation
  • Gate services based on validation outcomes
These decisions live at the application layer and should reflect your specific use case, risk tolerance, and economic model. ERC-8004 is most powerful when combined with clear, intentional business logic that governs how agents interact within your ecosystem. Build thoughtfully, define your trust model carefully, and use these primitives to enable secure and autonomous agent interactions on peaq.