{
  "markdown": "# agent-gateway\n\nLets other AI agents drive AgentsPodium hosting (create/monitor/manage\ninstances) through two machine protocols — MCP (Streamable HTTP) and A2A\n(Agent2Agent JSON-RPC) — both backed by the existing account API at\n`https://agentspodium.com/api`.\n\nThe gateway holds **no state and no secrets of its own**. Every call carries\nthe caller's own AgentsPodium API key (`Authorization: Bearer ak_live_...`, or\na session token), which is forwarded verbatim to the account API. Missing\nthat header always answers `401` with a JSON body pointing at\nhttps://agentspodium.com/account (\"API keys for agents\") and\nhttps://hosting.defispace.com/docs/auth.\n\nOne process serves both hostnames, selected by the `Host` header wherever a\npath is shared between the two (only `GET /`); everything else defaults to\nMCP behaviour, and `mcp.agentspodium.com` / `a2a.agentspodium.com` route to\nthe same Deployment.\n\n## Run locally\n\n```bash\nnpm install\nnpm run build\nACCOUNT_API=https://agentspodium.com/api PORT=3200 npm start\n# or, for iteration:\nnpm run dev\n```\n\nEnv vars:\n\n- `ACCOUNT_API` — base URL of the account API (default `https://agentspodium.com/api`).\n- `PORT` — HTTP port (default `3200`).\n- `A2A_HOST` — hostname that selects A2A behaviour for `GET /` (default `a2a.agentspodium.com`).\n\n## Calling it\n\n### MCP — `mcp.agentspodium.com/mcp`\n\nStreamable HTTP, stateless (no session id). Requires\n`Accept: application/json, text/event-stream`.\n\n```bash\n# initialize\ncurl -s -X POST https://mcp.agentspodium.com/mcp \\\n  -H \"Authorization: Bearer ak_live_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\",\n    \"params\": {\n      \"protocolVersion\": \"2025-06-18\",\n      \"capabilities\": {},\n      \"clientInfo\": { \"name\": \"example-client\", \"version\": \"0.1.0\" }\n    }\n  }'\n\n# call a tool\ncurl -s -X POST https://mcp.agentspodium.com/mcp \\\n  -H \"Authorization: Bearer ak_live_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Accept: application/json, text/event-stream\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"tools/call\",\n    \"params\": { \"name\": \"list_platforms\", \"arguments\": {} }\n  }'\n```\n\nTools: `list_platforms`, `list_instances`, `create_instance`,\n`get_instance_health`, `get_instance_term`, `set_llm_key`, `pause_instance`,\n`resume_instance`, `rebuild_instance`, `delete_instance`, `get_payment_options`,\n`set_peers`. Plus one resource, `agentspodium://docs` (the hosting docs).\n\n### A2A — `a2a.agentspodium.com/`\n\n```bash\ncurl -s https://a2a.agentspodium.com/.well-known/agent-card.json\n\n# structured (data part)\ncurl -s -X POST https://a2a.agentspodium.com/ \\\n  -H \"Authorization: Bearer ak_live_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"message/send\",\n    \"params\": {\n      \"message\": {\n        \"parts\": [{ \"kind\": \"data\", \"data\": { \"skill\": \"create-instance\", \"params\": { \"engine\": \"hermes\", \"tier\": \"small\", \"name\": \"My Agent\" } } }]\n      }\n    }\n  }'\n\n# plain text (small command grammar)\ncurl -s -X POST https://a2a.agentspodium.com/ \\\n  -H \"Authorization: Bearer ak_live_...\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"jsonrpc\": \"2.0\", \"id\": 2, \"method\": \"message/send\",\n    \"params\": { \"message\": { \"parts\": [{ \"kind\": \"text\", \"text\": \"platforms\" }] } }\n  }'\n```\n\nText grammar: `create <engine> <tier> [name ...]`, `health <id>`,\n`term <id>`, `platforms`, `payment <id>`. Anything else answers with the\nskill list and the exact JSON shape.\n\nPublic, no auth: `GET /catalog.json` (proxy of the account API's\n`/a2a-catalog`).\n\n## Deploy\n\n```bash\ndocker build -t agentpodium-agent-gateway apps/agent-gateway\n# push, then apply:\nkubectl apply -f apps/agent-gateway/deploy/gateway.yaml\n```\n\n`deploy/gateway.yaml` creates namespace `ap-agentgw`, a Deployment/Service on\nport 3200, and two `HTTPRoute`s (`mcp.agentspodium.com`,\n`a2a.agentspodium.com`) against the shared `akash-gateway` Gateway. Swap\n`__IMAGE_TAG__` for the built image tag before applying.\n",
  "bytes": 4054,
  "sha": "5c900df31fa8c37b4e68ae2077cd94bd88469dd188bc64ab8da4fd9db23f2b7a",
  "repo_slug": "agentspodium/agent-gateway",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_com_agentspodium_hosting_07321649/readme"
}