本文へスキップ
Skillpedia
APIとサーバー(バックエンド)7.0k · #13686

starknet-identity

できること

このスキルは、オンチェーンのアイデンティティ、メタデータ、評判のフィードバック、第三者の検証を伴い、AIエージェントをStarknetに登録する方法を示します。エージェントが検証可能なオンチェーンのアイデンティティを持つ必要がある開発者向けです。

使う場面

  • ✓AIエージェントをStarknetにオンチェーンのアイデンティティとして登録したいとき。
  • ✓エージェントのメタデータを更新したり、その評判のフィードバックを管理したりする必要があるとき。
  • ✓第三者の検証者にエージェントを評価させたいとき。

スキルのリンク

https://github.com/internet-court/internet-court-skill/blob/main/vendored/starknet/starknet-identity/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/internet-court/internet-court-skill/blob/main/vendored/starknet/starknet-identity/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ERC-8004標準を使って、私のAIエージェントをStarknetに登録し、オンチェーンのアイデンティティを持たせてもらえますか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、資金のあるStarknetのアカウントをERC-8004のレジストリに接続し、メタデータを付けてエージェントをNFTのアイデンティティとして登録します。また、信頼を時間をかけて築く、フィードバックと検証のレジストリについても扱います。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Starknet Identity Skill

Register and manage AI agent identities on Starknet using the ERC-8004 standard.

When to Use

  • Registering agents on-chain, updating agent metadata, or managing reputation and validation flows.
  • Building features that depend on ERC-8004 identity, feedback, or validator attestations.

When NOT to Use

  • Simple wallet, payment, or DeFi flows that do not depend on ERC-8004 registries.
  • Cairo contract authoring, deployment-only tasks, or security auditing.

Quick Start

  1. Install starknet and connect a funded account to the target ERC-8004 registry deployment.
  2. Use skills catalog if the flow also needs wallet setup, deployment, or contract auditing.

Overview

ERC-8004 defines three interconnected on-chain registries for AI agents:

  1. Identity Registry -- Agents as ERC-721 NFTs with metadata
  2. Reputation Registry -- Feedback system with cryptographic authorization
  3. Validation Registry -- Third-party assessments (zkML, TEE, staker)

Reference implementation: erc8004-cairo

Prerequisites

npm install starknet

Agent Registration

Register a New Agent

import { Account, RpcProvider, Contract, CallData } from "starknet";

const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL });
const account = new Account({ provider, address, signer: privateKey });

const identityRegistry = new Contract({
  abi: identityRegistryAbi,
  address: registryAddress,
  providerOrAccount: account,
});

// Register with metadata
const metadata = [
  { key: "agentName", value: "MyTradingAgent" },
  { key: "agentType", value: "defi-trader" },
  { key: "version", value: "1.0.0" },
  { key: "model", value: "claude-opus-4-5" },
  { key: "status", value: "active" },
];

const tokenUri = "ipfs://QmYourAgentSpecHash"; // IPFS link to full agent spec

const { transaction_hash } = await account.execute({
  contractAddress: registryAddress,
  entrypoint: "register_with_metadata",
  calldata: CallData.compile({
    token_uri: tokenUri,
    metadata: metadata,
  }),
});

const receipt = await account.waitForTransaction(transaction_hash);
// Parse agent_id from events

Query Agent Information

// Check if agent exists
const exists = await identityRegistry.agent_exists(agentId);

// Get total registered agents
const totalAgents = await identityRegistry.total_agents();

// Get agent metadata
const name = await identityRegistry.get_metadata(agentId, "agentName");
const agentType = await identityRegistry.get_metadata(agentId, "agentType");

// Get agent owner (ERC-721)
const owner = await identityRegistry.owner_of(agentId);

Update Agent Metadata

// Only the agent owner can update metadata
await account.execute({
  contractAddress: registryAddress,
  entrypoint: "set_metadata",
  calldata: CallData.compile({
    agent_id: agentId,
    key: "status",
    value: "upgraded",
  }),
});

Reputation System

Authorize and Submit Feedback

The reputation system uses a cryptographic authorization flow:

  1. Agent owner creates a FeedbackAuth struct and signs it
  2. Client submits feedback with the authorization
// Step 1: Agent owner creates authorization
const feedbackAuth = {
  agent_id: agentId,
  client_address: clientAddress,
  index_limit: 10, // Max feedback entries allowed
  expiry: Math.floor(Date.now() / 1000) + 3600, // 1 hour
  chain_id: chainId,
  identity_registry: registryAddress,
  signer_address: ownerAddress,
};

// Sign the authorization (using agent owner's account)
const messageHash = computePoseidonHash(feedbackAuth); // EIP-712 style
const signature = await ownerAccount.signMessage(messageHash);

// Step 2: Client submits feedback
await clientAccount.execute({
  contractAddress: reputationRegistryAddress,
  entrypoint: "give_feedback",
  calldata: CallData.compile({
    agent_id: agentId,
    score: 85, // 0-100
    tag1: encodedTag("reliability"),
    tag2: encodedTag("speed"),
    fileuri: "",
    filehash: 0,
    feedback_auth: feedbackAuth,
    signature: signature,
  }),
});

Query Reputation

const reputationRegistry = new Contract({
  abi: reputationAbi,
  address: reputationAddress,
  providerOrAccount: provider,
});

// Get summary for an agent (count + average score)
const [count, avgScore] = await reputationRegistry.get_summary(
  agentId,
  [], // all client addre
よくある質問

三つのレジストリとは何ですか?

アイデンティティのレジストリ、評判のレジストリ、検証のレジストリだとしています。

エージェントはどう表されますか?

エージェントは、メタデータを持つERC-721のNFTとして表されるとしています。

単純な支払いの流れにも使えますか?

いいえ。ERC-8004のレジストリを使わない流れは、別のスキルのほうが適しているとしています。

詳細

作者による元の説明

Register 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.

repo: internet-court/internet-court-skill

人気

GitHubのスター
7.0k
ランキング
#13686
ライセンス
—
更新日
2026/10/26

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル