Agent Trust Protocol
January 9, 2026 ยท View on GitHub
๐ ARCHITECTURAL ANCHOR
This project is part of the Berlin AI Automation Studio. It is governed by the global rules in berlin-ai-infra.
Setup for new laptops:
- Clone this repo.
- Run
./bootstrap-infra.shto link to the global Master Brain.
Agent Trust Protocol
Decentralized reputation and compliance protocol for autonomous AI agents.
๐ฏ What This Does
The Agent Trust Protocol tracks and verifies AI agent behavior across the Berlin AI ecosystem. It provides:
- Reputation Scoring: Quantified trust metrics based on historical compliance and uptime
- Identity Verification: DID-based agent identity for cross-service authentication
- Regulatory Alignment: EU AI Act compliance tracking for insurers and auditors
๐ก API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health | Health check |
| GET | /api/openapi.json | OpenAPI 3.0 specification |
| GET | /api/docs | Swagger UI documentation |
| GET | /api/agents | List all registered agents with scores |
| GET | /api/agents/:id | Get agent reputation details |
| POST | /api/agents/:id/report | Submit compliance report |
| GET | /api/dashboard | Trust score dashboard data |
๐๏ธ Architecture
src/
โโโ domain/ # Agent entity, TrustScore value object
โโโ application/ # CalculateTrustScore, ReportCompliance use cases
โโโ infrastructure/ # Supabase adapter, external API clients
โโโ lib/
โ โโโ trust-protocol/ # Extracted microservice (reusable)
โโโ app/ # Next.js App Router pages and API routes
๐ Quick Start
# Install dependencies
npm install
# Generate Prisma client
npx prisma generate
# Start development server
npm run dev
Open http://localhost:3000 to view the trust dashboard.
๐งช Testing
# Unit tests
npm run test
# With coverage (target: โฅ80%)
npm run test:coverage
# E2E tests
npm run test:e2e
๐ Dependencies
| Service | Purpose | Production URL |
|---|---|---|
| Agent Trust Verifier | DID resolution & credential verification | https://agent-trust-verifier-production.up.railway.app |
| Supabase | PostgreSQL database | Shared instance (table prefix: atp_) |
๐ Status
- Deployment: Railway
- Production URL:
https://agent-trust-protocol-production.up.railway.app - Catalog Entry: Microservices_Catalog.md
- OpenAPI: โ Agent-Ready
โ๏ธ Environment Variables
| Variable | Description | Required |
|---|---|---|
DATABASE_URL | Supabase connection string | โ |
NEXT_PUBLIC_SUPABASE_URL | Supabase project URL | โ |
SUPABASE_SERVICE_ROLE_KEY | Service role key | โ |
๐ License
MIT