Starknet Identity logo

Starknet Identity

Organization
keep-starknet-strange
starknet-identity

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.

Overview

Publisherkeep-starknet-strange
Repositorystarknet-agentic
Skill namestarknet-identity
Stars
81
Forks
26
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by keep-starknet-strange on GitHub. Read the source before you install it.

Installation

Install the Starknet Identity AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/starknet-identity
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/keep-starknet-strange/starknet-agentic.git /tmp/starknet-agentic
mkdir -p .claude/skills
cp -r /tmp/starknet-agentic/skills/starknet-identity .claude/skills/starknet-identity
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Starknet Identity in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Starknet Identity on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Starknet Identity is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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, filtered by reviewer at read time
  3. Validation Registry -- Third-party assessments (zkML, TEE, staker)

Reference implementation: erc8004-cairo

Prerequisites

bash
npm install starknet

Agent Registration

Register a New Agent

typescript
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.provider.waitForTransaction(transaction_hash);
// Parse agent_id from events

Query Agent Information

typescript
// 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

typescript
// 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

Submit Feedback

Any client may call give_feedback directly. The deployed registry does not require an authorization signature from the agent owner, so anyone can write feedback about any agent, solicited or not. Plan for that (see Security Considerations).

One exception: the agent's own side cannot rate itself. give_feedback reverts with Self-feedback not allowed when the caller is the owner, an address approved for that token, or an operator approved for all of the owner's tokens. A delegated agent account is blocked by that check too, not just the owner. The same call reverts with Agent does not exist for an agent_id that was never minted.

A score is a signed fixed-point pair, not a 0-100 integer: value (i128) plus value_decimals (u8, 0-18). Read them together — value: 9977 with value_decimals: 2 means 99.77. The contract bounds value to ±1e38 (MAX_ABS_VALUE) and rejects value_decimals above 18, reverting with value too large or too many decimals. What it does not impose is a meaning: there is no standard 0-100 scale, so a score is only comparable against others from the same writer using the same tag1.

typescript
import { CallData, byteArray, cairo } from "starknet";

// Serialize the compound types explicitly. A plain JS string is not a ByteArray
// and a scalar is not a u256, so passing them raw compiles to calldata that
// give_feedback cannot decode.
const calldata = CallData.compile({
  agent_id: cairo.uint256(agentId),
  value: 85n,                                       // i128; 85 with 0 decimals = 85
  value_decimals: 0,                                // u8, 0-18
  tag1: byteArray.byteArrayFromString("reliability"),
  tag2: byteArray.byteArrayFromString("speed"),
  endpoint: byteArray.byteArrayFromString(""),      // which service was used
  feedback_uri: byteArray.byteArrayFromString(""),  // optional off-chain detail
  feedback_hash: cairo.uint256(0),
});

await clientAccount.execute([{
  contractAddress: reputationRegistryAddress,
  entrypoint: "give_feedback",
  calldata,
}]);

A negative value is allowed, but it travels as a field element rather than a 128-bit two's-complement integer: encode it as FELT_PRIME - abs(value). See toI128BigInt in contracts/erc8004-cairo/e2e-tests/tests/reputation.test.js.

Query Reputation

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

// get_summary REVERTS on an empty client list. This is deliberate: an unfiltered
// average is exactly what EIP-8004 warns is Sybil-bait, so decide whose opinion
// you trust and pass those addresses.
const trusted = [clientA, clientB]; // must be non-empty
const [count, value, valueDecimals] = await reputationRegistry.get_summary(
  agentId,
  trusted,
  "", // tag1 filter, empty ByteArray = all
  "", // tag2 filter, empty ByteArray = all
);
// value can reach ±1e38, far past Number.MAX_SAFE_INTEGER, so keep it a BigInt
// and format the fixed-point pair with integer math instead of dividing floats.
function formatFixedPoint(raw: bigint, decimals: number): string {
  const negative = raw < 0n;
  const digits = (negative ? -raw : raw).toString().padStart(decimals + 1, "0");
  const whole = digits.slice(0, digits.length - decimals);
  const fraction = decimals ? `.${digits.slice(digits.length - decimals)}` : "";
  return `${negative ? "-" : ""}${whole}${fraction}`;
}

const average = formatFixedPoint(BigInt(value), Number(valueDecimals));

// Read specific feedback: (value, value_decimals, tag1, tag2, is_revoked)
const [fValue, fDecimals, tag1, tag2, isRevoked] =
  await reputationRegistry.read_feedback(agentId, clientAddress, feedbackIndex);

// Get all clients who gave feedback
const clients = await reputationRegistry.get_clients(agentId);

Validation System

Request Validation

typescript
const validationRegistry = new Contract({
  abi: validationAbi,
  address: validationAddress,
  providerOrAccount: account,
});

// Agent owner requests validation from a specific validator
await account.execute({
  contractAddress: validationAddress,
  entrypoint: "validation_request",
  calldata: CallData.compile({
    validator_address: validatorAddress,
    agent_id: agentId,
    request_uri: "ipfs://QmValidationRequestDetails",
    request_hash: 0, // Auto-generated if 0
  }),
});

Submit Validation Response

typescript
// Validator responds to the request
await validatorAccount.execute({
  contractAddress: validationAddress,
  entrypoint: "validation_response",
  calldata: CallData.compile({
    request_hash: requestHash,
    response: 92, // Score 0-100
    response_uri: "ipfs://QmValidationReport",
    response_hash: reportHash,
    tag: encodedTag("performance"),
  }),
});

Query Validation Status

typescript
// Get validation summary
const [validationCount, avgValidationScore] = await validationRegistry.get_summary(
  agentId,
  [], // all validators
  0,  // tag filter
);

// Get specific validation
const [validator, agentId_, response, tag, lastUpdate] =
  await validationRegistry.get_validation_status(requestHash);

A2A Agent Card Integration

Combine on-chain identity with A2A Agent Cards for discoverability:

json
{
  "name": "MyTradingAgent",
  "description": "Autonomous DeFi trading agent on Starknet",
  "url": "https://my-agent.example.com",
  "provider": {
    "organization": "MyOrg"
  },
  "version": "1.0.0",
  "capabilities": {
    "streaming": true,
    "pushNotifications": false
  },
  "skills": [
    {
      "id": "starknet-swap",
      "name": "Token Swap",
      "description": "Execute token swaps on Starknet via avnu"
    }
  ],
  "defaultInputModes": ["text/plain"],
  "defaultOutputModes": ["text/plain"],
  "authentication": {
    "schemes": ["bearer"]
  },
  "starknetIdentity": {
    "registryAddress": "0x...",
    "agentId": 42,
    "reputationScore": 85,
    "validationCount": 3
  }
}

Serve at /.well-known/agent.json for A2A discovery.

Metadata Schema (Recommended)

KeyDescriptionExample
agentNameDisplay name"MyTradingAgent"
agentTypeCategory"defi-trader", "nft-curator", "data-analyst"
versionSemantic version"1.0.0"
modelLLM model used"claude-opus-4-5", "gpt-4o"
statusCurrent status"active", "paused", "deprecated"
frameworkAgent framework"daydreams", "openclaw", "langchain"
capabilitiesComma-separated"swap,stake,lend"
a2aEndpointAgent Card URL"https://agent.example.com"
moltbookIdMoltBook agent ID"agent_abc123"

Security Considerations

  • Only the agent owner can update metadata
  • Feedback is NOT gated by an owner signature. Any address can call give_feedback about any agent. There is no on-chain spam protection, so treat raw feedback as untrusted input and filter by reviewer before showing or aggregating it
  • get_summary refuses an empty client_addresses list, which forces that filter at the contract level
  • Self-feedback is prevented for the whole owner side, not just the owner address: give_feedback rejects the owner, any address approved for that token, and any operator approved for all of the owner's tokens. Do not route client feedback through an account that is also an operator on the agent, or every call reverts as self-feedback
  • Self-validation is prevented (agent owner cannot validate own agent)
  • Signatures include chain ID and expiry to prevent replay attacks
  • Agent identity (NFT) is transferable -- new owner inherits reputation

Error Codes

CodeMeaningLikely causesRecoveryUser-facing message
REGISTRATION_FAILEDInitial ERC-8004 registration or metadata write reverted.Missing fees, duplicate registration, invalid calldata, or stale contract state.Retry after checking wallet balance, contract state, and constructor/registration inputs."Registration failed. Check wallet state and retry."
AUTHORIZATION_DENIEDAn owner-gated write was rejected, or give_feedback was rejected as self-feedback.Wrong signer or outdated owner state on metadata writes; for feedback, a caller that is the owner, an approved address, or an operator on that agent.Re-fetch owner state and verify permissions for owner-gated writes. Feedback carries no authorization proof, so there is nothing to re-sign: submit it from an account with no approval on the agent."Authorization denied. Verify signer permissions and retry."
VALIDATION_TIMEOUTOff-chain validation or watcher flow did not complete before the deadline.Slow relayer, RPC degradation, or downstream A2A service lag.Retry with a longer timeout after checking chain health, relayer status, and RPC latency."Validation timed out. Retry after checking network health."
SIGNATURE_EXPIREDSigned payload expired before submission.Expiry window too short or user approval arrived too late.Generate a fresh signature with a new expiry and resubmit immediately."Signature expired. Re-sign and submit again."
OWNER_TRANSFERREDAgent NFT ownership changed while a write or feedback flow was in flight.NFT transfer, marketplace sale, or custodial wallet rotation.Refresh ownership state and retry owner-gated writes from the new owner. Existing feedback is unaffected: reputation follows the NFT. Re-check that your feedback account is not an approved operator of the new owner."Ownership changed. Refresh owner state and retry with the new owner."

References

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Starknet Identity AI skill do?

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.

Why use Starknet Identity on TypingMind?

Because you install it once and use it with any model. Starknet Identity is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Starknet Identity in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/keep-starknet-strange/starknet-agentic/tree/main/skills/starknet-identity. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Starknet Identity?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Starknet Identity?

As many as you like. As long as a model supports skills, you can use Starknet Identity with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Starknet Identity AI skill free?

Yes. It is published on GitHub by keep-starknet-strange under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇