← 返回 Skills 市场
san-npm

8004

作者 San Clemente · GitHub ↗ · v1.0.2001 · MIT-0
cross-platform ⚠ suspicious
324
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install 8004
功能描述
ERC-8004 Agent Trust Protocol for AI agent identity, reputation, and validation on Celo. Use when building AI agents that need identity registration, reputat...
使用说明 (SKILL.md)

ERC-8004: Agent Trust Protocol

ERC-8004 establishes trust infrastructure for autonomous AI agents, enabling them to discover, identify, and evaluate other agents across organizational boundaries.

When to Use

  • Registering an AI agent's identity on-chain
  • Building reputation systems for AI agents
  • Verifying agent identity before interactions
  • Querying agent reputation and feedback
  • Implementing trust-based agent interactions

Core Concepts

The Three Registries

Registry Purpose Key Functions
Identity Registry Agent discovery via ERC-721 NFTs register(), agentURI()
Reputation Registry Feedback and attestations giveFeedback(), getSummary()
Validation Registry Verification hooks Custom validators

Protocol Stack Position

Application Layer (Agent Apps, Marketplaces)
    ↓
Trust Layer (ERC-8004) ← This skill
    ↓
Payment Layer (x402)
    ↓
Communication Layer (A2A, MCP)

Installation

# JavaScript/TypeScript
npm install @chaoschain/sdk

# Python
pip install chaoschain-sdk

Contract Addresses

Celo Mainnet

Contract Address
Identity Registry Coming Soon (Q1 2026)
Reputation Registry Coming Soon (Q1 2026)

Celo Sepolia (Testnet)

Contract Address
Identity Registry Coming Soon
Reputation Registry Coming Soon

Agent Registration

1. Create Registration File

Create an agent registration file describing endpoints and capabilities:

{
  "type": "Agent",
  "name": "My AI Agent",
  "description": "Description of capabilities",
  "image": "ipfs://Qm...",
  "endpoints": [
    {
      "type": "a2a",
      "url": "https://example.com/.well-known/agent.json"
    },
    {
      "type": "mcp",
      "url": "https://example.com/mcp"
    },
    {
      "type": "wallet",
      "address": "0x...",
      "chainId": 42220
    }
  ],
  "supportedTrust": ["reputation", "validation", "tee"]
}

2. Upload to IPFS

import { upload } from "@chaoschain/sdk";

const agentMetadata = {
  type: "Agent",
  name: "My AI Agent",
  description: "AI agent for DeFi operations",
  // ...
};

const agentURI = await upload(agentMetadata);
// Returns: ipfs://QmYourRegistrationFile

3. Register Agent

import { IdentityRegistry } from '@chaoschain/sdk';
import { createPublicClient, http } from 'viem';
import { celo } from 'viem/chains';

const client = createPublicClient({
  chain: celo,
  transport: http('https://forno.celo.org'),
});

const registry = new IdentityRegistry(client);

// Register and get agent ID
const tx = await registry.register(agentURI);
const agentId = tx.events.Transfer.returnValues.tokenId;

console.log('Agent registered with ID:', agentId);

Reputation System

Give Feedback

import { ReputationRegistry } from '@chaoschain/sdk';

const reputation = new ReputationRegistry(client);

await reputation.giveFeedback(
  agentId,           // Agent ID to review
  85,                // score (0-100)
  0,                 // decimals
  'starred',         // tag1: category
  '',                // tag2: optional
  'https://agent.example.com',  // endpoint used
  'ipfs://QmDetailedFeedback',  // detailed feedback URI
  feedbackHash       // keccak256 of feedback content
);

Common Feedback Tags

Tag Measures Example
starred Quality rating (0-100) 87/100
uptime Endpoint uptime % 99.77%
successRate Task success rate % 89%
responseTime Response time (ms) 560ms
reachable Endpoint reachable true/false

Query Reputation

// Get all feedback for an agent
const feedback = await reputation.readAllFeedback(agentId);

// Get aggregated summary
const summary = await reputation.getSummary(agentId);
console.log('Average rating:', summary.averageScore);
console.log('Total reviews:', summary.totalFeedback);

Trust Verification Workflow

import { IdentityRegistry, ReputationRegistry } from '@chaoschain/sdk';

async function verifyAndInteract(targetAgentId, minReputation = 70) {
  // 1. Verify identity
  const identity = await identityRegistry.getAgent(targetAgentId);
  if (!identity) {
    throw new Error('Agent not registered');
  }

  // 2. Check reputation
  const summary = await reputationRegistry.getSummary(targetAgentId);
  if (summary.averageScore \x3C minReputation) {
    throw new Error(`Agent reputation ${summary.averageScore} below threshold ${minReputation}`);
  }

  // 3. Get endpoint
  const agentData = await fetch(identity.agentURI).then(r => r.json());
  const endpoint = agentData.endpoints.find(e => e.type === 'a2a');

  // 4. Interact with verified agent
  const result = await interactWithAgent(endpoint.url);

  // 5. Submit feedback
  await reputationRegistry.giveFeedback(
    targetAgentId,
    result.success ? 90 : 30,
    0,
    result.success ? 'starred' : 'failed',
    '',
    endpoint.url,
    '',
    ''
  );

  return result;
}

Integration with x402 Payments

ERC-8004 and x402 work together for trustworthy paid agent interactions:

import { IdentityRegistry, ReputationRegistry } from '@chaoschain/sdk';
import { wrapFetchWithPayment } from 'thirdweb/x402';

async function payTrustedAgent(agentId, serviceUrl) {
  // 1. Verify trust
  const summary = await reputationRegistry.getSummary(agentId);
  if (summary.averageScore \x3C 80) {
    throw new Error('Agent not trusted enough for payment');
  }

  // 2. Make paid request
  const fetchWithPayment = wrapFetchWithPayment({
    client,
    account,
    paymentOptions: { maxValue: "1000000" },
  });

  const response = await fetchWithPayment(serviceUrl);
  return response.json();
}

Use Cases

DeFi Trading Agents

Verify strategy agents before delegating funds:

const strategyAgents = await identityRegistry.searchByCapability('defi-trading');
const trustedAgents = [];

for (const agent of strategyAgents) {
  const summary = await reputationRegistry.getSummary(agent.id);
  if (summary.averageScore >= 85 && summary.totalFeedback >= 100) {
    trustedAgents.push(agent);
  }
}

Multi-Agent Workflows

Coordinate trusted agents for complex tasks:

const workflow = {
  research: await findTrustedAgent('research', 80),
  analysis: await findTrustedAgent('analysis', 85),
  execution: await findTrustedAgent('execution', 90),
};

// Execute with trust-verified agents
await executeWorkflow(workflow);

Validation Registry

For high-stakes operations, use Validation Registry for additional verification:

Model Mechanism Best For
Reputation-based Client feedback Low-stake, frequent
Crypto-economic Stake + slashing Medium-stake financial
zkML Zero-knowledge proofs Privacy-preserving
TEE Attestation Hardware isolation High-assurance

Celo Network Reference

Network Chain ID RPC Endpoint
Celo Mainnet 42220 https://forno.celo.org
Celo Sepolia 11142220 https://forno.celo-sepolia.celo-testnet.org

Additional Resources

Related Skills

  • x402 - Payment layer for AI agents
  • celo-rpc - Celo blockchain interaction
  • viem - TypeScript Ethereum library
安全使用建议
This skill appears to document a legitimate protocol for agent identity and reputation on Celo, but stop before installing or wiring credentials. Questions and actions to consider before use: - Verify the package authors and package names (@chaoschain/sdk, thirdweb/x402) on npm/PyPI/GitHub — the SKILL.md author field claims 'celo-org' but the skill source is unknown; this could be impersonation. - The examples perform on-chain registration and payments, which require a signer/private key. The skill declares no required env vars — do not paste private keys into an agent or supply secrets until you confirm how the signer should be provided (hardware wallet, secure signer service, or environment variables kept out of the agent runtime). - Expect the agent to fetch and POST to external endpoints (agent endpoints, IPFS gateways, payment endpoints). Only allow interaction with endpoints you trust; consider network isolation or request whitelists. - If you plan to use this for production, validate the SDK codebase and registry contract addresses (the SKILL.md lists many addresses as "Coming Soon"). Ask the skill author for provenance (repo URL, release signatures) and explicit guidance on signing/credential handling. - If you want a safer test, use read-only flows (querying reputation on a testnet) with a public client and avoid any registration/transaction steps until you confirm secure signer integration.
功能分析
Type: OpenClaw Skill Name: 8004 Version: 1.0.2001 The skill bundle provides documentation and code examples for the ERC-8004 Agent Trust Protocol on the Celo blockchain, facilitating agent identity registration and reputation management. It includes standard integration patterns using the `viem` library and the `@chaoschain/sdk` (npm/pip). No indicators of data exfiltration, malicious execution, or harmful prompt injection were found in SKILL.md or _meta.json.
能力评估
Purpose & Capability
The name/description (ERC-8004 agent trust on Celo) align with the SKILL.md content: identity/reputation/validation registries, IPFS metadata, on-chain registration, reputation queries, and x402 payment integration. Libraries referenced (viem, Celo chain, an SDK) are plausible for this purpose.
Instruction Scope
The instructions include registering agents on-chain, uploading metadata to IPFS, sending transactions (registry.register), and making paid requests (wrapFetchWithPayment). These runtime steps require signing transactions, private key management, and network calls to external endpoints (agent endpoints, IPFS gateways, payment wrappers). The SKILL.md does not document how signing/keys are provided or how to safely handle them; it also instructs fetching and interacting with arbitrary agent endpoints, which is expected for the purpose but increases data exposure risk.
Install Mechanism
The SKILL.md suggests installing @chaoschain/sdk via npm/pip. No install spec is embedded in the skill bundle (instruction-only), so nothing will be written by default. Installing third-party SDKs is normal but the specific package names should be verified (author/registry/trustworthiness).
Credentials
The skill declares no required environment variables or primary credential, yet the examples perform on-chain registration, which normally requires a signer (private key, wallet, or connected signer service) and payment flow integration. This mismatch (no declared env/config for signing credentials) is a functional and security gap: the skill will need credentials in practice, and the SKILL.md does not advise how to supply them safely.
Persistence & Privilege
The skill is instruction-only with no install spec and does not request always:true. It does not request persistent system-level privileges or attempt to modify other skills' configs. Autonomous invocation is enabled by default (normal) but not combined here with other excessive privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install 8004
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /8004 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2001
Initial publish
元数据
Slug 8004
版本 1.0.2001
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

8004 是什么?

ERC-8004 Agent Trust Protocol for AI agent identity, reputation, and validation on Celo. Use when building AI agents that need identity registration, reputat... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 324 次。

如何安装 8004?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install 8004」即可一键安装,无需额外配置。

8004 是免费的吗?

是的,8004 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

8004 支持哪些平台?

8004 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 8004?

由 San Clemente(@san-npm)开发并维护,当前版本 v1.0.2001。

💬 留言讨论