Skip to content

Developer Documentation & Website Design

Overview

This document captures the design for Layr8’s developer documentation website, aimed at taking developers from zero knowledge of decentralized identity to building production systems.

Target audience: Developers familiar with REST APIs, databases, TCP/IP — but new to DIDs, VCs, DIDComm, and decentralized identity.

Journey: Understand → Envision → Build → Integrate


Terminology Decision

TermUsage
AgentPrimary term — emphasizes “acting on behalf of”
Digital TwinSecondary term — for IoT/physical-world contexts
PluginTechnical term — code that gives an agent behavior
NodeInfrastructure — hosts agents, provisioned via portal.layr8.io

Both “agent” and “twin” are valid. Lead with “agent” (resonates with AI moment), use “digital twin” for IoT scenarios.


Core Mental Model

Agent (the whole entity)
├── DID ─────────── "who you are" (unique identifier, decentralized)
├── Keys ────────── "how you prove you're you" (cryptographic, never shared)
├── Wallet ─────────┬─ Passport (VC)
│ ├─ Driver's License (VC)
│ ├─ Costco Membership (VC)
│ └─ Employee Badge (VC)
├── Policies ────── "what you allow others to do"
└── Behavior ────── "what you can do" (plugins)

Key insight: The DID is who you are. VCs are credentials you carry — issued by others, presented when needed, cryptographically verifiable without calling home.


Website (layr8.io) Revisions

Current State

  • Headline: “Enterprise-Grade Decentralized Messaging”
  • Positions as B2B messaging solution
  • Buries the identity paradigm shift
  • No clear developer path

Proposed Revisions

New positioning: Lead with the paradigm shift, not the feature set.

Possible headlines (to be tested via survey):

  1. “The identity layer for the internet. Every agent proves who it is — no central authority required.”
  2. “What Stripe did for payments, we’re doing for identity.”
  3. “Your AI agents need identity. Give them cryptographic proof.”
  4. “EU mandates digital identity wallets by 2026. We’re the infrastructure.”

Homepage structure:

  1. Hook — one sentence that creates curiosity
  2. 30-second “aha” — Layer 8 explained visually
  3. Three paths: Understand it | Try it | See use cases
  4. Social proof (when available)

Documentation Site Structure

Part 1: The Paradigm Shift

Approach: Problem-forward intro → narrative walkthrough → deep dive for specs

1.1 The Problem with Identity Today

~500 words

  • The API key mess — secrets scattered, no proof of who
  • OAuth’s limits — awkward for machine-to-machine, multi-org
  • Central authority problem — IdP down = everything down
  • No portable proof — every service re-verifies from scratch

Hook: “What if identity was built into the protocol itself?“

1.2 A Day in the Life (Narrative)

~800 words

Characters:

  • Alice (person with personal agent)
  • Alice’s agent (software acting on her behalf)
  • Bob’s Marketplace (service, also an agent)
  • Acme Corp (Alice’s employer, issues credentials)

Story:

  1. Alice’s agent wants to buy from Bob’s Marketplace
  2. Bob: “Prove you’re human over 18” → Alice presents government VC
  3. Bob: “Prove you can spend from Acme’s account” → Alice presents employee VC
  4. Transaction completes — no API keys, no central auth server called

1.3 The Building Blocks

~400 words each

DIDs — “Who you are”

  • Like a username, but you control it
  • Resolves to document with public keys
  • Methods: did:web, did:peer, did:ethr

VCs — “What you can prove”

  • Credentials you carry (passport, license, badge)
  • Issued by one party, held by you, verified by anyone
  • Selective disclosure (prove over 18 without revealing birthdate)

DIDComm — “How you communicate”

  • Encrypted messaging between DIDs
  • Peer-to-peer, no server in middle
  • Protocol-based (trust-ping, issue-credential, present-proof)

Agents — “Software with identity”

  • Agent = DID + keys + credentials + behavior
  • Can represent people, companies, devices, AI
  • Plugins give agents capabilities

Contextual diagrams:

AI Agent (Claude Assistant)
├── DID ─────────── did:web:acme.com:agents:purchasing-bot
├── Keys ────────── Ed25519 signing key (in KMS)
├── Wallet ─────────┬─ "Authorized by Acme Corp" (VC)
│ ├─ "Spending limit: $500/day" (VC)
│ └─ "Department: Engineering" (VC)
├── Policies ────── "Accept requests from verified employees only"
└── Behavior ────── order supplies, approve expenses (plugins)
Smart Door Lock (Digital Twin)
├── DID ─────────── did:web:building.com:devices:door-42
├── Keys ────────── Hardware security module
├── Wallet ─────────┬─ "Installed by SecureCo" (VC)
│ ├─ "Building: 123 Main St" (VC)
│ └─ "Maintenance valid until 2026" (VC)
├── Policies ────── "Unlock for residents + authorized guests"
└── Behavior ────── lock, unlock, report status (plugins)

1.4 Deep Dive (For the Curious)

Links to detailed spec explanations:

  • W3C DID Core Spec
  • W3C VC Data Model
  • DIDComm v2
  • Trust frameworks

Part 2: See What’s Possible

2.1 AI Agents with Verifiable Identity

The problem: How does a vendor know the AI agent calling their API is actually authorized?

The shift: Agent carries cryptographic proof. Vendor verifies instantly.

Use cases:

  • AI assistant that books travel, purchases supplies
  • Autonomous agents negotiating B2B contracts
  • Multi-agent workflows across organizations

2.2 IoT & Digital Twins

The problem: IoT devices authenticate via certificates managed by central CA.

The shift: Each device has its own identity. Access via verifiable credentials.

Use cases:

  • Building access control
  • Fleet management (trucks, containers)
  • Industrial sensors with provenance

2.3 B2B Without EDI

The problem: EDI is expensive, brittle. Every new partner = months of integration.

The shift: Partners verify each other via credentials. Onboarding = presenting proof.

Use cases:

  • Supply chain coordination
  • E-ticketing
  • Financial services (portable KYC)

2.4 Personal Identity on the Web

The problem: Anonymous (bots everywhere) or fully tracked (cookies). No middle ground.

The shift: Prove you’re human without revealing identity.

Use cases:

  • Age verification without ID upload
  • Portable subscriptions across publishers
  • Comment sections for verified humans only

2.5 The “OMG” Section

Low friction (lead with these):

  • Onboard once, verify everywhere
  • No more API key rotation ceremonies
  • Partner integration in hours, not months
  • One login across everything you build
  • Revocation that actually works

Visionary:

  • Your AI works everywhere you do
  • Reputation that travels with you
  • Global business without borders
  • The end of “Sign in with Google”
  • Machines that prove their origin
  • Content you can prove you created
  • Instant trust between strangers
  • Humanity-verified internet

Part 3: Build Something (The Sandbox)

Architecture

┌─────────────────────────────────────────────────────────────────┐
│ Developer's World │
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Developer's │ ──── │ Developer's │ │
│ │ Plugin │ WS │ Node │ │
│ │ (code they │ │ (portal.layr8) │ │
│ │ write) │ │ │ │
│ └─────────────────┘ │ Their Agent │ │
│ │ did:web:... │ │
│ └────────┬────────┘ │
└────────────────────────────────────┼────────────────────────────┘
│ DIDComm
┌────────────────────────────────────┼────────────────────────────┐
│ Sandbox World │ │
│ ┌────────┴────────┐ │
│ │ Sandbox Node │ │
│ │ │ │
│ │ ┌───────────┐ │ │
│ │ │ Bots │ │ │
│ │ │ Issuers │ │ │
│ │ │ Verifiers │ │ │
│ │ │ Devices │ │ │
│ │ └───────────┘ │ │
│ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────┘

3.1 Quickstart (5 minutes)

  1. Sign up at portal.layr8.io → node provisioned
  2. Clone quickstart repo (JS/Elixir/Go)
  3. Add credentials, run plugin
  4. Agent connects, talks to sandbox bots

3.2 Sandbox World — Agent Tiers

Tier 1: Hello World

AgentWhat it doesWhat you learn
Echo BotSends back whatever you sendBasic message structure
GreeterWelcomes you, lists agentsThe sandbox is alive

Tier 2: Protocols

AgentWhat it doesWhat you learn
Ping PongResponds to trust-pingSimplest protocol
Chat BotBasic conversationbasic-message protocol
Thread BotMulti-turn, remembers contextThread IDs, state

Tier 3: Credentials 101

AgentWhat it doesWhat you learn
Credential KioskIssues “Sandbox Explorer” badgeReceiving a VC
BouncerLets you in with badgePresenting a VC
InspectorShows your credentialsWallet inspection

Tier 4: Relationships & Peer DIDs

AgentWhat it doesWhat you learn
Friend BotInitiates DID exchangeOut-of-band, DID exchange
Peer DID DemoCreates did:peer for relationshipPrivate pairwise DIDs
IntroducerIntroduces via peer DIDMediated connections
Address BookShows relationshipsdid:web vs did:peer

Tier 5: Credential Flows

AgentWhat it doesWhat you learn
UniversityIssues diploma after quizFull issue-credential protocol
EmployerVerifies diploma, issues employmentChained credentials
BankOpens account with employment VCMulti-credential verification

Tier 6: Selective Disclosure & ZKP

AgentWhat it doesWhat you learn
Age Gate”Prove over 21” from birthdate VCZKP predicates
Salary Verifier”Prove over $50k”Range proofs
Membership ProverProve set membershipUnlinkable proofs
Anonymous SurveyRespond as graduate, not whichAnonymous credentials

Tier 7: Revocation

AgentWhat it doesWhat you learn
Temp Badge IssuerCredential expires in 5 minExpiration handling
Fickle EmployerIssues then revokesRevocation registries
Revocation Checker”Is this still valid?”Status checking
The FiredRejects after revocationFull revocation flow

Tier 8: Policies & Authorization

AgentWhat it doesWhat you learn
VIP RoomRequires 3+ credentialsCredential count policy
Time LockOnly responds certain hoursTime-based policy
Rate LimiterRejects if too fastRate limiting
DelegatorAccepts delegated authDelegation chains
Geo FenceRequires location credentialClaim-based policy

Tier 9: IoT & Device Twins

AgentWhat it doesWhat you learn
Virtual ThermostatReports temp, accepts commandsDevice twin basics
Smart LockUnlock with credentialDevice access control
Sensor Network5 sensors, each with DIDFleet identity
Device ProvisioningClaim unclaimed deviceOwnership transfer
Firmware UpdaterOnly manufacturer-signed updatesSecure updates

Tier 10: Blockchain & Anchoring

AgentWhat it doesWhat you learn
Chain ExplorerShows DID on testnetdid:ethr, resolution
Timestamp BotAnchors hash to testnetProof of existence
NFT Badge IssuerBadge that’s also NFTVC + NFT hybrid
Verifiable RegistryOn-chain revocationDecentralized revocation

Tier 11: AI Agent Identity & Interop

Context: Google’s A2A protocol enables agent-to-agent communication. Anthropic’s MCP connects agents to tools. Both lack cryptographic identity — Layr8 provides the missing layer.

AgentWhat it doesWhat you learn
AI GreeterLLM-powered agent with its own DIDAI agents need identity too
MCP BridgeExposes sandbox tools via Model Context ProtocolLayr8 as MCP server
A2A GatewayTranslates A2A ↔ DIDComm messagesProtocol interoperability
Tool AuthorizerValidates AI agent credentials before granting tool accessAuthorization for AI tools
Delegation BotIssues scoped, time-limited credentials to AI assistants”Act on my behalf” patterns
Audit TrailLogs all AI agent actions with cryptographic proofsAccountability & compliance
Capability NegotiatorA2A-style capability discovery over DIDCommAgent discovery patterns

Tier 12: Multi-Agent AI Workflows

Build with LangGraph, CrewAI, or Microsoft Agent Framework — but with verifiable identity.

ScenarioAgentsWhat you learn
MarketplaceBuyer + Seller + EscrowMulti-party coordination
Travel DeskAgent + Airline + HotelOrchestration
Referral ChainA → B → CTrust propagation
AI Research TeamResearcher + Analyst + Writer (each with DID)Multi-agent + identity
Human-in-LoopAI proposes action, human approves via signed VCApproval workflows
Cross-Org AIYour AI talks to partner’s AI, both verifiedB2B agent interop
Tool MarketplaceAI discovers and pays for tools with credentialsEconomic agents

Tier 13: Real-World Simulations

SimulationWhat it models
E-Ticket FlowTruck → Checkpoint → Weigh Station → Destination
KYC RelayUser → Bank → Credit Bureau → Bank
IoT OnboardingDevice → Manufacturer → Owner → Service
Supply ChainProduct → Manufacturer → Shipper → Retailer → Customer
AI Assistant OnboardingUser → Employer → AI Agent → Tools
Agentic CommerceAI Buyer → Marketplace → AI Seller → Payment

Tier 14: Social / Build Your Own

FeatureWhat you learn
Public Chat RoomMulti-party messaging with real developers
DM a DeveloperPeer-to-peer human communication
Agent DirectoryDiscovery
Trading PostPeer credential exchange
Puzzle MasterMulti-developer cooperation
LeaderboardSocial proof

Build Your Own Client Challenges:

ChallengeWhat you build
CLI ChatTerminal-based client
Web ChatBrowser-based client
Mobile WalletView/present credentials
Bot BuilderDeploy your own agent to sandbox
AI Agent WrapperGive your LLM a DID and credentials
MCP ServerExpose your tools via MCP + DIDComm

3.3 Badge Progression

BadgeHow to earnTier
🎫 ExplorerComplete Tier 1-3Quickstart
🤝 ConnectorEstablish 3 peer DID relationships4
🎓 GraduateComplete credential flows5
🔐 Privacy ProComplete ZKP challenges6
⏰ SurvivorUse credential before revocation7
🌡️ Device WhispererControl 3 IoT twins9
⛓️ Chain VerifiedAnchor something to testnet10
🤖 AI WranglerConnect an AI agent with verifiable identity11
🔌 Protocol BridgeSuccessfully bridge A2A or MCP to DIDComm11
🎭 DelegatorIssue delegation credential to an AI assistant11
🏗️ ArchitectComplete multi-agent workflow12
🤝 AI OrchestratorRun multi-agent AI workflow with DIDs12
💬 Social ButterflyChat with 5 developers14
🛠️ BuilderDeploy own agent to sandbox14
🏆 VeteranEarn all badgesAll

Key feature: Badges are real VCs. Persistent. Yours forever.

3.4 Deploying to Production

  • Custom domains
  • Production DID methods
  • Observability setup
  • Scaling considerations

Part 4: Go Deeper

4.1 Architecture

  • Node internals
  • Message pipeline
  • Plugin channels
  • Thread router

4.2 Protocol Reference

ProtocolMessages
trust-pingping, ping-response
basic-messagemessage
out-of-bandinvitation
did-exchangerequest, response, complete
issue-credentialoffer, request, issue, ack
present-proofrequest, presentation, ack
report-problemproblem-report

4.3 API Reference

  • WebSocket Plugin API
  • REST API
  • ExPluginClient (Elixir SDK)

4.4 DID Methods

MethodWhen to use
did:webPublic, discoverable
did:peerPrivate, pairwise
did:ethrBlockchain-anchored

4.5 Credential Formats

FormatZKPWhen to use
JWT VCNoSimple, widely supported
JSON-LD VCNoSemantic interop
AnonCredsYesSelective disclosure

4.6 Security & Key Management

  • Key storage options
  • Key rotation
  • Revocation
  • Policy enforcement

4.7 Deployment

  • Node tiers (Free, Starter, Scale, Enterprise)
  • Custom domains
  • Observability
  • Clustering

Part 5: Integration & Migration

5.1 OAuth/SSO Integration

  • IdP becomes issuer, not runtime dependency
  • Hybrid patterns for transition

5.2 API Key Migration

  • New integrations on DIDComm
  • API gateway translation layer

5.3 mTLS/Certificate Migration

  • Similar trust model, decentralized issuance
  • Coexistence during transition

5.4 AI Agent Integration

The Emerging Standards Landscape:

ProtocolPurposeGovernanceLayr8 Relationship
A2A (Agent2Agent)Agent-to-agent communicationLinux Foundation (150+ orgs)DIDComm is A2A with crypto identity
MCP (Model Context Protocol)Connect agents to tools/dataAgentic AI FoundationLayr8 plugins can be MCP servers
DIDComm v2Secure agent messagingDIF (Decentralized Identity Foundation)Layr8 native protocol

Why identity matters for AI agents:

  • A2A lets agents discover capabilities but doesn’t verify who the agent represents
  • MCP connects tools but doesn’t prove authorization to use them
  • Credentials express authorization, not just authentication
  • Audit trail with cryptographic proof of every AI action
  • Delegation chains: “This AI acts for Alice, who works for Acme”

Integration patterns:

  • MCP + Layr8: Expose your Layr8 agent as an MCP server; AI assistants connect with verified identity
  • A2A Bridge: Translate A2A messages to DIDComm, adding cryptographic signatures
  • LangGraph/CrewAI: Each agent in your workflow gets a DID and credentials
  • Human-in-loop: AI requests approval via present-proof; human signs VC to authorize

5.5 Compliance & Standards

StandardLayr8 Alignment
W3C DID CoreNative support
W3C VC Data ModelJWT and JSON-LD
DIDComm v2Core protocol
eIDAS 2.0 / EUDIVC-compatible
ISO 18013-5 (mDL)Interop path

Market Context

Regulatory Tailwind

  • EU eIDAS 2.0: By Nov 2026, all EU governments must offer digital identity wallets. By Nov 2027, businesses must accept them. 83 million wallets expected by end of 2025.
  • Bhutan: 800K citizens on SSI since Oct 2023. First nation to anchor national ID on Ethereum.

Competitive Positioning

CompanyHeadlineApproach
Dock/Truvera”#1 Decentralized ID Platform”Speed (“12x faster”), additive to existing
SpruceID”Credentials transformed”Scale proof (“3M+ digital IDs”)
TrinsicDeveloper platformSDK-first, pivoted 2024

Layr8 Positioning

“The Oracle of identity” — reliable infrastructure developers trust and advocate for internally. Not flashy, just always there, always works.


Survey for Message Testing

A developer survey has been designed to test:

  1. Awareness of EU/global identity mandates
  2. Pain level with current identity/auth
  3. Which positioning resonates (identity layer, Stripe analogy, AI agents, EU compliance)
  4. What drives trial (quickstart, docs, case studies, open source)

See separate survey document for full questionnaire.


Next Steps

  1. Run developer survey to validate messaging
  2. Revise layr8.io homepage based on results
  3. Build documentation site structure
  4. Implement sandbox world (prioritize Tier 1-5 first)
  5. Create quickstart repos (JS, Elixir, Go)
  6. Launch beta with badge system

Open Questions

  1. Documentation platform choice? (Docusaurus, GitBook, custom)
  2. Sandbox hosting/scaling approach?
  3. Badge NFT integration — optional or core?
  4. Quickstart language priority order?