{
  "markdown": "# Kasbah Core\n\nDeterministic policy control for autonomous systems.\n\nKasbah Core is a minimal control plane that sits between AI agents and execution:\nit evaluates intent, enforces tool gates, and writes an append-only audit log.\n\nThis repo ships a runnable prototype for security engineers and CTOs.\n\n---\n\n## Quick start (2 commands)\n\n```bash\ndocker compose up --build\n\n\n---\n\n## 🔐 Minimal real API example (no demo, no UI)\n\nThis is a real Kasbah-Core runtime flow.\nNo simulation. No frontend. No policy-only logic.\n\nSTEP 1 — Ask Kasbah if an action is allowed\n\ncurl -s http://localhost:8002/api/rtp/decide \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer DEV_KEY\" \\\n  -d '{\n    \"agent_id\": \"support-bot\",\n    \"tool_name\": \"db.query\",\n    \"signals\": {\n      \"consistency\": 0.95,\n      \"context\": 0.90\n    }\n  }'\n\nExample response:\n\n{\n  \"decision\": \"ALLOW\",\n  \"ticket\": {\n    \"jti\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"expires_at\": 1770307384\n  }\n}\n\nSTEP 2 — Execute the action using the issued ticket\n\ncurl -s http://localhost:8002/api/rtp/consume \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ticket\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"tool_name\": \"db.query\",\n    \"usage\": { \"tokens\": 120 }\n  }'\n\nResponse:\n\n{ \"status\": \"ALLOWED\" }\n\nSTEP 3 — Replay the same ticket (blocked by Kasbah)\n\ncurl -s http://localhost:8002/api/rtp/consume \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ticket\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"tool_name\": \"db.query\"\n  }'\n\nResponse:\n\n{\n  \"status\": \"DENIED\",\n  \"reason\": \"replay_detected\"\n}\n\nThis denial is stateful and irreversible.\nTickets are single-use, tool-bound, time-bound, and verified at runtime.\n\n\n---\n\n## 🔐 Minimal real API example (no demo, no UI)\n\nThis is a real Kasbah-Core runtime flow.\nNo simulation. No frontend. No policy-only logic.\n\nSTEP 1 — Ask Kasbah if an action is allowed\n\ncurl -s http://localhost:8002/api/rtp/decide \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer DEV_KEY\" \\\n  -d '{\n    \"agent_id\": \"support-bot\",\n    \"tool_name\": \"db.query\",\n    \"signals\": {\n      \"consistency\": 0.95,\n      \"context\": 0.90\n    }\n  }'\n\nExample response:\n\n{\n  \"decision\": \"ALLOW\",\n  \"ticket\": {\n    \"jti\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"expires_at\": 1770307384\n  }\n}\n\nSTEP 2 — Execute the action using the issued ticket\n\ncurl -s http://localhost:8002/api/rtp/consume \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ticket\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"tool_name\": \"db.query\",\n    \"usage\": { \"tokens\": 120 }\n  }'\n\nResponse:\n\n{ \"status\": \"ALLOWED\" }\n\nSTEP 3 — Replay the same ticket (blocked by Kasbah)\n\ncurl -s http://localhost:8002/api/rtp/consume \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"ticket\": \"5a3bde1e887e000116e8943663b5088d\",\n    \"tool_name\": \"db.query\"\n  }'\n\nResponse:\n\n{\n  \"status\": \"DENIED\",\n  \"reason\": \"replay_detected\"\n}\n\nThis denial is stateful and irreversible.\nTickets are single-use, tool-bound, time-bound, and verified at runtime.\n\n\n## Moats / Security posture\nSee `docs/MOATS_REGISTRY.md` for the authoritative list of implemented moats, evidence, and explicit non-goals.\n",
  "bytes": 3158,
  "sha": "44defbd4b4a19490b6e59baf2685988ef9324f596adfde2ab20007808b1a1109",
  "repo_slug": "al-adnane/kasbah-core",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_al_adnane_kasbah_mcp_3436c53d/readme"
}