{
  "openapi": "3.1.0",
  "info": {
    "title": "Preventum Labs open agents",
    "version": "1.0.0",
    "description": "Rule-based, deterministic agents. Every response contains the provision, a verbatim quote with source date where stored, a manual-check marker for missing data, a scope_notice stating what is not covered, and a checksum. 25 calls per day without key; send x-api-key for a personal key. Decision support, not legal advice."
  },
  "servers": [
    {
      "url": "https://klkdliicyhnobzcxlxin.supabase.co/functions/v1/open-agent-api"
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {},
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/counterparty": {
      "post": {
        "summary": "Counterparty check from public registers (Bolagsverket, VIES, EU sanctions)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "orgNumber"
                ],
                "properties": {
                  "orgNumber": {
                    "type": "string",
                    "example": "556036-0793"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic result with scope_notice and hash"
          },
          "400": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily limit reached; Retry-After header, reset_in_seconds and key_request_url in JSON"
          }
        }
      }
    },
    "/sanctions": {
      "post": {
        "summary": "Exact-name screening against the EU consolidated sanctions list",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 3
                  },
                  "type": {
                    "enum": [
                      "person",
                      "entity"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic result with scope_notice and hash"
          },
          "400": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily limit reached; Retry-After header, reset_in_seconds and key_request_url in JSON"
          }
        }
      }
    },
    "/horizon": {
      "get": {
        "summary": "Upcoming Swedish property-law changes (leases, planning and building, environment)",
        "parameters": [
          {
            "name": "area",
            "in": "query",
            "schema": {
              "enum": [
                "hyra",
                "plan_bygg",
                "miljo"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Items with stage, likelihood class and verbatim in-force date"
          },
          "429": {
            "description": "Daily limit reached"
          }
        }
      }
    },
    "/nis2": {
      "post": {
        "summary": "Scope under the Swedish Cybersecurity Act (2025:1506)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "sector": {
                    "enum": [
                      "annex1",
                      "annex2",
                      "none",
                      "state_agency",
                      "municipality",
                      "public_ecom",
                      "unknown"
                    ]
                  },
                  "employees": {
                    "type": "number"
                  },
                  "turnoverEur": {
                    "type": "number"
                  },
                  "balanceEur": {
                    "type": "number"
                  },
                  "establishedInSweden": {
                    "type": "boolean"
                  },
                  "doraCovered": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic result with scope_notice and hash"
          },
          "400": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily limit reached; Retry-After header, reset_in_seconds and key_request_url in JSON"
          }
        }
      }
    },
    "/vendor-gdpr": {
      "post": {
        "summary": "Processor agreement and sub-processors under GDPR art. 28",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [],
                "properties": {
                  "processesPersonalData": {
                    "type": "boolean"
                  },
                  "processorContractComplete": {
                    "type": "boolean"
                  },
                  "subprocessorsAuthorized": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic result with scope_notice and hash"
          },
          "400": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily limit reached; Retry-After header, reset_in_seconds and key_request_url in JSON"
          }
        }
      }
    },
    "/key-request": {
      "post": {
        "summary": "Request a free personal API key (reviewed manually)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "purpose"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "purpose": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic result with scope_notice and hash"
          },
          "400": {
            "description": "Invalid input"
          },
          "429": {
            "description": "Daily limit reached; Retry-After header, reset_in_seconds and key_request_url in JSON"
          }
        }
      }
    }
  }
}