-
Notifications
You must be signed in to change notification settings - Fork 0
Project Core Components
- Introduction
- Project Structure
- Core Components
- Architecture Overview
- Detailed Component Analysis
- Dependency Analysis
- Performance Considerations
- Troubleshooting Guide
- Conclusion
This document details the six major subsystems that compose AgentID's trust verification platform. Each component collaborates to establish identity, prevent spoofing, compute reputation, and surface trust signals.
AgentID is organized into a backend service (Node.js/Express) and a frontend (React/Vite).
graph TB
subgraph "Backend"
CFG["config/index.js"]
DB["models/db.js"]
Q["models/queries.js"]
R1["routes/register.js"]
R2["routes/verify.js"]
R3["routes/badge.js"]
R4["routes/widget.js"]
R5["routes/reputation.js"]
S1["services/bagsAuthVerifier.js"]
S2["services/saidBinding.js"]
S3["services/pkiChallenge.js"]
S4["services/bagsReputation.js"]
S5["services/badgeBuilder.js"]
end
subgraph "Frontend"
FE1["components/TrustBadge.jsx"]
FE2["widget/Widget.jsx"]
FE3["lib/api.js"]
end
CFG --> S1
CFG --> S2
CFG --> S3
CFG --> S4
CFG --> S5
CFG --> DB
DB --> Q
R1 --> S1
R1 --> S2
R1 --> Q
R2 --> S3
R2 --> Q
R3 --> S5
R3 --> Q
R4 --> S5
R5 --> S4
R5 --> Q
FE1 --> FE3
FE2 --> FE3
Purpose: Wrap Bags' Ed25519 agent authentication to verify wallet ownership.
Key behaviors:
- Initialize Bags auth challenge
- Verify Ed25519 signature locally
- Return reference identifier
Purpose: Bind agent identity to SAID Identity Gateway.
Key behaviors:
- Register agent with SAID
- Retrieve SAID trust score
- Discover agents by capability
Purpose: Persist AgentID-specific agent data.
Key entities:
- agent_identities: metadata, status, scores
- agent_verifications: challenges with expiry
- agent_flags: community-reported flags
Purpose: Ongoing verification to prevent spoofing.
Key behaviors:
- Issue challenge with random nonce
- Enforce single-use and expiry
- Verify Ed25519 signature
Purpose: Compute composite trust score (0-100).
Factors:
- Fee activity (max 30)
- Success rate (max 25)
- Registration age (max 20)
- SAID trust score (max 15)
- Community verification (max 10)
Purpose: Expose trust badges in multiple formats.
Endpoints:
- GET /badge/:pubkey → JSON
- GET /badge/:pubkey/svg → SVG
- GET /widget/:pubkey → HTML widget
AgentID orchestrates identity, verification, and trust presentation across three layers.
Each component is documented with sequence diagrams and implementation details covering authentication flow, SAID integration, database schema, challenge-response, reputation calculation, and badge generation.
- External: Bags API, SAID Gateway, PostgreSQL, Redis
- Internal: services depend on models; routes depend on services
- Caching: Badge JSON cached in Redis
- Database pooling: PostgreSQL with SSL
- Rate limiting: Route-level protection
- Async operations: Non-blocking SAID binding
- Registration: Check signature format
- Verification: Re-issue expired challenges
- Badge: Verify pubkey and registration
AgentID's six components form a cohesive trust layer establishing ownership, integrating with Solana ecosystem, persisting state, preventing spoofing, synthesizing signals, and delivering trust indicators.