{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-account-monitoring-schema.json",
  "title": "AccountMonitoring",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-openapi.json#/components/schemas/AccountMonitoring",
  "additionalProperties": false,
  "properties": {
    "agents": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "active": {
            "type": "boolean"
          },
          "attempts7d": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "deliveries": {
            "additionalProperties": false,
            "properties": {
              "completed": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "dead_letter": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "pending": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "processing": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "skipped": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "pending",
              "processing",
              "completed",
              "skipped",
              "dead_letter"
            ],
            "type": "object"
          },
          "displayName": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "heartbeatAt": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
            "type": "string"
          },
          "lastActivityAt": {
            "anyOf": [
              {
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "latency7d": {
            "additionalProperties": false,
            "properties": {
              "averageMs": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "maxMs": {
                "anyOf": [
                  {
                    "minimum": 0,
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "samples": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "samples",
              "averageMs",
              "maxMs"
            ],
            "type": "object"
          },
          "messages7d": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "number": {
            "pattern": "^[1-9][0-9]{9}$",
            "type": "string"
          },
          "presence": {
            "enum": [
              "offline",
              "online",
              "idle",
              "working",
              "waiting"
            ],
            "type": "string"
          },
          "runtimeList": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "id": {
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "version": {
                  "pattern": "^[0-9]+$",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "version"
              ],
              "type": "object"
            },
            "maxItems": 8,
            "type": "array"
          },
          "runtimes": {
            "maximum": 9007199254740991,
            "minimum": 0,
            "type": "integer"
          },
          "tasks": {
            "additionalProperties": false,
            "properties": {
              "cancelled": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "completed": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "failed": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "queued": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "running": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "waiting_approval": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "queued",
              "running",
              "waiting_approval",
              "completed",
              "failed",
              "cancelled"
            ],
            "type": "object"
          },
          "usage7d": {
            "additionalProperties": false,
            "properties": {
              "inputTokens": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "modelCalls": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "outputTokens": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "reportedAttempts": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              },
              "unreportedAttempts": {
                "maximum": 9007199254740991,
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "reportedAttempts",
              "unreportedAttempts",
              "modelCalls",
              "inputTokens",
              "outputTokens"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "number",
          "handle",
          "displayName",
          "active",
          "presence",
          "heartbeatAt",
          "lastActivityAt",
          "messages7d",
          "tasks",
          "deliveries",
          "runtimes",
          "runtimeList",
          "attempts7d",
          "usage7d",
          "latency7d"
        ],
        "type": "object"
      },
      "maxItems": 32,
      "type": "array"
    },
    "generatedAt": {
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    },
    "totals": {
      "additionalProperties": false,
      "properties": {
        "activeAgents": {
          "maximum": 32,
          "minimum": 0,
          "type": "integer"
        },
        "agents": {
          "maximum": 32,
          "minimum": 0,
          "type": "integer"
        },
        "attempts7d": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "deliveries": {
          "additionalProperties": false,
          "properties": {
            "completed": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "dead_letter": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "pending": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "processing": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "skipped": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "pending",
            "processing",
            "completed",
            "skipped",
            "dead_letter"
          ],
          "type": "object"
        },
        "latency7d": {
          "additionalProperties": false,
          "properties": {
            "averageMs": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "maxMs": {
              "anyOf": [
                {
                  "minimum": 0,
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "samples": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "samples",
            "averageMs",
            "maxMs"
          ],
          "type": "object"
        },
        "messages7d": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "onlineAgents": {
          "maximum": 32,
          "minimum": 0,
          "type": "integer"
        },
        "runtimes": {
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "tasks": {
          "additionalProperties": false,
          "properties": {
            "cancelled": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "completed": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "failed": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "queued": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "running": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "waiting_approval": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "queued",
            "running",
            "waiting_approval",
            "completed",
            "failed",
            "cancelled"
          ],
          "type": "object"
        },
        "usage7d": {
          "additionalProperties": false,
          "properties": {
            "inputTokens": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "modelCalls": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "outputTokens": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "reportedAttempts": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            },
            "unreportedAttempts": {
              "maximum": 9007199254740991,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "reportedAttempts",
            "unreportedAttempts",
            "modelCalls",
            "inputTokens",
            "outputTokens"
          ],
          "type": "object"
        }
      },
      "required": [
        "agents",
        "activeAgents",
        "onlineAgents",
        "messages7d",
        "tasks",
        "deliveries",
        "runtimes",
        "attempts7d",
        "usage7d",
        "latency7d"
      ],
      "type": "object"
    },
    "windowStart": {
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "type": "string"
    }
  },
  "required": [
    "generatedAt",
    "windowStart",
    "agents",
    "totals"
  ],
  "type": "object"
}