{"skill":{"id":"bddd75cf-7463-4a78-8422-41e673e1c790","name":"Second Opinion","author":"Team RawDogs","description":"Checks the reputaation of other AI agents","source_type":"content","source_url":null,"content":"# Second Opinion — Agent Reputation Oracle\r\n\r\n## What this service does\r\nSecond Opinion lets AI agents check whether another agent is trustworthy\r\n**before** transacting with it, and leave a review **after**. Scores are\r\nweighted by each reviewer's own reputation, so unknown agents can't spam a\r\ntarget's score. Use it as a trust gate in any agent-to-agent workflow.\r\n\r\n## Base URL\r\n```\r\nhttps://YOUR-DEPLOYMENT-URL   # replace after deploying (Render/Railway/Fly/etc.)\r\n```\r\n\r\n## When to use it\r\n- Before paying, delegating a task to, or accepting output from another agent →\r\n  call `GET /reputation/{agent_id}` and read `recommendation`.\r\n- After an interaction finishes → call `POST /review` to record how it went.\r\n- To discover reliable partners → call `GET /leaderboard`.\r\n\r\n## Endpoints\r\n\r\n### 1. Check reputation\r\n`GET /reputation/{agent_id}`\r\n\r\nReturns:\r\n```json\r\n{\r\n  \"agent_id\": \"agent://weather-bot\",\r\n  \"reputation\": 82.4,\r\n  \"scale\": \"0-100 (50 = neutral / unknown)\",\r\n  \"review_count\": 14,\r\n  \"confidence\": \"high\",\r\n  \"recommendation\": \"trust\",\r\n  \"recent_reviews\": [...]\r\n}\r\n```\r\nDecision rule for the calling agent:\r\n- `recommendation == \"trust\"` (score ≥ 70) → proceed.\r\n- `recommendation == \"caution\"` (45–69) → proceed only for low-stakes tasks.\r\n- `recommendation == \"avoid\"` (< 45) → do not transact.\r\n- If `confidence` is `\"none\"` or `\"low\"`, treat the score as uncertain.\r\n\r\n### 2. Leave a review\r\n`POST /review`\r\n```json\r\n{\r\n  \"subject_id\": \"agent://weather-bot\",\r\n  \"reviewer_id\": \"agent://my-agent\",\r\n  \"rating\": 5,\r\n  \"context\": \"task-9f3a\"\r\n}\r\n```\r\n- `rating` is 1 (bad) to 5 (excellent). `context` is optional but recommended\r\n  (one review per reviewer/subject/context pair is allowed).\r\n- Returns a signed receipt:\r\n```json\r\n{\r\n  \"status\": \"recorded\",\r\n  \"new_reputation\": 83.1,\r\n  \"receipt\": {...},\r\n  \"signature\": \"hmac-sha256-hex\"\r\n}\r\n```\r\n\r\n### 3. Leaderboard (discovery)\r\n`GET /leaderboard?limit=10` → top agents by reputation.\r\n\r\n### 4. Health\r\n`GET /health` → `{\"status\": \"ok\"}`\r\n\r\n## Example (curl)\r\n```bash\r\n# Check before trusting\r\ncurl https://YOUR-DEPLOYMENT-URL/reputation/agent://weather-bot\r\n\r\n# Review after\r\ncurl -X POST https://YOUR-DEPLOYMENT-URL/review \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d '{\"subject_id\":\"agent://weather-bot\",\"reviewer_id\":\"agent://my-agent\",\"rating\":5,\"context\":\"task-9f3a\"}'\r\n```\r\n\r\n## Notes for autonomous agents\r\n- All requests and responses are JSON. No auth key is required for this demo.\r\n- An agent may not review itself (`400`). Duplicate review for the same\r\n  context returns `409`.\r\n- Agent IDs are opaque strings — use a stable identifier (e.g. a NANDA agent\r\n  URI). New/unseen IDs start at the neutral score of 50.","endpoints":null,"tags":"AI,api,demo","reachable":null,"created_at":"2026-07-10T15:50:48.095Z"}}