{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/blobr/main/json-schema/blobr-recommendation-schema.json",
  "title": "Blobr AI Recommendation",
  "description": "Schema for an AI agent recommendation generated by Blobr",
  "type": "object",
  "properties": {
    "recommendationId": { "type": "string" },
    "agentType": {
      "type": "string",
      "description": "The specialized AI agent that generated this recommendation",
      "examples": ["keyword_expansion", "negative_keyword", "ad_copy", "bid_adjustment", "budget_reallocation"]
    },
    "priority": { "type": "string", "enum": ["high", "medium", "low"] },
    "impact": { "type": "string", "description": "Estimated impact description" },
    "campaignId": { "type": "string" },
    "adGroupId": { "type": "string" },
    "action": {
      "type": "object",
      "properties": {
        "type": { "type": "string", "enum": ["add", "remove", "modify", "pause", "enable"] },
        "entityType": { "type": "string", "enum": ["keyword", "negative_keyword", "ad", "bid", "budget", "audience"] },
        "current": { "description": "Current value or entity" },
        "proposed": { "description": "Proposed value or entity" }
      }
    },
    "rationale": { "type": "string", "description": "AI-generated explanation for the recommendation" },
    "status": { "type": "string", "enum": ["pending", "approved", "rejected", "applied"] },
    "createdAt": { "type": "string", "format": "date-time" },
    "appliedAt": { "type": "string", "format": "date-time" }
  },
  "required": ["recommendationId", "agentType", "priority", "action", "status"]
}
