ERC-8004: On-Chain Agent Registry

AstraSync integration with the ERC-8004 standard for on-chain agent identity and off-chain Agent Registration Files.


1. What is ERC-8004?

ERC-8004 defines an on-chain Agent Registry where each agent is an ERC-721 token. The token's tokenURI (called agentURI) points to an off-chain Agent Registration File — a JSON document describing the agent's services, trust frameworks, and identity.

AstraSync wraps ERC-8004 with Know Your Agent (KYA) verification and PDLSS permission boundaries, adding pre-execution governance to the spec's post-execution reputation model.


2. What AstraSync Built (PR #329)

PR #329 added ERC-8004 as a first-class protocol option:

What PR #329 did NOT do: produce a spec-compliant Agent Registration File, interact with Reputation/Validation Registries, or perform smart contract operations. Those are addressed in subsequent phases.


3. Agent Registration File Schema

The Agent Registration File is the JSON served at an agent's agentURI. AstraSync's card generator produces this spec-compliant format for ERC-8004 agents:

{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "My Agent",
  "description": "An AI agent registered on-chain",
  "image": "https://example.com/agent-avatar.png",
  "services": [
    { "name": "web", "endpoint": "https://api.example.com/agent", "version": "1.0" },
    { "name": "A2A", "endpoint": "https://api.example.com/a2a" },
    { "name": "MCP", "endpoint": "https://api.example.com/mcp", "version": "2025-03-26" }
  ],
  "x402Support": false,
  "active": true,
  "registrations": [
    {
      "agentId": 42,
      "agentRegistry": "eip155:1187947933:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432"
    }
  ],
  "supportedTrust": ["reputation", "astrasync-pdlss"],
  "astrasyncId": "ASTRA-abc123...",
  "pdlss": { "..." : "..." }
}
FieldTypeDescription
typestringSpec URI identifying this as an ERC-8004 registration
namestringAgent display name
descriptionstringAgent description
imagestring?URL to agent avatar/image
servicesarrayService endpoints the agent exposes
x402SupportbooleanWhether agent supports x402 payment protocol
activebooleanDerived from agent status
registrationsarrayOn-chain registrations (CAIP-10 format)
supportedTruststring[]?Trust frameworks supported
astrasyncIdstringAstraSync ASTRA-X identifier (cross-reference)
pdlssobject?PDLSS permission boundaries (if configured)

4. Services Field Guide

Each entry in services[] declares an endpoint where the agent can be reached:

TypeEndpoint FormatNotes
webHTTPS URLPrimary web endpoint
A2AHTTPS URLGoogle A2A protocol endpoint
MCPHTTPS URLModel Context Protocol endpoint. Version = spec date
OASFHTTPS URLOpen Agent Service Framework. Supports skills[] and domains[]
ENSENS nameEthereum Name Service resolution
DIDDID URIDecentralized Identifier
emailEmail addressContact endpoint

OASF services additionally support skills[] (capability identifiers) and domains[] (operational domains) — these fields are hidden for other service types.


5. x402 Support

The x402Support field is a developer declaration indicating whether the agent supports the x402 payment protocol for HTTP-based micropayments.

AstraSync does not verify this claim. False declarations may affect the agent's trust score in future reputation system integrations.


6. Supported Trust Frameworks

The supportedTrust field declares which trust frameworks the agent participates in:

ValueSourceWhat It Signals
reputationERC-8004 specAgent has on-chain reputation scores via Reputation Registry
crypto-economicERC-8004 specAgent backs trust with staked assets
tee-attestationERC-8004 specAgent runs in a Trusted Execution Environment
astrasync-pdlssAstraSync extensionAgent has pre-execution PDLSS permission boundaries configured

When PDLSS boundaries are configured during registration, astrasync-pdlss is automatically selected.


7. Agent Token ID & Registrations

Each ERC-8004 agent has two identifiers:

The registrations[] array in the Agent Registration File uses CAIP-10 format: eip155:{chainId}:{registryAddress}.

The Token ID is not required at registration time — agents can register on AstraSync first and receive a Token ID after on-chain registration. The agent detail page shows whichever identifier is available.


8. Chain Support

Currently supported: SKALE Base Mainnet (chain ID 1187947933).

On-chain vs off-chain: AstraSync handles agent registration, verification, and metadata (off-chain). Smart contract interactions (on-chain) for Identity Registry registration, reputation writes, and token transfers are Phase 2 scope.


9. PDLSS + ERC-8004

ERC-8004's reputation model is post-execution — trust scores update after agent actions. AstraSync's PDLSS framework provides pre-execution governance: permission boundaries that constrain what an agent can do before it acts.

Together they form a complete trust lifecycle:

  1. Pre-execution (PDLSS) — Purpose, Duration, Limits, Scope, Self-instantiation boundaries
  2. Execution — Agent operates within boundaries
  3. Post-execution (ERC-8004 Reputation) — Counterparties submit on-chain feedback

10. Coming Soon (Phase 2)