ERC-8004 — On-Chain Agent Registry
How AstraSync implements ERC-8004 for on-chain agent registration, identity resolution, and trust frameworks.
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.
What AstraSync Built (PR #329)
PR #329 added ERC-8004 as a first-class protocol option:
- Protocol selection in the agent registration form
- Chain, registry, operator, and token ID fields
- Blockchain service integration for SKALE Base Sepolia
- Agent detail page display for ERC-8004 metadata
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.
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": { "...": "..." }
}| Field | Type | Description |
|---|---|---|
type | string | Spec URI identifying this as an ERC-8004 registration |
name | string | Agent display name |
description | string | Agent description |
image | string? | URL to agent avatar/image |
services | array | Service endpoints the agent exposes |
x402Support | boolean | Whether agent supports x402 payment protocol |
active | boolean | Derived from agent status |
registrations | array | On-chain registrations (CAIP-10 format) |
supportedTrust | string[]? | Trust frameworks supported |
astrasyncId | string | AstraSync ASTRA-X identifier (cross-reference) |
pdlss | object? | PDLSS permission boundaries (if configured) |
Services Field Guide
Each entry in services[] declares an endpoint where the agent can be reached:
| Type | Endpoint Format | Notes |
|---|---|---|
web | HTTPS URL | Primary web endpoint |
A2A | HTTPS URL | Google A2A protocol endpoint |
MCP | HTTPS URL | Model Context Protocol endpoint. Version = spec date |
OASF | HTTPS URL | Open Agent Service Framework. Supports skills[] and domains[] |
ENS | ENS name | Ethereum Name Service resolution |
DID | DID URI | Decentralized Identifier |
email | Email address | Contact endpoint |
OASF services additionally support skills[] (capability identifiers) and domains[]
(operational domains) — these fields are hidden for other service types.
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.
Supported Trust Frameworks
The supportedTrust field declares which trust frameworks the agent participates in:
| Value | Source | What It Signals |
|---|---|---|
reputation | ERC-8004 spec | Agent has on-chain reputation scores via Reputation Registry |
crypto-economic | ERC-8004 spec | Agent backs trust with staked assets |
tee-attestation | ERC-8004 spec | Agent runs in a Trusted Execution Environment |
astrasync-pdlss | AstraSync extension | Agent has pre-execution PDLSS permission boundaries configured |
When PDLSS boundaries are configured during registration, astrasync-pdlss is automatically
selected.
Agent Token ID & Registrations
Each ERC-8004 agent has two identifiers:
- ERC-721 Token ID (
agentTokenId) — the on-chain canonical identifier, assigned after smart contract registration - ASTRA-X ID (
astrasyncIdLevel1) — AstraSync's internal platform identifier for routing and queries
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.
Chain Support
Currently supported: SKALE Base Mainnet (chain ID 1187947933).
- Identity Registry:
0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 - Reputation Registry:
0x8004BAa17C55a88189AE136b182e5fdA19dE9b63
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.
PDLSS + ERC-8004: Complete Trust Lifecycle
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:
- Pre-execution (PDLSS) — Purpose, Duration, Limits, Scope, Self-instantiation boundaries
- Execution — Agent operates within PDLSS boundaries
- Post-execution (ERC-8004 Reputation) — Counterparties submit on-chain feedback
Coming Soon (Phase 2)
- Reputation Registry lifecycle writes (
giveFeedback()at 5 lifecycle events) - Hosted registration file endpoint (auto-populate
tokenURIviasetAgentURI()) - Auto-registration SDK for programmatic agent creation
- Multi-chain support beyond SKALE Base Sepolia
astrasync-pdlssspec extension proposal to ERC-8004 authors

