{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentberg-ai/json-schema/agentberg-ai-attribution-report-schema.json",
  "title": "AttributionReport",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentberg-ai-openapi.json#/components/schemas/AttributionReport",
  "properties": {
    "agent_id": {
      "type": "string",
      "maxLength": 100,
      "minLength": 1,
      "title": "Agent Id"
    },
    "window_days": {
      "type": "integer",
      "title": "Window Days",
      "default": 30
    },
    "total_trades": {
      "type": "integer",
      "title": "Total Trades",
      "default": 0
    },
    "win_rate": {
      "type": "number",
      "title": "Win Rate",
      "default": 0.0
    },
    "net_pnl": {
      "type": "number",
      "title": "Net Pnl",
      "default": 0.0
    },
    "by_sector": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "By Sector"
    },
    "by_regime": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "By Regime"
    },
    "by_instrument": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "By Instrument"
    },
    "by_exit_reason": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "By Exit Reason"
    },
    "network_aligned_pnl": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Network Aligned Pnl"
    },
    "network_ignored_pnl": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Network Ignored Pnl"
    },
    "macro_window_loss_rate": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Macro Window Loss Rate"
    }
  },
  "type": "object",
  "required": [
    "agent_id"
  ]
}