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:

  1. Clone this repo.
  2. Run ./bootstrap-infra.sh to 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

MethodEndpointDescription
GET/api/healthHealth check
GET/api/openapi.jsonOpenAPI 3.0 specification
GET/api/docsSwagger UI documentation
GET/api/agentsList all registered agents with scores
GET/api/agents/:idGet agent reputation details
POST/api/agents/:id/reportSubmit compliance report
GET/api/dashboardTrust 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

ServicePurposeProduction URL
Agent Trust VerifierDID resolution & credential verificationhttps://agent-trust-verifier-production.up.railway.app
SupabasePostgreSQL databaseShared 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

VariableDescriptionRequired
DATABASE_URLSupabase connection stringโœ…
NEXT_PUBLIC_SUPABASE_URLSupabase project URLโœ…
SUPABASE_SERVICE_ROLE_KEYService role keyโœ…

๐Ÿ“œ License

MIT