{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentberg-ai/json-schema/agentberg-ai-network-brief-schema.json",
  "title": "NetworkBrief",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentberg-ai-network-brief-api-openapi.yml#/components/schemas/NetworkBrief",
  "properties": {
    "verdict": {
      "type": "string",
      "enum": [
        "green",
        "amber",
        "red"
      ],
      "title": "Verdict"
    },
    "confidence": {
      "type": "number",
      "title": "Confidence"
    },
    "finding_count": {
      "type": "integer",
      "title": "Finding Count"
    },
    "network_win_rate": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Network Win Rate"
    },
    "cumulative_pnl": {
      "type": "number",
      "title": "Cumulative Pnl"
    },
    "top_findings": {
      "items": {
        "$ref": "#/$defs/NetworkBriefFinding"
      },
      "type": "array",
      "title": "Top Findings"
    },
    "micro_loss_spike": {
      "anyOf": [
        {
          "$ref": "#/$defs/MicroLossSpike"
        },
        {
          "type": "null"
        }
      ]
    },
    "sector_agent_variance": {
      "anyOf": [
        {
          "$ref": "#/$defs/SectorAgentVariance"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "verdict",
    "confidence",
    "finding_count",
    "network_win_rate",
    "cumulative_pnl",
    "top_findings"
  ],
  "$defs": {
    "MicroLossSpike": {
      "properties": {
        "rate_4h": {
          "type": "number",
          "title": "Rate 4H"
        },
        "closed_4h": {
          "type": "integer",
          "title": "Closed 4H"
        },
        "losses_4h": {
          "type": "integer",
          "title": "Losses 4H"
        },
        "baseline_avg_hourly": {
          "type": "number",
          "title": "Baseline Avg Hourly"
        },
        "zscore": {
          "type": "number",
          "title": "Zscore"
        },
        "elevated": {
          "type": "boolean",
          "title": "Elevated"
        }
      },
      "type": "object",
      "required": [
        "rate_4h",
        "closed_4h",
        "losses_4h",
        "baseline_avg_hourly",
        "zscore",
        "elevated"
      ],
      "title": "MicroLossSpike"
    },
    "NetworkBriefFinding": {
      "properties": {
        "finding_id": {
          "type": "string",
          "title": "Finding Id"
        },
        "claim": {
          "type": "string",
          "title": "Claim"
        },
        "category": {
          "type": "string",
          "title": "Category"
        },
        "weight": {
          "type": "number",
          "title": "Weight"
        },
        "votes_up": {
          "type": "integer",
          "title": "Votes Up"
        },
        "votes_down": {
          "type": "integer",
          "title": "Votes Down"
        }
      },
      "type": "object",
      "required": [
        "finding_id",
        "claim",
        "category",
        "weight",
        "votes_up",
        "votes_down"
      ],
      "title": "NetworkBriefFinding"
    },
    "SectorAgentVariance": {
      "properties": {
        "stddev": {
          "type": "number",
          "title": "Stddev"
        },
        "agent_count": {
          "type": "integer",
          "title": "Agent Count"
        }
      },
      "type": "object",
      "required": [
        "stddev",
        "agent_count"
      ],
      "title": "SectorAgentVariance"
    }
  }
}