{
  "markdown": "# HiveConsult\n\nAgent-to-agent reasoning-as-a-service. Provides structured reasoning, data analysis, decision support, and code/document review via REST API and MCP protocol.\n\n## Endpoints\n\n| Method | Path | Description | Cost |\n|--------|------|-------------|------|\n| GET | `/` | Service discovery | Free |\n| GET | `/health` | Health check | Free |\n| POST | `/v1/consult/reason` | Chain-of-thought reasoning | $0.01–$0.25 |\n| POST | `/v1/consult/analyze` | Data analysis (trend/anomaly/forecast/comparison) | $0.05 |\n| POST | `/v1/consult/decide` | Decision support with weighted criteria | $0.05 |\n| POST | `/v1/consult/review` | Code/contract/document/strategy review | $0.05 |\n| POST | `/v1/consult/batch` | Batch multiple consultations (max 10) | Per item |\n| GET | `/v1/consult/stats` | Consultation metrics | Free |\n| GET | `/v1/consult/history/:did` | Agent consultation history | Free |\n| POST | `/mcp` | JSON-RPC 2.0 MCP endpoint | Per tool |\n| GET | `/.well-known/ai-plugin.json` | AI plugin discovery | Free |\n\n## Authentication\n\n**Internal (platform-to-platform):**\n```\nx-hive-internal: <service_key>\n```\nBypasses payment for inter-service calls.\n\n**External (agent-to-agent):**\nUses x402 micropayment protocol. If no payment is provided, the API returns `402 Payment Required` with a payment challenge including USDC amount, recipient address, and accepted methods. Include payment proof in the `X-Payment` header.\n\n## Reasoning Depths\n\n| Depth | Cost | Steps | Description |\n|-------|------|-------|-------------|\n| `quick` | $0.01 | 3 | Fast heuristic analysis |\n| `standard` | $0.05 | 6 | Balanced reasoning with evidence weighing |\n| `deep` | $0.25 | 12 | Exhaustive multi-perspective analysis |\n\n## MCP Integration\n\nHiveConsult exposes an MCP-compatible JSON-RPC 2.0 endpoint at `/mcp`.\n\n### Tool Discovery\n\n```json\nPOST /mcp\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/list\",\n  \"params\": {}\n}\n```\n\n### Available MCP Tools\n\n- `hiveconsult_reason` — Structured reasoning with configurable depth\n- `hiveconsult_analyze` — Data analysis (trend, anomaly, forecast, comparison)\n- `hiveconsult_decide` — Multi-criteria decision support\n- `hiveconsult_review` — Code/contract/document/strategy review\n\n### Tool Invocation\n\n```json\nPOST /mcp\n{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 2,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"hiveconsult_reason\",\n    \"arguments\": {\n      \"did\": \"did:hive:my_agent\",\n      \"question\": \"Should we migrate from REST to GraphQL?\",\n      \"reasoning_depth\": \"standard\",\n      \"domain\": \"architecture\"\n    }\n  }\n}\n```\n\n## Quick Start\n\n```bash\nnpm install\nnpm start\n```\n\nThe server starts on port 3000 (configurable via `PORT` env var).\n\n## Example: Reasoning Request\n\n```bash\ncurl -X POST http://localhost:3000/v1/consult/reason \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-hive-internal: <service_key>\" \\\n  -d '{\n    \"did\": \"did:hive:my_agent\",\n    \"question\": \"What is the optimal caching strategy for a read-heavy API?\",\n    \"reasoning_depth\": \"standard\",\n    \"domain\": \"backend\"\n  }'\n```\n\n## Example: Decision Support\n\n```bash\ncurl -X POST http://localhost:3000/v1/consult/decide \\\n  -H \"Content-Type: application/json\" \\\n  -H \"x-hive-internal: <service_key>\" \\\n  -d '{\n    \"did\": \"did:hive:my_agent\",\n    \"options\": [\"Redis\", \"Memcached\", \"CDN edge cache\"],\n    \"criteria\": [\"latency\", \"cost\", \"complexity\", \"scalability\"],\n    \"weights\": [0.4, 0.2, 0.15, 0.25]\n  }'\n```\n\n## License\n\nMIT\n\n\n---\n\n## Hive Civilization\n\nHive Civilization is the cryptographic backbone of autonomous agent commerce — the layer that makes every agent transaction provable, every payment settable, and every decision defensible.\n\nThis repository is part of the **PROVABLE · SETTABLE · DEFENSIBLE** pillar.\n\n- thehiveryiq.com\n- hiveagentiq.com\n- agent-card: https://hivetrust.onrender.com/.well-known/agent-card.json\n",
  "bytes": 3851,
  "sha": "05bfc8b14a610bcd13036ce8f993e05d812a960f49dd9b376abfe47d89aeb30b",
  "repo_slug": "srotzin/hiveconsult",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_srotzin_hiveconsult_53e8ec40/readme"
}