-
Notifications
You must be signed in to change notification settings - Fork 0
Project Overview
- Introduction
- Project Structure
- Core Components
- Architecture Overview
- Detailed Component Analysis
- Dependency Analysis
- Performance Considerations
- Troubleshooting Guide
- Conclusion
AgentID is the Bags-native trust layer for AI agents. It provides a trust verification layer that:
- Wraps Bags' Ed25519 agent authentication flow to establish wallet ownership
- Binds agent identities to the Solana Agent Registry (SAID Protocol)
- Adds Bags-specific reputation scoring
- Surfaces a human-readable trust badge inside Bags chat and embeddable widgets
AgentID's value is rooted in PKI challenge-response spoofing prevention using Ed25519, ensuring that only agents who truly control the private key can operate.
Target audience:
- Every one of the 48 AI Agent projects participating in the hackathon
- Every Bags user interacting with agents
- Developers building on Bags who want their agents to display a trust badge
Core value proposition:
- First Bags-native binding layer connecting SAID with the Bags ecosystem
- PKI challenge-response prevents spoofing and enables runtime verification
- Human-readable trust indicators and embeddable badges for transparency
The repository is organized into a backend API service and a frontend UI and widget system:
- Backend: Node.js/Express API with routes, services, models, and middleware
- Frontend: React-based registry UI and embeddable widget
graph TB
subgraph "Backend"
CFG["Config<br/>environment variables"]
DB["PostgreSQL<br/>agent_identities, agent_verifications, agent_flags"]
SRV["Services<br/>bagsAuthVerifier, saidBinding, pkiChallenge, bagsReputation, badgeBuilder"]
ROUTES["Routes<br/>register, verify, badge, reputation"]
end
subgraph "Frontend"
UI["Registry UI<br/>pages, components"]
WIDGET["Widget<br/>embeddable HTML/SVG"]
end
CFG --> ROUTES
ROUTES --> SRV
SRV --> DB
UI --> ROUTES
WIDGET --> ROUTES
- Bags Auth Wrapper: Validates wallet ownership via Bags Ed25519 challenge-response
- SAID Binding: Registers or verifies agents in the SAID Identity Gateway
- PKI Challenge-Response: Ongoing verification using Ed25519 challenge messages
- Bags Reputation Scoring: Computes a 0-100 score using five factors
- Trust Badge: Human-readable badge JSON, SVG, and embeddable widget
AgentID sits between Bags agents and the applications/users interacting with them. It integrates with Bags API for authentication and analytics, with SAID for trust scores and A2A discovery, and exposes a trust badge and verification endpoints.
graph TB
subgraph "External Systems"
BAGS["Bags API<br/>/agent/v2/auth/*, /analytics/*"]
SAID["SAID Identity Gateway<br/>/agents/register, /agents/:pubkey, /discover"]
end
subgraph "AgentID Backend"
R["Routes<br/>/register, /verify/*, /badge/*, /reputation/*"]
S_BAGS["Service: bagsAuthVerifier"]
S_SAID["Service: saidBinding"]
S_PKI["Service: pkiChallenge"]
S_REP["Service: bagsReputation"]
S_BADGE["Service: badgeBuilder"]
Q["Queries<br/>DB access"]
DB["PostgreSQL"]
end
subgraph "AgentID Frontend"
UI["Registry UI"]
W["Widget"]
end
BAGS <- --> S_BAGS
SAID <- --> S_SAID
R --> S_BAGS
R --> S_SAID
R --> S_PKI
R --> S_REP
R --> S_BADGE
S_BAGS --> Q
S_SAID --> Q
S_PKI --> Q
S_REP --> Q
S_BADGE --> Q
Q --> DB
UI --> R
W --> R
AgentID's registration flow wraps Bags' Ed25519 auth to verify wallet ownership.
AgentID issues time-bound challenges and verifies Ed25519 signatures to prevent spoofing.
AgentID registers or retrieves agent trust data from SAID and augments it with Bags-specific metadata.
AgentID computes a 0-100 score combining fee activity, success rate, registration age, SAID trust score, and community verification.
AgentID exposes badge JSON, SVG badge, and HTML widget endpoints.
AgentID's backend depends on:
- External APIs: Bags API, SAID Identity Gateway
- Internal services: Ed25519 verification, SAID binding, PKI challenge-response
- Data stores: PostgreSQL, Redis
- Caching: Badge JSON cached with configurable TTL
- Rate limiting: Authentication endpoints use rate limits
- Database indexing: JSONB fields for capability sets
- Asynchronous operations: SAID binding is non-blocking
Common issues:
- Registration failures due to invalid signature
- SAID registration unavailable
- Verification errors (nonce expired)
- Badge not found
AgentID delivers a Bags-native trust layer that wraps Bags Ed25519 auth, binds agents to SAID, adds Bags-specific reputation scoring, provides human-readable trust badges, and prevents spoofing via PKI challenge-response.