{
  "openapi": "3.1.0",
  "info": {
    "title": "Gala public API",
    "version": "1.0.0",
    "description": "One public endpoint today: the Agentimeter. It reads a website and reports how much of that business an agent can actually reach, scored out of 90 against the kernel at /agentible/kernel.json. No authentication."
  },
  "servers": [{ "url": "https://gala.ltd" }],
  "paths": {
    "/api/agentimeter": {
      "get": {
        "operationId": "agentimeter",
        "summary": "Score a website's agentability out of 90",
        "parameters": [{
          "name": "url", "in": "query", "required": true,
          "description": "A public http(s) host. Private and loopback ranges are refused.",
          "schema": { "type": "string", "example": "athletico.com" }
        }],
        "responses": {
          "200": {
            "description": "The reading",
            "content": { "application/json": { "schema": {
              "type": "object",
              "properties": {
                "host":  { "type": "string" },
                "held":  { "type": "integer", "description": "capabilities an agent can reach, 0-90" },
                "gap":   { "type": "integer" },
                "total": { "type": "integer", "const": 90 },
                "band":  { "type": "object", "properties": {
                  "name": { "type": "string", "enum": ["Agenti-min","Agenti-meh","Agenti-mid","Agenti-max"] },
                  "say":  { "type": "string" } } },
                "cells": { "type": "array", "items": { "type": "object", "properties": {
                  "vector": { "type": "string", "enum": ["Acquire","Deliver","Retain","Compound"] },
                  "depth":  { "type": "string", "enum": ["is","can","ought"] },
                  "credit": { "type": "integer" }, "count": { "type": "integer" },
                  "found":  { "type": "array", "items": { "type": "string" } },
                  "missing":{ "type": "array", "items": { "type": "string" } } } } },
                "error": { "type": "string", "description": "present instead of a reading when the address could not be read" }
              } } } }
          }
        }
      }
    }
  }
}
