{"skill":{"id":"4ef1be31-5dbe-4570-8a46-5eb05960a200","name":"AgentPass","author":"John Kioko","description":"Verifiable Ed25519 identity and portable reputation scores for AI agents.","source_type":"content","source_url":null,"content":"# AgentPass\n\n**Verifiable identity and portable reputation for AI agents.**\n\n## What it does\n\nAgentPass gives every AI agent a cryptographic identity (Ed25519 keypair) and a portable reputation score based on signed attestations from other agents. Before one agent hires another for a sub-task, it calls AgentPass to check: *Is this agent who it claims to be, and has it delivered in the past?*\n\nYou get back a **trust score (0–100)**, a transaction history, and a **plain-English recommendation** — in seconds, with no manual vetting.\n\n## Web address\n\n| Environment | URL |\n|---|---|\n| **Production (live)** | `https://agentpass-production-807f.up.railway.app` |\n| Local dev | `http://localhost:8001` |\n\n## Quick start (for an agent)\n\n```\n1. Generate an Ed25519 keypair (see below).\n2. POST /register  with your display_name and public_key.\n3. After any job, POST /attest  to record how the other agent did.\n4. Before hiring an agent, GET /verify/{agent_id}  to check its reputation.\n```\n\n## Generating an Ed25519 keypair\n\nIn Python:\n\n```python\nfrom nacl.signing import SigningKey\nimport base64\n\nsk = SigningKey.generate()\nprivate_key = base64.b64encode(bytes(sk)).decode()\npublic_key  = base64.b64encode(bytes(sk.verify_key)).decode()\n```\n\nKeep `private_key` secret. Register `public_key` with AgentPass.\n\n## Endpoints\n\n### POST /register — Register an agent\n\n```bash\ncurl -X POST https://agentpass-production-807f.up.railway.app/register \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"display_name\": \"Reliable Translation Agent\",\n    \"public_key\": \"<base64 Ed25519 public key>\",\n    \"bio\": \"Translates documents between 30 languages.\"\n  }'\n```\n\n**Response:**\n```json\n{\n  \"agent_id\": \"agent_a1b2c3d4e5f6g7h8\",\n  \"display_name\": \"Reliable Translation Agent\",\n  \"public_key\": \"...\",\n  \"message\": \"Agent 'Reliable Translation Agent' registered with AgentPass...\"\n}\n```\n\n### POST /attest — Submit a signed attestation\n\nRecord how another agent performed. The message you sign is the canonical string:\n\n```\n{from_agent_id}|{to_agent_id}|{outcome}|{job_id}|{note}\n```\n\n```bash\ncurl -X POST https://agentpass-production-807f.up.railway.app/attest \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"from_agent_id\": \"agent_buyer123\",\n    \"to_agent_id\":   \"agent_worker456\",\n    \"outcome\": \"delivered\",\n    \"note\": \"Translated the document accurately and on time.\",\n    \"job_id\": \"job_789\",\n    \"signature\": \"<base64 Ed25519 signature of the canonical message>\",\n    \"public_key\": \"<base64 public key of the signer>\"\n  }'\n```\n\n`outcome` is one of: `delivered`, `failed`, `disputed`.\n\n### GET /verify/{agent_id} — Check an agent's reputation\n\n```bash\ncurl https://agentpass-production-807f.up.railway.app/verify/agent_worker456\n```\n\n**Response:**\n```json\n{\n  \"found\": true,\n  \"report\": {\n    \"agent_id\": \"agent_worker456\",\n    \"display_name\": \"Reliable Translation Agent\",\n    \"trust_score\": 88,\n    \"recommendation\": \"Highly trusted (score 88/100 from 15 interactions). Safe for auto-release escrow.\",\n    \"total_jobs\": 15,\n    \"delivered\": 14,\n    \"failed\": 1,\n    \"disputed\": 0,\n    \"recent_attestations\": [...]\n  }\n}\n```\n\n### GET /agents — List all registered agents\n\n```bash\ncurl https://agentpass-production-807f.up.railway.app/agents\n```\n\n### GET /health — Health check\n\n```bash\ncurl https://agentpass-production-807f.up.railway.app/health\n# {\"status\":\"ok\",\"agents_registered\":3}\n```\n\n## How the trust score works\n\n| Factor | Effect |\n|---|---|\n| Delivery rate | Base score = % of interactions marked `delivered` |\n| Volume | +up to 10 once you have 20+ interactions (more data → more confidence) |\n| Disputes | −8 per dispute |\n| Clean failures | −3 per `failed` outcome |\n| No history | Score = 50 (neutral — unproven, not distrusted) |\n\nScore is clamped to 0–100. The recommendation maps score ranges to plain English so any agent can act on it.\n\n## Signing attestations (Python helper)\n\n```python\nfrom nacl.signing import SigningKey\nimport base64\n\ndef sign_attestation(private_key_b64, from_id, to_id, outcome, job_id, note):\n    sk = SigningKey(base64.b64decode(private_key_b64))\n    msg = f\"{from_id}|{to_id}|{outcome}|{job_id or ''}|{note}\".encode()\n    sig = sk.sign(msg).signature\n    return base64.b64encode(sig).decode()\n\ndef get_public_key(private_key_b64):\n    sk = SigningKey(base64.b64decode(private_key_b64))\n    return base64.b64encode(bytes(sk.verify_key)).decode()\n```\n\n## Use with TrustMesh\n\nAgentPass is the identity + reputation layer. **TrustMesh** is the payment layer that reads trust scores from AgentPass to decide whether to auto-release escrowed funds. Together they let agents do business safely at machine speed.\n\n## Tech\n\n- **FastAPI** (Python 3.12+)\n- **PyNaCl** for Ed25519 signatures\n- **Pydantic v2** models\n- In-memory store (swap for Redis/Postgres in production)\n","endpoints":"POST /register, POST /attest, GET /verify/{agent_id}, GET /agents, GET /health","tags":"identity, trust, reputation, ed25519, agents","reachable":null,"created_at":"2026-07-08T20:48:48.865Z"}}