How 2823sanskar/agenttrust works
AgentTrust lets developers register AI agents, submit tasks, inspect execution evidence, and share verifiable run proofs. The backend routes executions to supported providers, records telemetry, hashes the evidence, attempts Stellar anchoring, and recalculates trust; users can then inspect runs and verify proofs. The graph covers the sampled API and execution path plus major README-documented capabilities. Some provider, UI, and verification details are represented only at their source-file level because those implementations were not excerpted.
Main entry points: execution_service.py Run orchestration · main.py FastAPI application · verify.py Verification API · api.ts API client
Components 30
User application
- AgentTrust web app
frontend/app/(landing)/page.tsx - API client
frontend/lib/api.ts - Agent discovery and registration
frontend/app/agents/page.tsx - Task execution
frontend/app/agents/[id]/execute/page.tsx - Run details
frontend/app/runs/[id]/page.tsx - Public verification
frontend/app/verify/[runId]/page.tsx
Backend API
- Authentication and wallet
backend/app/api/auth.py - Agent management API
backend/app/api/agents.py - Execution API
backend/app/api/executions.py - Verification API
backend/app/api/verify.py - Trust API
backend/app/api/trust.py - Sandbox health API
backend/app/api/sandbox.py - FastAPI application
backend/app/main.py - JWT and account service
backend/app/services/auth_service.py
Execution and reputation
- Agent lifecycle
backend/app/services/agent_service.py - Run orchestration
backend/app/services/execution_service.py - OpenRouter provider
backend/app/services/ai_provider.py - Browser runner
backend/app/services/browser_agent.py - Docker runner
backend/app/services/docker_sandbox.py - Remote worker runner
backend/app/services/vm_sandbox.py - Sandbox worker
sandbox-worker/worker.py - Trust scoring
backend/app/services/trust_service.py
Persistence and proof
- Evidence fingerprinting
backend/app/utils/hashing.py - Stellar anchoring and lookup
backend/app/blockchain/stellar.py - SQLAlchemy session layer
backend/app/database.py - Agent records
backend/app/models/agent.py - Run telemetry
backend/app/models/run.py - User and wallet records
backend/app/models/user.py - Trust score records
backend/app/models/trust_score.py
Other components
- Developer or user
Connections 36
- Developer or user → AgentTrust web app: uses
README.md - AgentTrust web app → API client: requests data
README.md - API client → Agent management API: calls API
- API client → Execution API: submits tasks
- API client → Verification API: requests proof
- FastAPI application → Authentication and wallet: registers router
backend/app/main.py - FastAPI application → Agent management API: registers router
backend/app/main.py - FastAPI application → Execution API: registers router
backend/app/main.py - FastAPI application → Trust API: registers router
backend/app/main.py - FastAPI application → Verification API: registers router
backend/app/main.py - FastAPI application → Sandbox health API: registers router
backend/app/main.py - Authentication and wallet → JWT and account service: delegates auth
backend/app/api/auth.py - Agent management API → Agent lifecycle: delegates management
backend/app/api/agents.py - Execution API → Run orchestration: starts and reads runs
backend/app/api/executions.py - Verification API → Run orchestration: verifies run
backend/app/api/verify.py - Agent lifecycle → Agent records: creates and queries
backend/app/services/agent_service.py - Agent lifecycle → Trust score records: creates score
backend/app/services/agent_service.py - Run orchestration → OpenRouter provider: executes provider
backend/app/services/execution_service.py - Run orchestration → Browser runner: runs browser task
backend/app/services/execution_service.py - Run orchestration → Docker runner: runs local container
backend/app/services/execution_service.py - Run orchestration → Remote worker runner: runs remote container
backend/app/services/execution_service.py - Remote worker runner → Sandbox worker: dispatches task
- Run orchestration → Evidence fingerprinting: hashes evidence
backend/app/services/execution_service.py - Run orchestration → Stellar anchoring and lookup: anchors hash
backend/app/services/execution_service.py - Run orchestration → Trust scoring: recalculates score
backend/app/services/execution_service.py - Run orchestration → Run telemetry: persists telemetry
backend/app/services/execution_service.py - Run orchestration → Agent records: loads agent
backend/app/services/execution_service.py - Run orchestration → User and wallet records: loads user
backend/app/services/execution_service.py - Trust scoring → Run telemetry: reads executions
backend/app/services/trust_service.py - Trust scoring → Trust score records: updates score
backend/app/services/trust_service.py - Verification API → Run details: serves run data
- Public verification → Verification API: checks proof
- SQLAlchemy session layer → Agent records: provides ORM base
backend/app/models/agent.py - SQLAlchemy session layer → Run telemetry: provides ORM base
backend/app/models/run.py - SQLAlchemy session layer → User and wallet records: provides ORM base
backend/app/models/user.py - JWT and account service → User and wallet records: reads and writes users
backend/app/services/auth_service.py