---
eip: 8259
label: ERC-8259
title: AI Agent Identity & Threat Registry
status: Draft
type: Standards Track
category: ERC
created: 2026-05-07
official: https://eips.ethereum.org/EIPS/eip-8259
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8259.md
canonical: https://eips.huatuo.xyz/eip-8259/
lang: en
tldr: "A draft set of registry interfaces giving AI agents a portable on-chain identity (did:agent), a verification tier and a 0-1000 reputation score, plus a shared registry where protocols report attacks and threat patterns."
tags: [ai-agents, identity, reputation, security, registry]
---

# ERC-8259: AI Agent Identity & Threat Registry

> Decentralized identity, reputation, and threat intelligence sharing for AI agents

**TL;DR:** A draft set of registry interfaces giving AI agents a portable on-chain identity (did:agent), a verification tier and a 0-1000 reputation score, plus a shared registry where protocols report attacks and threat patterns.

## What problem does it solve?

Autonomous AI agents increasingly trade, lend and call contracts on their own. The spec points out several gaps:

- **No portable identity.** Each protocol identifies agents its own way.
- **Reputation silos.** Good or bad history in one app is invisible to others.
- **No shared threat intelligence.** An exploit blocked by one protocol can be replayed against another, often from a fresh, disposable address.
- **No common way to tell an unverified bot from a vetted agent.**

ERC-8259 proposes standard interfaces so that identity, reputation and threat reports can be read across protocols.

## How it works

It defines two required interfaces and one optional one.

**`IAgentIdentityRegistry`**
- Agents are registered with a DID of the form `did:agent:<chainId>:<address>`, a public key, a metadata URI and an initial **verification tier**: 0 None, 1 Bronze, 2 Silver, 3 Gold, 4 Platinum.
- Each agent has a **reputation score** from 0 to 1000 (1000 = 100 %). New agents start at 500 unless local governance says otherwise.
- Only authorized parties (oracles, verification contracts, governance multisigs) may change scores or tiers. Scores above 1000 must revert.
- Reads: `getAgentIdentity`, `getAgentByDID`, `isVerified` (tier > 0) and `calculateTrustScore`, which combines reputation and tier into 0-1000.

**`IThreatRegistry`**
- Authorized monitors call `recordAttack(agent, pattern, amountUSDC6, riskMilli, layer)`, which stores the incident and emits `AttackBlocked`.
- Anyone can `shareThreatPattern`. Patterns are `keccak256(abi.encodePacked(actionType, destination, amountBucket))`.
- Protocols query `isKnownAttacker`, `getAgentAttackHistory` and `assessTransactionRisk`.

**`IRiskAssessment`** (optional) returns an allow/deny decision with a score, reason and matched patterns for a planned transaction, singly or in batches.

The spec also says identity and reputation must stay distinct: a reputation update must never change an agent's identity binding or key, and neither score nor tier counts as authorization by itself.

## Sample code

A protocol gating agent access on the two registries (illustrative thresholds):

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IAgentIdentityRegistry {
    function isVerified(address agent) external view returns (bool);
    function calculateTrustScore(address agent) external view returns (uint16);
}
interface IThreatRegistry {
    function isKnownAttacker(address agent) external view returns (bool);
}

contract AgentGate {
    IAgentIdentityRegistry public immutable ids;
    IThreatRegistry public immutable threats;
    uint16 public constant MIN_TRUST = 700; // policy choice, not from the spec

    constructor(IAgentIdentityRegistry _ids, IThreatRegistry _threats) {
        ids = _ids; threats = _threats;
    }

    modifier onlyTrustedAgent() {
        require(!threats.isKnownAttacker(msg.sender), "known attacker");
        require(ids.isVerified(msg.sender), "unverified agent");
        require(ids.calculateTrustScore(msg.sender) >= MIN_TRUST, "low trust");
        _;
    }

    function agentAction() external onlyTrustedAgent { /* ... */ }
}
```

## Things to know

- **Status: Draft.** Interfaces, tier names and scoring rules may change. The spec does not say how `calculateTrustScore` combines tier and reputation, so results will differ between registries.
- Everything hinges on access control. An unprotected `updateReputationScore` lets attackers inflate bad agents or zero out rivals; an unprotected `recordAttack` lets them falsely flag honest addresses. The spec asks for multisigs, timelocks, multiple independent reporters or slashable bonds.
- Tier 0 identities are free to create (Sybil risk). The spec advises against granting any privileges on tier 0 alone and suggests Silver or higher for high-trust operations.
- Check `lastUpdate`: a once-reputable agent may be compromised.
- Threat reports sent through the public mempool can be front-run; private mempools or commit-reveal are recommended.
- For a related, broader approach that separates identity, reputation and validation registries, see [ERC-8004](/eip-8004/).


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8259
