{
  "openapi": "3.1.0",
  "info": {
    "title": "agent-audit",
    "version": "0.2.0",
    "summary": "Agent-readiness reports for agent-first products.",
    "description": "Give agent-audit the URL of an agent-first product and get a dated report on six stages of the agent journey (find, understand, first call, get access, use reliably, stay healthy), with the first blocker and honest fixes. Keyless. Hosted checks are HTTP probes (GET only, public hosts only); full mode scores cold-agent runs your own agent performs. No combined score.",
    "contact": {
      "url": "https://agent-audit.multihead.dev/about"
    }
  },
  "servers": [
    {
      "url": "https://agent-audit.multihead.dev",
      "description": "Production."
    }
  ],
  "paths": {
    "/v0/assess": {
      "get": {
        "operationId": "assess",
        "summary": "Assess one product URL (quick mode)",
        "description": "Call this first. Runs hosted HTTP probes plus a keyless Is Agentic read and returns the report. Uses /.well-known/agent-audit.json from the target when present. 12 assessments per 10 minutes per IP; the same request within a minute gets the cached result, and a host is probed at most 6 times per 10 minutes (429 target_rate_limited).",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public https URL of the product. The origin is assessed; paths are ignored.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "example": "https://example.com"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default), md (text/markdown), or text (text/plain markdown, for browsers). Accept: text/markdown also selects md.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md",
                "text"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The report. A finished assessment, even when the target fails every stage.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "description": "format=text: the markdown report as plain text, for browsers."
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "busy. Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "508": {
            "description": "loop_detected: agent-audit does not assess through its own probes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "assessWithManifest",
        "summary": "Assess with a manifest and/or a previous report",
        "description": "Same as GET, plus an optional manifest (replaces the target's well-known manifest) and an optional previous report for a diff and the Stay healthy stage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "manifest": {
                    "$ref": "https://agent-audit.multihead.dev/schema/manifest.json"
                  },
                  "previous": {
                    "$ref": "#/components/schemas/Report"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "md",
                      "text"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_manifest, invalid_journeys, invalid_previous, or invalid_assessment. The message lists the fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "busy. Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "508": {
            "description": "loop_detected: agent-audit does not assess through its own probes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/score": {
      "post": {
        "operationId": "scoreJourneys",
        "summary": "Score cold-agent journeys (full mode)",
        "description": "Post the run records your own agent produced by following SKILL.md (unhinted and hinted runs). agent-audit adds the hosted checks (or reuses assessment) and returns the full report. agent-audit makes no model calls.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url",
                  "journeys"
                ],
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "journeys": {
                    "type": "array",
                    "maxItems": 64,
                    "items": {
                      "$ref": "https://agent-audit.multihead.dev/schema/journey.json"
                    }
                  },
                  "manifest": {
                    "$ref": "https://agent-audit.multihead.dev/schema/manifest.json"
                  },
                  "previous": {
                    "$ref": "#/components/schemas/Report"
                  },
                  "assessment": {
                    "$ref": "#/components/schemas/Report"
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "md",
                      "text"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The full report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_manifest, invalid_journeys, invalid_previous, or invalid_assessment. The message lists the fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "busy. Retry after Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "508": {
            "description": "loop_detected: agent-audit does not assess through its own probes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/diff": {
      "get": {
        "operationId": "diffStored",
        "summary": "Diff two stored dogfood reports",
        "description": "For agent-audit's own dogfood targets. from and to are generated_at values or dates (YYYY-MM-DD); defaults are the two latest.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public https URL of the product. The origin is assessed; paths are ignored.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "example": "https://example.com"
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The diff.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found or no_stored_report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "diffReports",
        "summary": "Diff two reports you kept",
        "description": "Post { previous, current } (two reports for the same origin) and get the diff plus the Stay healthy verdict.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "previous",
                  "current"
                ],
                "properties": {
                  "previous": {
                    "$ref": "#/components/schemas/Report"
                  },
                  "current": {
                    "$ref": "#/components/schemas/Report"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The diff and the healthy check.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "body_too_large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "invalid_manifest, invalid_journeys, invalid_previous, or invalid_assessment. The message lists the fields.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/report": {
      "get": {
        "operationId": "storedReport",
        "summary": "Latest stored dogfood report for a URL",
        "description": "Read-only. Only agent-audit's own dogfood targets have stored reports; for anything else, call GET /v0/assess. Supports ETag / If-None-Match.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "Public https URL of the product. The origin is assessed; paths are ignored.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "example": "https://example.com"
          },
          {
            "name": "at",
            "in": "query",
            "required": false,
            "description": "A generated_at value or a date (YYYY-MM-DD).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "json (default), md (text/markdown), or text (text/plain markdown, for browsers). Accept: text/markdown also selects md.",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "md",
                "text"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The stored report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "304": {
            "description": "Not modified."
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found or no_stored_report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/history": {
      "get": {
        "operationId": "storedHistory",
        "summary": "List stored dogfood reports for a URL",
        "description": "Read-only, newest first, with each report's first blocker. Without url, lists the stored origins.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "Public https URL of the product. The origin is assessed; paths are ignored.",
            "schema": {
              "type": "string",
              "maxLength": 2048
            },
            "example": "https://example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "The history.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Bad input (missing_url, invalid_url, target_not_allowed, invalid_json, invalid_range). Fix it; do not retry unchanged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "not_found or no_stored_report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/checks": {
      "get": {
        "operationId": "checkCatalog",
        "summary": "Stages, checks, fixes, and the access ladder",
        "description": "Static catalog of every check agent-audit runs or accepts, with tier, what it checks, what it needs, and the default fix. Cacheable.",
        "responses": {
          "200": {
            "description": "The catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0/rules": {
      "get": {
        "operationId": "personalAgentRules",
        "summary": "Personal agents and the directory rules agent-audit checks against",
        "description": "Use this to see what Meta Muse, OpenAI Dots, Claude Duet and xAI Grok Bot need from a service and the rules of the directories they draw on (Claude, ChatGPT, Muse, Cursor), dated and with sources. The personal_agents section of every report and the agents.directory-ready check use these rules. Cacheable.",
        "responses": {
          "200": {
            "description": "The rules.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v0": {
      "get": {
        "operationId": "index",
        "summary": "Endpoint index",
        "description": "The endpoints, limits, and doc links as JSON.",
        "responses": {
          "200": {
            "description": "The index.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited (per IP) or target_rate_limited (per host). Wait for Retry-After seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "internal_error. Retry once after a few seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "ok",
          "code",
          "message",
          "retryable",
          "fix"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          },
          "fix": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "error": {
            "type": "object"
          }
        }
      },
      "Report": {
        "$ref": "https://agent-audit.multihead.dev/schema/report.json"
      }
    }
  }
}
