From abstract-skills
Registers AI agents onchain, queries reputation, and gives feedback using ERC-8004 IdentityRegistry and ReputationRegistry on Abstract mainnet.
How this skill is triggered — by the user, by Claude, or both
Slash command
/abstract-skills:erc8004-on-abstractThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
ERC-8004 gives AI agents onchain identity and reputation on Abstract. Agents mint an NFT identity, publish a metadata URI describing their capabilities, and accumulate reputation feedback from clients who use them.
ERC-8004 gives AI agents onchain identity and reputation on Abstract. Agents mint an NFT identity, publish a metadata URI describing their capabilities, and accumulate reputation feedback from clients who use them.
Abstract has the IdentityRegistry and ReputationRegistry deployed on mainnet. For the full deployed contract list, see connecting-to-abstract skill → references/deployed-contracts.md.
| Contract | Address |
|---|---|
| IdentityRegistry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
| ReputationRegistry | 0x8004BAa17C55a88189AE136b182e5fdA19dE9b63 |
import { createWalletClient, http } from "viem";
import { abstract } from "viem/chains";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const client = createWalletClient({ account, chain: abstract, transport: http() });
const agentId = await client.writeContract({
address: "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432",
abi: [{ name: "register", type: "function", stateMutability: "nonpayable", inputs: [{ name: "agentURI", type: "string" }], outputs: [{ name: "agentId", type: "uint256" }] }],
functionName: "register",
args: ["https://your-agent.com/agent.json"],
});
The agentURI points to a JSON file describing your agent. See references/agent-uri-schema.md for the schema.
import { createPublicClient, http } from "viem";
import { abstract } from "viem/chains";
const client = createPublicClient({ chain: abstract, transport: http() });
const [count, summaryValue, decimals] = await client.readContract({
address: "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
abi: [{ name: "getSummary", type: "function", stateMutability: "view", inputs: [{ name: "agentId", type: "uint256" }, { name: "clientAddresses", type: "address[]" }, { name: "tag1", type: "string" }, { name: "tag2", type: "string" }], outputs: [{ name: "count", type: "uint64" }, { name: "summaryValue", type: "int128" }, { name: "summaryValueDecimals", type: "uint8" }] }],
functionName: "getSummary",
args: [22n, [], "starred", ""],
});
Pass specific clientAddresses to filter by trusted reviewers, or [] for all feedback.
await client.writeContract({
address: "0x8004BAa17C55a88189AE136b182e5fdA19dE9b63",
abi: [{ name: "giveFeedback", type: "function", stateMutability: "nonpayable", inputs: [{ name: "agentId", type: "uint256" }, { name: "value", type: "int128" }, { name: "valueDecimals", type: "uint8" }, { name: "tag1", type: "string" }, { name: "tag2", type: "string" }, { name: "endpoint", type: "string" }, { name: "feedbackURI", type: "string" }, { name: "feedbackHash", type: "bytes32" }], outputs: [] }],
functionName: "giveFeedback",
args: [
22n, // agentId
85n, // value (e.g. 85/100 rating)
0, // valueDecimals
"starred", // tag1 — category
"", // tag2 — subcategory (optional)
"https://agent.example.com/GetPrice", // endpoint used
"", // feedbackURI — link to off-chain evidence (optional)
"0x0000000000000000000000000000000000000000000000000000000000000000", // feedbackHash
],
});
| Goal | Registry | Function |
|---|---|---|
| Give an agent an onchain identity | IdentityRegistry | register(agentURI) |
| Update agent metadata/URI | IdentityRegistry | setAgentURI(agentId, newURI) |
| Set a payment wallet for an agent | IdentityRegistry | setAgentWallet(agentId, wallet, deadline, sig) |
| Store key-value metadata | IdentityRegistry | setMetadata(agentId, key, value) |
| Rate an agent after using it | ReputationRegistry | giveFeedback(...) |
| Check an agent's reputation score | ReputationRegistry | getSummary(agentId, clients, tag1, tag2) |
| Read individual feedback entries | ReputationRegistry | readAllFeedback(...) |
| Revoke feedback you gave | ReputationRegistry | revokeFeedback(agentId, feedbackIndex) |
| Discover agents | IdentityRegistry | Enumerate via ERC-721 tokenURI |
| tag1 | What it measures | Example value | decimals |
|---|---|---|---|
starred | Quality rating (0-100) | 87 | 0 |
uptime | Endpoint uptime (%) | 9977 (99.77%) | 2 |
responseTime | Response latency (ms) | 560 | 0 |
tradingYield | Yield (tag2=day/week/month) | -32 (-3.2%) | 1 |
clientAddresses filtering is critical — passing [] returns all feedback including potential Sybil spam; pass trusted reviewer addresses for meaningful scoresagentWallet requires a signature — setting a payment wallet needs an EIP-712 or ERC-1271 signature proving wallet ownership| Topic | Where to look |
|---|---|
| Full IdentityRegistry functions | references/identity-registry.md |
| Full ReputationRegistry functions | references/reputation-registry.md |
| Agent registration JSON schema | references/agent-uri-schema.md |
| Abstract deployed contracts | connecting-to-abstract skill → references/deployed-contracts.md |
npx claudepluginhub abstract-foundation/abstract-skillsRegister AI agents on-chain using the ERC-8004 Trustless Agents standard. Manage agent identity as NFTs, build reputation through feedback, and request third-party validation.
References Ethereum standards including ERC-20, ERC-721, ERC-1155, ERC-4337, ERC-8004 for tokens, NFTs, agents. Details usage, interfaces, contracts, EIP-7702, x402.
Provides AI agents read access to Abstract chain data and balances via AGW MCP server (txns soon). Guides setup of agw-mcp for Claude Code and MCP agent workflows.