{
  "markdown": "# Agent Handoff Middleware\n\nServerless middleware for AI agent handoffs with built-in Stripe metered billing. Clean, enrich, and route messages between AI agents in one API call.\n\n## Live API\n\n```bash\nhttps://agent-handoff-production-573c.up.railway.app\n```bash\n\n## Endpoints\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| /handoff | POST | Process and route a message to the next agent |\n| /health | GET | Service health check |\n| /stats | GET | Usage statistics (requires API key) |\n| /mcp | POST | Model Context Protocol server (`handoff` + `get_usage_stats` tools) — same auth/billing path as REST |\n\n## Quick Start\n\n```bash\ncurl -X POST https://agent-handoff-production-573c.up.railway.app/handoff -H 'x-api-key: your-key' -H 'Content-Type: application/json' -d '{\"message\": {\"task\": \"Summarize this\"}, \"next_agent\": \"summarizer\"}'\n```bash\n\n## PowerShell Module\n\n```powershell\nInstall-Module AgentHandoff\n$env:HANDOFF_API_KEY = 'your-key'\n$result = Invoke-AgentHandoff -Message @{ task = 'Summarize this' } -NextAgent 'summarizer' -VerboseOutput\n```powershell\n\n## Pricing\n\n- Pay-per-use: $0.001 per handoff via Stripe\n- Pro tier: $29/month for unlimited handoffs\n\n## Tech Stack\n\n- FastAPI + Python\n- Railway deployment\n- Stripe metered billing\n- Slowapi rate limiting\n\n## Links\n\n- [PowerShell Gallery](https://www.powershellgallery.com/packages/AgentHandoff)\n- [Live API](https://agent-handoff-production-573c.up.railway.app/health)\n\n## Recent changes (2026-07-27)\n\n- **MCP server added** at `POST /mcp` — exposes `handoff` and `get_usage_stats` as MCP tools over JSON-RPC 2.0, discoverable via `tools/list`. Runs through the exact same auth → usage → billing path as the REST `/handoff` endpoint, so it can't become an unmetered bypass. `server.json` added for the official MCP registry (schema-validated); publishing via `mcp-publisher` is still pending.\n- **Durable billing-failure audit trail** — failures now persist to Supabase (`public.billing_failures`) instead of only an ephemeral local file that reset on every redeploy.\n",
  "bytes": 2065,
  "sha": "ac3a266c3ecbb4078ab85aa5a6830e54c44dabc656dedea91c51d1d483ac499a",
  "repo_slug": "jordan23wagner-ops/agent-handoff",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_jordan23wagner_ops_agent_hando_6af1561d/readme"
}