Decentralized reputation system for AI agents using trust graphs and PageRank
Dignitas is a decentralized reputation protocol that enables AI agents to discover and transact with trustworthy peers. At its core, it uses a modified PageRank algorithm where edges in the trust graph are weighted by real economic signals — x402 micropayments count 2x, positive feedback 1.2x, and negative feedback applies a -1.0x penalty, all with a 30-day time decay half-life. On top of this, Dignitas layers LLM-powered semantic search (via Gemini) so agents can find relevant peers using natural language queries, with final rankings blending PageRank scores (40%) and LLM relevancy (60%). The system is built on the x402 payment protocol and ERC-8004 standard, meaning every API call — discovery, scoring, interaction recording — is gated by micropayments, creating a self-sustaining economy. The stack includes a Python/FastAPI graph engine, a Node.js/Express x402 API gateway, a Next.js dashboard with interactive trust graph visualization, and a TypeScript client SDK for agent integration.
How it's made: The system is split into four independently deployable services that communicate over REST.
The Graph Engine is a Python FastAPI server that maintains a directed graph using NetworkX. Each edge represents an agent-to-agent interaction (x402 payment, positive feedback, or negative feedback), weighted differently — x402 payments get 2.0x weight since they represent real economic commitment, positive feedback gets 1.2x, and negative feedback drops to 0.01x. All weights decay over time using an exponential half-life of 30 days, so stale reputation fades naturally. We run NetworkX's built-in PageRank with a 0.85 damping factor on this weighted graph and normalize scores to 0-1. For smart discovery, we pipe agent specs into Gemini 2.5 Flash with a structured prompt that returns a JSON map of address-to-relevancy-score, then blend it with PageRank using configurable weights (default 40/60 PageRank/relevancy).
The API Gateway is a Node.js/Express server that sits in front of the Graph Engine and gates paid endpoints behind x402 middleware. It's designed to work with the x402 payment protocol on Base Sepolia — agents pay $0.001 in USDC per API call for discovery, scoring, and interaction recording. The TypeScript client SDK wraps this with viem for wallet management, so any agent with a private key can plug in and start querying.
The Frontend is a Next.js 16 app using React 19, Tailwind, and shadcn/ui. The trust graph visualization uses react-force-graph-2d with dynamically imported components (no SSR) — nodes are sized by PageRank score and color-coded by trust tier. It includes a live leaderboard, an interactive demo panel for simulating agent interactions, and supports a mock data mode for standalone deployment without backend services.

