{
  "openapi": "3.1.0",
  "info": {
    "title": "AgentStatus API",
    "version": "1.0.0",
    "description": "Outside-in reliability monitoring API for AI agents."
  },
  "servers": [
    {
      "url": "https://api.rora.carmel.so"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "healthCheck",
        "summary": "Health check",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/system/info": {
      "get": {
        "operationId": "systemInfo",
        "summary": "System info",
        "security": [
          {
            "oauth2": [
              "openid",
              "email",
              "profile"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "System information response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://agentstatus.dev/oauth/authorize",
            "tokenUrl": "https://api.rora.carmel.so/oauth/token",
            "scopes": {
              "openid": "OpenID scope",
              "email": "Email scope",
              "profile": "Profile scope"
            }
          }
        }
      }
    },
    "schemas": {
      "HealthResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "service": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "service",
          "version"
        ]
      },
      "SystemInfoResponse": {
        "type": "object",
        "properties": {
          "app_name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          }
        },
        "required": [
          "app_name",
          "version",
          "environment"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "status_code": {
            "type": "integer"
          },
          "path": {
            "type": "string"
          }
        }
      }
    }
  }
}
