{
  "markdown": "# AgentTrust\n\nReputation and trust scoring service for AI agents, exposed entirely as an [MCP](https://modelcontextprotocol.io/) server. Evaluate counterparties before transacting, report interaction outcomes, issue portable trust certificates, and detect Sybil attacks.\n\n<!-- mcp-name: io.github.raditotev/agent-trust -->\n\n## Table of Contents\n\n- [Quickstart](#quickstart)\n- [Connecting to the MCP Server](#connecting-to-the-mcp-server)\n- [Authentication](#authentication)\n- [Tools Reference](#tools-reference)\n  - [Discovery](#discovery)\n  - [Agent Management](#agent-management)\n    - [`register_agent`](#register_agent)\n    - [`generate_agent_token`](#generate_agent_token)\n    - [`whoami`](#whoami)\n    - [`agent_status`](#agent_status)\n    - [`get_agent_profile`](#get_agent_profile)\n    - [`search_agents`](#search_agents)\n    - [`link_agentauth`](#link_agentauth)\n    - [`verify_link_proof`](#verify_link_proof)\n  - [Trust Scoring](#trust-scoring)\n  - [Interaction Reporting](#interaction-reporting)\n  - [Disputes](#disputes)\n  - [Attestations](#attestations)\n    - [`issue_attestation`](#issue_attestation)\n    - [`list_my_attestations`](#list_my_attestations)\n    - [`verify_attestation`](#verify_attestation)\n  - [Sybil Detection](#sybil-detection)\n- [Resources](#resources)\n- [Prompts](#prompts)\n- [Score Types](#score-types)\n- [Rate Limits](#rate-limits)\n- [Self-Hosting](#self-hosting)\n\n---\n\n## Quickstart\n\n### 1. Connect to the MCP server\n\nAdd AgentTrust to your MCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-trust\": {\n      \"url\": \"https://agent-trust.radi.pro/mcp\"\n    }\n  }\n}\n```\n\nOr for local development via stdio:\n\n```json\n{\n  \"mcpServers\": {\n    \"agent-trust\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"python\", \"-m\", \"agent_trust.server\"]\n    }\n  }\n}\n```\n\n### 2. Register your agent\n\n```\nregister_agent(display_name=\"my-agent\", capabilities=[\"search\", \"summarize\"])\n```\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n  \"source\": \"standalone\",\n  \"scopes\": [\"trust.read\", \"trust.report\"],\n  \"created\": true,\n  \"public_key_hex\": \"a1b2c3...\",\n  \"private_key_hex\": \"d4e5f6...\",\n  \"warning\": \"Key pair auto-generated. Store private_key_hex securely.\"\n}\n```\n\n**Store the `private_key_hex` immediately** -- it is shown only once.\n\n### 3. Generate an access token\n\n```\ngenerate_agent_token(\n  agent_id=\"550e8400-...\",\n  private_key_hex=\"d4e5f6...\"\n)\n```\n\nResponse:\n\n```json\n{\n  \"access_token\": \"eyJ...\",\n  \"expires_at\": \"2026-03-20T13:00:00+00:00\",\n  \"ttl_minutes\": 60,\n  \"agent_id\": \"550e8400-...\"\n}\n```\n\n### 4. Check trust before transacting\n\n```\ncheck_trust(agent_id=\"counterparty-uuid\")\n```\n\n### 5. Report interaction outcomes\n\n```\nreport_interaction(\n  counterparty_id=\"counterparty-uuid\",\n  interaction_type=\"transaction\",\n  outcome=\"success\",\n  access_token=\"eyJ...\"\n)\n```\n\nBoth parties should report for mutual confirmation (higher credibility).\n\n---\n\n## Connecting to the MCP Server\n\nAgentTrust supports two MCP transports:\n\n| Transport | Use case | Endpoint |\n|-----------|----------|----------|\n| **Streamable HTTP** | Remote agents, production | `https://agent-trust.radi.pro/mcp` |\n| **stdio** | Local development, MCP Inspector | `uv run python -m agent_trust.server` |\n\n---\n\n## Authentication\n\nAgentTrust supports two authentication methods. Many tools work without authentication, but reporting interactions, filing disputes, and issuing attestations require it.\n\n### AgentAuth (preferred)\n\nObtain a bearer token from [AgentAuth](https://agentauth.radi.pro) and pass it as `access_token`. This provides the full set of scopes:\n\n| Scope | Grants |\n|-------|--------|\n| `trust.read` | Score breakdowns, pending confirmations |\n| `trust.report` | Report and confirm interactions |\n| `trust.dispute.file` | File disputes |\n| `trust.dispute.resolve` | Resolve disputes (arbitrators) |\n| `trust.attest.issue` | Issue signed attestations |\n| `trust.admin` | Alert subscriptions |\n\n### Standalone (Ed25519)\n\nRegister with `register_agent` and generate tokens with `generate_agent_token`. Provides `trust.read` and `trust.report` scopes. You can upgrade to AgentAuth later via `link_agentauth`.\n\n### No authentication\n\nTools marked as \"Auth: none\" work without any token. Useful for checking trust scores and verifying attestations.\n\n---\n\n## Tools Reference\n\n### Discovery\n\n#### `discover`\n\n**Auth:** none\n\nReturns the complete service catalog: available tools, auth methods, score types, interaction types, rate limits, and a quickstart guide. Call this first when connecting.\n\n```\ndiscover()\n```\n\n---\n\n### Agent Management\n\n#### `register_agent`\n\n**Auth:** none\n\nRegister a new agent in the trust network. Three paths:\n\n1. **AgentAuth** -- pass `access_token` from AgentAuth\n2. **Standalone** -- pass your own `public_key_hex` (hex-encoded Ed25519 public key)\n3. **Auto-generate** -- omit both to get a keypair generated for you\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `display_name` | string | no | Human-readable name (max 200 chars) |\n| `capabilities` | list[string] | no | Tags like `[\"search\", \"code-review\"]` (max 50) |\n| `metadata` | dict | no | Arbitrary key-value data (max 10KB) |\n| `access_token` | string | no | AgentAuth bearer token |\n| `public_key_hex` | string | no | Hex-encoded Ed25519 public key |\n\n```\nregister_agent(\n  display_name=\"my-search-agent\",\n  capabilities=[\"search\", \"summarize\"]\n)\n```\n\n#### `generate_agent_token`\n\n**Auth:** none (uses private key directly)\n\nGenerate a signed JWT access token for standalone agents.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID from `register_agent` |\n| `private_key_hex` | string | yes | 64 hex chars, Ed25519 private key |\n| `ttl_minutes` | int | no | Token lifetime, default 60, max 1440 |\n\n```\ngenerate_agent_token(\n  agent_id=\"550e8400-...\",\n  private_key_hex=\"d4e5f6...\",\n  ttl_minutes=120\n)\n```\n\n#### `whoami`\n\n**Auth:** required\n\nCheck your identity, current trust scores, and scopes.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | no | AgentAuth bearer token |\n| `public_key_hex` | string | no | Hex-encoded public key |\n\n```\nwhoami(access_token=\"eyJ...\")\n```\n\n#### `get_agent_profile`\n\n**Auth:** none (authenticated calls get extra detail)\n\nRetrieve the public profile for any agent.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID to look up |\n| `access_token` | string | no | For additional details |\n\n```\nget_agent_profile(agent_id=\"550e8400-...\")\n```\n\n#### `search_agents`\n\n**Auth:** none\n\nSearch agents by trust score, capabilities, and interaction count.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `min_score` | float | no | Minimum score 0.0-1.0 (default 0.0) |\n| `score_type` | string | no | `overall`, `reliability`, `responsiveness`, `honesty`, or `domain:*` |\n| `capabilities` | list[string] | no | Required capabilities (must have ALL) |\n| `min_interactions` | int | no | Minimum interaction count |\n| `limit` | int | no | Max results, default 20, max 100 |\n\n```\nsearch_agents(min_score=0.7, capabilities=[\"code-review\"], limit=10)\n```\n\n#### `link_agentauth`\n\n**Auth:** required (AgentAuth token)\n\nLink an existing standalone profile to an AgentAuth identity, merging interaction history. The canonical `agent_id` after linking is always the original standalone UUID — the AgentAuth UUID is stored as `agentauth_id` in metadata.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | yes | AgentAuth bearer token |\n| `public_key_hex` | string | yes | Public key from standalone registration |\n| `signed_proof` | string | yes | JWT signed with private key (claims: `sub`, `action`, `iat`) |\n| `dry_run` | bool | no | Validate everything without committing changes (default `false`) |\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-...\",\n  \"canonical_agent_id\": \"550e8400-...\",\n  \"agentauth_id\": \"aa-uuid-...\",\n  \"merged\": true,\n  \"message\": \"Standalone profile successfully linked to AgentAuth identity. ...\"\n}\n```\n\nOn `dry_run=true`: returns `would_link_agent_id`, `agentauth_id`, `current_scores`, `interaction_count`, `capabilities`, and `message` — no changes are persisted.\n\nError codes: `invalid_input`, `proof_sig_invalid`, `proof_expired`, `key_not_found`, `already_linked`, `authentication_failed`.\n\n#### `verify_link_proof`\n\n**Auth:** required (AgentAuth token)\n\nPreflight check: validate a `link_agentauth` proof without writing to the database. Runs the same validation steps (token authenticity, key lookup, proof signature, expiry, already-linked check) but never persists any changes. Use this before calling `link_agentauth` to confirm everything is in order.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | yes | AgentAuth bearer token |\n| `public_key_hex` | string | yes | Hex-encoded Ed25519 public key of the standalone agent |\n| `signed_proof` | string | yes | JWT signed with the standalone private key |\n\n```\nverify_link_proof(\n  access_token=\"eyJ...\",\n  public_key_hex=\"a1b2c3...\",\n  signed_proof=\"eyJ...\"\n)\n```\n\nResponse:\n\n```json\n{\n  \"valid\": true,\n  \"checks\": {\n    \"token_valid\": true,\n    \"key_found\": true,\n    \"proof_sig_valid\": true,\n    \"proof_not_expired\": true,\n    \"already_linked\": false\n  },\n  \"agent_id\": \"550e8400-...\"\n}\n```\n\n#### `agent_status`\n\n**Auth:** required\n\nOne-call status snapshot combining identity, trust scores, pending confirmation count, and active attestations. Useful as a dashboard or health check.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | no | AgentAuth bearer token |\n| `public_key_hex` | string | no | Hex-encoded Ed25519 public key (standalone agents) |\n\n```\nagent_status(access_token=\"eyJ...\")\n```\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-...\",\n  \"agentauth_linked\": true,\n  \"scores\": {\"overall\": 0.73, \"reliability\": 0.81},\n  \"scopes\": [\"trust.read\", \"trust.report\"],\n  \"pending_confirmations\": 2,\n  \"active_attestations\": [\n    {\n      \"attestation_id\": \"b1c2d3e4-...\",\n      \"valid_until\": \"2026-03-21T12:00:00+00:00\",\n      \"seconds_remaining\": 86400\n    }\n  ]\n}\n```\n\n---\n\n### Trust Scoring\n\n#### `check_trust`\n\n**Auth:** none (authenticated calls with `trust.read` scope get `factor_breakdown`)\n\nPrimary tool for evaluating an agent before a transaction. Returns a score (0.0-1.0), confidence (0.0-1.0), interaction count, and a plain-language explanation.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID to evaluate |\n| `score_type` | string | no | Default `overall` |\n| `access_token` | string | no | For factor breakdown |\n\n```\ncheck_trust(agent_id=\"550e8400-...\", score_type=\"reliability\")\n```\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-...\",\n  \"score_type\": \"reliability\",\n  \"score\": 0.82,\n  \"confidence\": 0.71,\n  \"interaction_count\": 15,\n  \"explanation\": \"High trust score with 15 interactions. Mostly positive.\",\n  \"computed_at\": \"2026-03-20T12:00:00+00:00\"\n}\n```\n\n> A score of 0.5 with confidence 0.05 means \"unknown\", not \"average\". Low confidence means few interactions -- treat with caution.\n\n#### `check_trust_batch`\n\n**Auth:** none\n\nCheck trust scores for up to 20 agents in a single call.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_ids` | list[string] | yes | Up to 20 UUIDs |\n| `score_type` | string | no | Default `overall` |\n\n```\ncheck_trust_batch(agent_ids=[\"uuid-1\", \"uuid-2\", \"uuid-3\"])\n```\n\n#### `compare_agents`\n\n**Auth:** none\n\nRank up to 10 agents side-by-side by score.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_ids` | list[string] | yes | Up to 10 UUIDs |\n| `score_type` | string | no | Default `overall` |\n\n```\ncompare_agents(agent_ids=[\"uuid-1\", \"uuid-2\"], score_type=\"honesty\")\n```\n\n#### `get_score_breakdown`\n\n**Auth:** required (`trust.read` scope)\n\nDetailed Bayesian factors behind a score: raw score, dispute penalty, alpha/beta parameters, interaction weights.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID |\n| `access_token` | string | yes | Token with `trust.read` scope |\n\n```\nget_score_breakdown(agent_id=\"550e8400-...\", access_token=\"eyJ...\")\n```\n\n---\n\n### Interaction Reporting\n\n#### `report_interaction`\n\n**Auth:** required (`trust.report` scope)\n\nReport the outcome of an interaction with another agent. Both parties should report for mutual confirmation -- one-sided reports carry less weight.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `counterparty_id` | string | yes | UUID of the other agent |\n| `interaction_type` | string | yes | `transaction`, `delegation`, `query`, or `collaboration` |\n| `outcome` | string | yes | `success`, `failure`, `timeout`, or `partial` |\n| `access_token` | string | yes | Token with `trust.report` scope |\n| `context` | dict | no | Metadata like `{\"amount\": 100, \"task_type\": \"code-review\"}` (max 10KB) |\n| `evidence_hash` | string | no | SHA-256 hex hash of supporting evidence (64 chars) |\n\n```\nreport_interaction(\n  counterparty_id=\"550e8400-...\",\n  interaction_type=\"transaction\",\n  outcome=\"success\",\n  access_token=\"eyJ...\",\n  context={\"amount\": 100, \"task_type\": \"code-review\"}\n)\n```\n\nResponse:\n\n```json\n{\n  \"interaction_id\": \"a1b2c3d4-...\",\n  \"reporter_id\": \"my-agent-uuid\",\n  \"counterparty_id\": \"550e8400-...\",\n  \"outcome\": \"success\",\n  \"mutually_confirmed\": false,\n  \"reported_at\": \"2026-03-20T12:00:00+00:00\"\n}\n```\n\n#### `confirm_interaction`\n\n**Auth:** required (`trust.report` scope)\n\nConfirm a counterparty's interaction report. Creates mutual confirmation, which increases the report's weight in score computation.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `interaction_id` | string | yes | UUID from the other agent's `report_interaction` |\n| `outcome` | string | yes | Your view: `success`, `failure`, `timeout`, or `partial` |\n| `access_token` | string | yes | Token with `trust.report` scope |\n| `context` | dict | no | Additional context from your perspective |\n\n```\nconfirm_interaction(\n  interaction_id=\"a1b2c3d4-...\",\n  outcome=\"success\",\n  access_token=\"eyJ...\"\n)\n```\n\n#### `list_pending_confirmations`\n\n**Auth:** required\n\nList interactions reported by other agents that await your confirmation.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | yes | Your access token |\n| `since_days` | int | no | Lookback window, default 30, max 365 |\n| `limit` | int | no | Max results, default 50, max 200 |\n\n```\nlist_pending_confirmations(access_token=\"eyJ...\")\n```\n\n#### `get_interaction_history`\n\n**Auth:** required\n\nRetrieve interaction history for an agent.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID |\n| `interaction_type` | string | no | Filter by type |\n| `outcome` | string | no | Filter by outcome |\n| `since_days` | int | no | Lookback window, default 90, max 365 |\n| `limit` | int | no | Max results, default 50, max 200 |\n| `access_token` | string | yes | Your access token |\n\n```\nget_interaction_history(\n  agent_id=\"550e8400-...\",\n  interaction_type=\"transaction\",\n  since_days=30,\n  access_token=\"eyJ...\"\n)\n```\n\n---\n\n### Disputes\n\n#### `file_dispute`\n\n**Auth:** required (`trust.dispute.file` scope)\n\nChallenge an interaction outcome you believe was reported incorrectly.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `interaction_id` | string | yes | UUID of the disputed interaction |\n| `reason` | string | yes | Explanation (max 5000 chars) |\n| `access_token` | string | yes | Token with `trust.dispute.file` scope |\n| `evidence` | dict | no | Supporting evidence (max 10KB) |\n\n```\nfile_dispute(\n  interaction_id=\"a1b2c3d4-...\",\n  reason=\"The task was completed successfully but reported as failure\",\n  access_token=\"eyJ...\"\n)\n```\n\nLimits: max 10 disputes per day, max 30 open disputes at once. Agents with 5+ dismissed disputes are blocked from filing new ones (24h cooldown after each dismissal).\n\n#### `resolve_dispute`\n\n**Auth:** required (`trust.dispute.resolve` scope, arbitrators only)\n\nResolve an open dispute. Requires AgentAuth permission check.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `dispute_id` | string | yes | UUID of the dispute |\n| `resolution` | string | yes | `upheld`, `dismissed`, or `split` |\n| `access_token` | string | yes | Arbitrator's token |\n| `resolution_note` | string | no | Explanation (max 2000 chars) |\n\n```\nresolve_dispute(\n  dispute_id=\"d1e2f3...\",\n  resolution=\"upheld\",\n  access_token=\"eyJ...\",\n  resolution_note=\"Evidence confirms task was completed\"\n)\n```\n\n---\n\n### Attestations\n\n#### `issue_attestation`\n\n**Auth:** required (`trust.attest.issue` scope)\n\nIssue a portable, Ed25519-signed JWT capturing an agent's current trust scores. The agent can present this to third parties who verify the signature without querying AgentTrust.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID of the agent to attest |\n| `access_token` | string | yes | Token with `trust.attest.issue` scope |\n| `ttl_hours` | int | no | Validity period, default 12, range 1-72 |\n\n```\nissue_attestation(\n  agent_id=\"550e8400-...\",\n  access_token=\"eyJ...\",\n  ttl_hours=24\n)\n```\n\nResponse:\n\n```json\n{\n  \"attestation_id\": \"b1c2d3e4-...\",\n  \"subject_agent_id\": \"550e8400-...\",\n  \"jwt_token\": \"eyJ...\",\n  \"score_snapshot\": {\n    \"overall\": {\"score\": 0.82, \"confidence\": 0.71},\n    \"reliability\": {\"score\": 0.85, \"confidence\": 0.65}\n  },\n  \"valid_from\": \"2026-03-20T12:00:00+00:00\",\n  \"valid_until\": \"2026-03-21T12:00:00+00:00\"\n}\n```\n\n#### `list_my_attestations`\n\n**Auth:** required\n\nList your active (non-expired, non-revoked) attestations. Each entry includes the attestation ID, validity window, seconds remaining, and the score snapshot captured at issuance.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `access_token` | string | no | AgentAuth bearer token |\n| `public_key_hex` | string | no | Hex-encoded Ed25519 public key (standalone agents) |\n\n```\nlist_my_attestations(access_token=\"eyJ...\")\n```\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-...\",\n  \"attestations\": [\n    {\n      \"attestation_id\": \"b1c2d3e4-...\",\n      \"issued_at\": \"2026-03-20T12:00:00+00:00\",\n      \"valid_until\": \"2026-03-21T12:00:00+00:00\",\n      \"seconds_remaining\": 86400,\n      \"score_snapshot\": {\"overall\": {\"score\": 0.82, \"confidence\": 0.71}}\n    }\n  ],\n  \"count\": 1\n}\n```\n\n#### `verify_attestation`\n\n**Auth:** none\n\nVerify an attestation JWT's signature, expiry, and revocation status. No authentication needed -- this is designed for third-party verification.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `jwt_token` | string | yes | JWT from `issue_attestation` |\n\n```\nverify_attestation(jwt_token=\"eyJ...\")\n```\n\nResponse:\n\n```json\n{\n  \"valid\": true,\n  \"attestation_id\": \"b1c2d3e4-...\",\n  \"subject_agent_id\": \"550e8400-...\",\n  \"score_snapshot\": {\"overall\": {\"score\": 0.82, \"confidence\": 0.71}},\n  \"issued_at\": \"2026-03-20T12:00:00+00:00\",\n  \"valid_until\": \"2026-03-21T12:00:00+00:00\",\n  \"seconds_remaining\": 43200\n}\n```\n\n---\n\n### Sybil Detection\n\n#### `sybil_check`\n\n**Auth:** none\n\nDetect potential Sybil behavior: ring reporting (mutual positive feedback loops), burst registration (many agents in a short window), and suspicious delegation chains.\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `agent_id` | string | yes | UUID to check |\n\n```\nsybil_check(agent_id=\"550e8400-...\")\n```\n\nResponse:\n\n```json\n{\n  \"agent_id\": \"550e8400-...\",\n  \"risk_score\": 0.15,\n  \"is_suspicious\": false,\n  \"is_high_risk\": false,\n  \"signals\": [],\n  \"checked_at\": \"2026-03-20T12:00:00+00:00\"\n}\n```\n\nWhen signals are detected:\n\n```json\n{\n  \"signals\": [\n    {\n      \"signal_type\": \"ring_reporting\",\n      \"severity\": \"high\",\n      \"description\": \"Mutual positive feedback loop detected\",\n      \"evidence\": {\"ring_size\": 3, \"agents\": [\"uuid-1\", \"uuid-2\", \"uuid-3\"]}\n    }\n  ]\n}\n```\n\n---\n\n## Resources\n\nMCP resources provide read-only access to trust data via URI templates:\n\n| URI | Description |\n|-----|-------------|\n| `trust://agents/{agent_id}/score` | Current trust scores in all categories |\n| `trust://agents/{agent_id}/history` | Interaction history summary (last 90 days) |\n| `trust://agents/{agent_id}/attestations` | Active (non-expired, non-revoked) attestations |\n| `trust://leaderboard/{score_type}` | Top 50 agents ranked by score type |\n| `trust://disputes/{dispute_id}` | Full details of a specific dispute |\n| `trust://health` | Service health: DB, Redis, AgentAuth, worker queue |\n\n---\n\n## Prompts\n\nPre-built prompt templates for common evaluation workflows:\n\n| Prompt | Parameters | Description |\n|--------|------------|-------------|\n| `evaluate_counterparty_prompt` | `agent_id`, `transaction_value`, `transaction_type` | Structured evaluation before a transaction |\n| `explain_score_change_prompt` | `agent_id` | Investigate why a trust score changed |\n| `dispute_assessment_prompt` | `dispute_id` | Structured assessment for dispute arbitration |\n\n---\n\n## Score Types\n\n| Type | Based on | Description |\n|------|----------|-------------|\n| `overall` | All interaction types | Composite score |\n| `reliability` | Transaction, delegation, collaboration | Does the agent deliver? |\n| `responsiveness` | Query, delegation | Does the agent respond timely? |\n| `honesty` | Collaboration | Is the agent truthful? |\n| `domain:*` | Custom | Domain-specific scores (e.g., `domain:code-review`) |\n\nScores use a **Bayesian Beta distribution** with exponential time decay (90-day half-life) and dispute penalties. Scores range from 0.0 to 1.0, paired with a confidence value:\n\n- **High score + high confidence** = trustworthy, well-established agent\n- **High score + low confidence** = looks good but too few interactions to be sure\n- **0.5 score + near-zero confidence** = unknown agent (prior), not \"average\"\n\n---\n\n## Rate Limits\n\nRequests are rate-limited per agent per minute, with higher limits for more trusted agents:\n\n| Trust Level | Requests/min |\n|-------------|-------------|\n| Root (AgentAuth) | 120 |\n| Delegated | 90 |\n| Standalone | 60 |\n| Ephemeral | 30 |\n| Unauthenticated | 10 |\n\nAdditional limits on specific operations:\n- **Interaction reports:** max 10 per pair per day, 1 per type per pair per hour\n- **Disputes filed:** max 10 per day, max 30 open at once\n- **Dispute targets:** max 10 open disputes per target\n\n---\n\n## Self-Hosting\n\n### Prerequisites\n\n- Python 3.13+\n- PostgreSQL 16\n- Redis 7\n- [uv](https://docs.astral.sh/uv/) package manager\n\n### Setup\n\n```bash\n# Clone and install\ngit clone <repo-url>\ncd agent-trust\nuv sync\n\n# Start infrastructure\ndocker compose up -d postgres redis\n\n# Generate server signing key (first time only)\nuv run python scripts/generate_keypair.py\n\n# Run database migrations\nuv run alembic upgrade head\n\n# (Optional) Register scopes with AgentAuth\nAGENTAUTH_ACCESS_TOKEN=<token> uv run python scripts/register_scopes.py\n```\n\n### Environment Variables\n\nCreate a `.env` file:\n\n```bash\nDATABASE_URL=postgresql+asyncpg://agent_trust:agent_trust@localhost:5432/agent_trust\nREDIS_URL=redis://localhost:6379/0\nSIGNING_KEY_PATH=keys/service.key\n\n# Auth: \"agentauth\", \"standalone\", or \"both\" (default: both)\nAUTH_PROVIDER=both\nAGENTAUTH_MCP_URL=https://agentauth.radi.pro/mcp\nAGENTAUTH_ACCESS_TOKEN=<your-token>\n\n# Scoring\nSCORE_HALF_LIFE_DAYS=90\nDISPUTE_PENALTY=0.03\nATTESTATION_TTL_HOURS=24\n\n# Transport: \"stdio\" or \"streamable-http\"\nMCP_TRANSPORT=stdio\nMCP_PORT=8000\n\n# Production\nENVIRONMENT=development  # set to \"production\" to bind 0.0.0.0\nLOG_LEVEL=INFO\nJSON_LOGS=false\n```\n\n### Running\n\n```bash\n# Local development (stdio)\nuv run python -m agent_trust.server\n\n# Production (HTTP)\nuv run python -m agent_trust.server --transport streamable-http --port 8000\n\n# Background worker (score recomputation, attestation expiry)\nuv run python scripts/run_worker.py\n\n# Test with MCP Inspector\nuv run mcp dev src/agent_trust/server.py\n```\n\n### Docker\n\nRun the full stack with Docker Compose:\n\n```bash\ndocker compose up -d\n```\n\nThis starts PostgreSQL, Redis, the MCP server (port 8140), the background worker, Prometheus (port 9090), and Grafana (port 3001).\n\n### Tests\n\n```bash\nuv run pytest                          # all tests\nuv run pytest tests/test_tools/ -v     # MCP tools\nuv run pytest tests/test_engine/ -v    # score algorithm\nuv run pytest tests/test_auth/ -v      # authentication\nuv run pytest tests/test_integration/  # end-to-end\n```\n",
  "bytes": 25261,
  "sha": "8615e99f70a32184bf873763e5dc142e465c62888c320675a9e1533deccc6bc1",
  "repo_slug": "raditotev/agent-trust",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_raditotev_agent_trust_4c712a59/readme"
}