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
Network Contract Addresses
peaq (Mainnet)
agung (Testnet)
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
What ERC-8004 Enables
ERC-8004 introduces three core registries that work together:| Component | Purpose |
|---|---|
| Identity Registry | Agent identity and discoverability |
| Reputation Registry | Trust and feedback between agents |
| Validation Registry | Verifiable claims and capability checks |
- Discover other agents
- Evaluate trustworthiness
- Record interaction outcomes
- Validate capabilities before transacting
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
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
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
How AI Agents Use ERC-8004
An AI agent operating on peaq typically follows this lifecycle:- Register identity: The agent publishes metadata and endpoints via the Identity Registry.
- Become discoverable: Other agents can query and find the agent.
- Interact with other agents: Agents exchange services, data, or value.
- Record reputation: Agents leave feedback on interactions.
- Validate capabilities: Agents can request or respond to validation checks.
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 filed calledregister-agent.js and add the following code:
node register-agent.js
2. Query Your Agent
Create a filed calledquery-agent.js and add the following code:
node query-agent.js. Make sure you get the agentId from the register-agent.js script.
3. Update Agent Metadata
Create a filed calledupdate-agent-metadata.js and add the following code:
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 filed calledgive-feedback.js and add the following code:
node give-feedback.js.
2. Read Reputation Back
Create a filed calledread-reputation.js and add the following code:
node read-reputation.js.
Validation Request + Response
Your ValidationRegistry flow is:-
Someone creates a request:
validationRequest(validatorAddress, agentId, requestURI, requestHash) -
The validator responds:
validationResponse(requestHash, response, responseURI, responseHash, tag) -
Anyone can query:
getValidationStatus(requestHash) or getSummary(agentId, validators, tag)
1. Validation Request
Create a filed calledvalidation-request.js and add the following code:
node validation-request.js. Make sure to record the requestHash which will be used in the validation response.
2. Validation Response
Create a filed calledvalidation-response.js and add the following code:
node validation-response.js.
3. Read Validation Status + Summary
Create a filed calledread-validation-status.js. Add the following code, and make sure the validator address is set to the one set in the validation request.
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
- 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

