{
  "markdown": "# Badge by kya labs\n\nPersistent identity for AI agents across merchant sites. Badge gives agents a credential they carry on every request — merchants verify it, trust accumulates across visits, and agents that build history earn better treatment over time.\n\nFramework-agnostic. Transport-agnostic. Zero runtime dependencies.\n\n---\n\n## Badge SDK\n\nThe SDK is the primary integration surface. Three methods cover the full lifecycle:\n\n```typescript\nimport { Badge } from \"@kyalabs/badge-sdk\";\n\nconst badge = await Badge.init();\nconst runId = badge.startRun();\n\nawait badge.declareVisit({\n  merchant: \"store.example.com\",\n  runId,\n  url: \"https://store.example.com/cart\",\n});\n\nawait badge.reportOutcome({\n  merchant: \"store.example.com\",\n  runId,\n  outcome: \"not_denied\",\n});\n```\n\nNo signup. No API key. `Badge.init()` issues a guest pass on first run and caches it to disk. Identity survives process restarts.\n\n```bash\nnpm install @kyalabs/badge-sdk\n```\n\n**[Full SDK documentation →](packages/sdk/README.md)**\n\n### What the SDK covers\n\n- **Identity model** — three-tier ladder: guest pass (`gp_v1_*`) → badge token (`kya_*`) → authenticated identity\n- **Lifecycle tracking** — declare visits, report outcomes, correlate with run IDs\n- **Offline resilience** — never throws on network failure, deterministic fallback on every call\n- **UCP integration** — `io.kyalabs.common.identity` Credential Provider, published schemas, ES256-signed JWTs\n- **Scoring** — outcomes feed kyaScore (500–850), portable across merchants\n\n[![npm](https://img.shields.io/npm/v/@kyalabs/badge-sdk)](https://www.npmjs.com/package/@kyalabs/badge-sdk)\n\n---\n\n## Badge MCP Server\n\nFor MCP client users (Claude Desktop, Cursor, Windsurf), Badge also ships as an MCP tool server. The MCP server wraps the SDK — same identity model, same tokens, same scoring.\n\n```bash\nnpx @kyalabs/badge\n```\n\nThe SDK is the canonical integration path for platform builders and agent frameworks. The MCP server is a convenience wrapper for end users working within MCP clients.\n\n[![npm](https://img.shields.io/npm/v/@kyalabs/badge)](https://www.npmjs.com/package/@kyalabs/badge)\n\n---\n\n## Links\n\n- **Website:** [kyalabs.io](https://www.kyalabs.io)\n- **Data practices:** [kyalabs.io/trust](https://www.kyalabs.io/trust)\n- **UCP extension spec:** [github.com/kyalabs/ucp-agent-badge](https://github.com/kyalabs/ucp-agent-badge)\n- **Contact:** agent_identity@kyalabs.io\n\n## License\n\nMIT\n",
  "bytes": 2430,
  "sha": "e007855795419987de48aa5b5cf984d9eff2cfcd80d5fabf39426c0228937dfb",
  "repo_slug": "payclaw/badge-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_payclaw_badge_bacbf3b3/readme"
}