Identity, Reputation, and Discovery
Chapter 11 Identity, Reputation, and Discovery This chapter transitions from “what we built” to “the network we are building.” Where the preceding implementation chapters (Chapters 5–9) described a production API with centralized orchestration, this chapter introduces the mechanisms that make Scrypted a network: on-chain identity, path-aware reputation, intent-based discovery, and multi-protocol ingress. 11.1 ERC-8004: identity, reputation, and validation registries EIP-8004 (Trustless Agents, Draft) [2] proposes three lightweight registries deployable per chain. Community tooling and data profiles are evolving on 8004scan [23, 24]. Identity registry: ERC-721–style agent records carrying URI metadata: service endpoints (web, A2A Agent Card, MCP, OASF), x402 support flags, cross-registry pointers, and supported trust tiers (reputation, crypto-economic, TEE attestation). Reputation registry: Structured client feedback with tags, optional revocation, and summaries filterable by reviewer address — mitigating Sybil inflation by design. The specification explicitly warns that Sybil attacks can inflate scores; the protocol’s contribution is a shared schema, not a single global truth score. Validation registry: On-chain hashes and URIs for validator requests and responses. The community-draft data profile (8004scan, unstable) includes typed fields for TEE attestation quotes and zkML proofs, signaling intent to unify hardware and cryptographic evidence shapes. Scrypted alignment: Each first-class ingredient or recipe exposed as a network service maps to an on-chain agent identity. External agents not hosted on Scrypted infrastructure use multichain registration (any EVM chain, Solana). Scrypted-hosted agents register on Ethereum and Solana natively, with L2s like Base under consideration for fee reduction on high-frequency operations. Reputation feedback may include proofOfPayment (chain id, transaction hash, addresses) for x402-aligned settlement attestation — tying the identity layer to the payment layer (Chapter 3). 11.1.1 Agents as IP addresses A useful mental model: ERC-8004 contract addresses function like IP addresses for agents. An address identifies a network-reachable capability with a stable contract and metadata—but the agent behind that address may be a gateway to sub-agents the caller never sees, just as an IPv4 address may terminate at a household router with many machines behind it. This analogy has practical consequences: 58
• Subnet composition: A registered agent may internally orchestrate a pool of sub-agents (even those hosted by external contributors) to fulfill a request. The caller sees one identity, one payment, one result. • CRPC over subnets: When one agent represents a subnet, CRPC applies at the subnet boundary: the gateway agent’s commitment covers the aggregate work, and sub-agent dishonesty is the gateway’s liability (Chapter 12). • Discovery granularity: Callers discover capabilities at the gateway level. Sub-agent composition is an internal implementation detail, disclosed or private per the gateway’s delegation policy. 11.2 Path-aware reputation Flat reputation scores break in the presence of service wrappers: an agent that relays work to a high-quality terminal executor inherits reputation it did not earn. Path-aware reputation separates two signals: Rterminal: Quality attributed to the agent that actually executed the work. Rhub: Routing reliability attributed to intermediaries that disclosed their delegation honestly. This separation requires registries to record observable tags per job class (self vs delegated_to: <id>). Undisclosed wrapping becomes a distinct fraud action with slashing exposure, while honest disclosed aggregation earns hub-class reputation. ERC-8004’s separation of identity, reputation, and validation registries is load-bearing for this design, not cosmetic. 11.3 Open Intents: intent to materialized route Open Intents (rebrandable) is the network’s resolution layer. A request arrives as plaintext plus optional binary assets, URLs, or pointers (IPFS CIDs, smart-contract addresses). The system:
- Parses the intent into a canonical representation (semantic embedding, structured constraints, or both).
- Searches the Open Services Registry for matching capabilities.
- Ranks matches via the attention auction (Chapter 3, §3.5) — not price alone, but embedding similarity × price × reputation.
- Fulfills the top-ranked match.
- Materializes the resolution into a route descriptor: a compiled execution plan (analogous to a SQL prepared statement) that lets future calls with similar intents skip steps 1–3 and jump directly to matchmaking and fulfillment. A materialized route is not an idempotency cache (that exists separately). It is the execution plan minus the data. Routes expire when the service topology changes: ingredient deprecation, new registrations, or auction-score shifts. No surveyed system combines semantic intent parsing, bid-ranked matchmaking, and a compiled fast-path for repeat calls. Individual pieces exist (intent pools in DeFi, semantic routing in IETF IAIP, materialized views in databases), but the synthesis is Scrypted-specific. 59
Internal grounding: The codebase already implements DNS-like resolution: IngredientServiceRegistry maps versions to service roles with priority ordering; ServiceResolver returns ordered service lists with fallback; FaultTolerantIngredientExecutor retries across the list. Open Intents extends this with semantic parsing, bid ranking, and a materialized-route store — not a rewrite. 11.4 Open Services Registry The Open Services Registry (rebrandable) is the discoverable index of capabilities. Today it is the PostgreSQL ingredient/recipe registry (Chapter 5). The network extension adds: • External agent discovery via DUADP, .well-known/ai, DNS TXT (_agent.<domain>), and ADP agent manifests. • ERC-8004 on-chain anchoring for registered agents. • Capability-URI taxonomy (open design question: align with 8004scan metadata profiles or define a Scrypted-specific vocabulary). 11.5 Ingress protocols: MCP, A2A, ACP, UCP The network accepts requests over multiple transport surfaces: Protocol Character HTTP API Current primary ingress. Bearer auth, x402 payment headers. MCP (Model Context Protocol) JSON-RPC; tools, resources, prompts. Client-server trust model. A2A (Agent-to-Agent) JSON-RPC over HTTPS; Agent Cards for discovery; tasks with streaming. ACP (OpenAI) Cross-platform assistant commerce / checkout flows. UCP (Google) Agentic commerce on Google surfaces; coexists with ACP. Virtuals ACP On-chain escrow; agent-agent commerce in the Virtuals ecosystem. Open Intents sits above these surfaces: any ingress protocol is normalized into a canonical intent representation before resolution. No protocol-specific routes exist in scryptedai_api/ today; the HTTP API is the sole implemented path. Adapters for MCP and A2A are committed near-term deliverables. 11.6 AgentRank: quality-weighted auction ranking Strategic Takeaway Google proved that quality-weighted auctions outperform pure price auctions: advertisers who write better ads pay less per click and rank higher. AgentRank applies the same principle to agent capability markets: agents that deliver better results pay less per placement and win more intents. The attention auction described in Chapter 3, §3.5 asserts that routing should rank agents by quality and fit, not price alone. AgentRank is the concrete ranking formula that implements this claim, derived from the empirical successes and documented mechanics of search-engine ad auctions. 60
11.6.1 From AdRank to AgentRank Google’s Ad Rank (public since 2005, refined through 2026) determines which ad appears in which position for a given query. The core formula: AdRanki = Bidi × QualityScorei where QualityScorei ∈ [1, 10] is a composite of: • Expected click-through rate (CTR): Historical performance of this ad for similar queries. • Ad relevance: Semantic match between the ad copy and the search query. • Landing page experience: Post-click quality (speed, content relevance, usability). The effect is well-documented: an advertiser with a Quality Score of 8 and a 2.50 bid (AdRank = 7.5). The higher-quality advertiser pays less per click via the generalized second-price (GSP) auction mechanism. Google reported that Quality Score improvements of 7+ reduced actual CPC by 20–50% relative to scores below 5. This creates a virtuous cycle: quality investment lowers cost, which funds more quality investment. AgentRank adapts this to agent capability markets. When an intent arrives (“generate a product video from these assets”), multiple agents can fulfill it. The ranking: AgentRanki = Bidi × AgentQualityi where AgentQualityi is a composite of signals available in the Scrypted Network: Signal Definition AdRank analog Sim(eq, ea) Cosine similarity between the intent embedding eq and the agent’s capability embedding ea Ad relevance Rterminal,i ERC-8004 reputation score for terminal execution quality (§11.2) Expected CTR Ci Fulfillment quality: latency, success rate, CRPC-verified output consistency Landing page experience Combining these: AgentQualityi = α · Sim(eq, ea) + β · Rterminal,i + γ · Ci where α + β + γ = 1 and the weights are governance-tunable parameters. The full ranking formula: AgentRanki = Bidi × (α · Sim(eq, ea) + β · Rterminal,i + γ · Ci ) 11.6.2 Pricing: generalized second-price for agents Following AdRank’s GSP mechanism, the winning agent pays not its own bid but the minimum bid needed to maintain its rank position: CPCi = AgentRanki+1 AgentQualityi
- ϵ 61
This preserves the virtuous cycle: agents with higher quality scores pay less per placement. An agent with AgentQuality = 0.9 and bid 0.25 (AgentRank = 0.075), and pays less. Economic incentive aligns with network quality. 11.6.3 Intent embeddings as keywords In search advertising, the keyword is the unit of demand. In the Scrypted Network, the intent embedding (or materialized route, §11.3) is the unit of demand. Agents bid on capability embeddings—vector regions in semantic space—rather than exact string keywords. This means: • Broad match emerges naturally: an agent bidding on “video generation” has nonzero similarity to “create a product demo clip,” proportional to embedding distance. • Exact match is achievable via materialized routes: a compiled route locks the resolution path, bypassing embedding-based matching for repeat intents. • Negative match maps to capability exclusions in the agent’s ERC-8004 metadata. The advertising-works-on-LLMs thesis extends this further: when an LLM agent is shopping for sub-capabilities on behalf of a user, the agent’s selection process is itself susceptible to quality signals, reputation scores, and placement priority. AgentRank is the mechanism that channels this susceptibility into a market with aligned incentives—higher quality earns more attention, not higher spending alone. 11.7 Marketplace pathology: infinite service wrappers In open pay-per-call markets, transparent at-cost wrapping is economically rational: agent A matches competitor B’s price, forwards work to B, absorbs routing overhead ε, and competes on reputation, latency, and cross-sell. This is not automatically fraud. The failure mode: if B later mirrors A under capacity stress, the delegation graph can contain cycles (A → B → A) or unbounded chains (A → B → C → …). Then latency and failure probability compound (≤ sn for per-hop success s); cost accounting becomes inductive; x402 receipts bind to shell identities; debugging breaks. The mitigation design space: Disclosure: Mandatory terminal-executor + delegation-depth fields in machine-readable metadata (A2A Agent Cards, ERC-8004 URIs, HTTP headers). A configurable Dmax caps depth. Economic: Bonds and stake for listed capabilities; slashing on proven misrepresentation. Technical: Loop detection in orchestration; circuit breakers on latency SLO breach. Reputation: Rterminal vs Rhub scoring (§11.2). Dmax should be justified by game-theoretic analysis (mechanism designs that make undisclosed deep wrapping unprofitable or detectable), not set as an arbitrary constant. This is an active research direction. 62
Source: transcribed from the compiled Scrypted Network Design whitepaper PDF for web reading. Layout, figures, and pagination may differ from the PDF.