{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/car-gene-com/json-schema/car-gene-com-agent-calls-response-schema.json",
  "title": "AgentCallsResponse",
  "description": "MCP / A2A の窓口の利用 (#2469)。CloudWatch Logs から毎晩写したもの",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/car-gene-com-admin-agent-calls-api-openapi.yml#/components/schemas/AgentCallsResponse",
  "properties": {
    "days": {
      "type": "integer",
      "title": "Days"
    },
    "last_called_at": {
      "type": "string",
      "format": "date-time",
      "title": "Last Called At"
    },
    "tools_call_ok": {
      "type": "integer",
      "title": "Tools Call Ok"
    },
    "send_message_ok": {
      "type": "integer",
      "title": "Send Message Ok"
    },
    "callers": {
      "type": "integer",
      "title": "Callers"
    },
    "probes": {
      "type": "integer",
      "title": "Probes"
    },
    "daily": {
      "items": {
        "$ref": "#/$defs/AgentDay"
      },
      "type": "array",
      "title": "Daily"
    },
    "daily_tools": {
      "items": {
        "$ref": "#/$defs/AgentToolDay"
      },
      "type": "array",
      "title": "Daily Tools"
    },
    "funnel": {
      "items": {
        "$ref": "#/$defs/AgentCount"
      },
      "type": "array",
      "title": "Funnel"
    },
    "outcomes": {
      "items": {
        "$ref": "#/$defs/AgentCount"
      },
      "type": "array",
      "title": "Outcomes"
    },
    "top_callers": {
      "items": {
        "$ref": "#/$defs/AgentCaller"
      },
      "type": "array",
      "title": "Top Callers"
    },
    "top_arguments": {
      "items": {
        "$ref": "#/$defs/AgentArguments"
      },
      "type": "array",
      "title": "Top Arguments"
    },
    "durations": {
      "items": {
        "$ref": "#/$defs/AgentDuration"
      },
      "type": "array",
      "title": "Durations"
    },
    "recent": {
      "items": {
        "$ref": "#/$defs/AgentRecentCall"
      },
      "type": "array",
      "title": "Recent"
    }
  },
  "type": "object",
  "required": [
    "days",
    "tools_call_ok",
    "send_message_ok",
    "callers",
    "probes",
    "daily",
    "daily_tools",
    "funnel",
    "outcomes",
    "top_callers",
    "top_arguments",
    "durations",
    "recent"
  ],
  "$defs": {
    "AgentArguments": {
      "properties": {
        "tool_name": {
          "type": "string",
          "title": "Tool Name"
        },
        "tool_arguments": {
          "type": "string",
          "title": "Tool Arguments"
        },
        "calls": {
          "type": "integer",
          "title": "Calls"
        }
      },
      "type": "object",
      "required": [
        "calls"
      ],
      "title": "AgentArguments"
    },
    "AgentCaller": {
      "properties": {
        "client_name": {
          "type": "string",
          "title": "Client Name"
        },
        "client_version": {
          "type": "string",
          "title": "Client Version"
        },
        "client_vendor": {
          "type": "string",
          "title": "Client Vendor"
        },
        "user_agent": {
          "type": "string",
          "title": "User Agent"
        },
        "calls": {
          "type": "integer",
          "title": "Calls"
        }
      },
      "type": "object",
      "required": [
        "calls"
      ],
      "title": "AgentCaller"
    },
    "AgentCount": {
      "properties": {
        "label": {
          "type": "string",
          "title": "Label"
        },
        "calls": {
          "type": "integer",
          "title": "Calls"
        }
      },
      "type": "object",
      "required": [
        "label",
        "calls"
      ],
      "title": "AgentCount"
    },
    "AgentDay": {
      "properties": {
        "date": {
          "type": "string",
          "format": "date",
          "title": "Date"
        },
        "mcp": {
          "type": "integer",
          "title": "Mcp"
        },
        "a2a": {
          "type": "integer",
          "title": "A2A"
        }
      },
      "type": "object",
      "required": [
        "date",
        "mcp",
        "a2a"
      ],
      "title": "AgentDay",
      "description": "日 (JST) ごとの ok の呼び出し。method を問わない"
    },
    "AgentDuration": {
      "properties": {
        "protocol": {
          "type": "string",
          "title": "Protocol"
        },
        "tool": {
          "type": "string",
          "title": "Tool"
        },
        "p50": {
          "type": "integer",
          "title": "P50"
        },
        "p95": {
          "type": "integer",
          "title": "P95"
        },
        "calls": {
          "type": "integer",
          "title": "Calls"
        }
      },
      "type": "object",
      "required": [
        "protocol",
        "tool",
        "p50",
        "p95",
        "calls"
      ],
      "title": "AgentDuration"
    },
    "AgentRecentCall": {
      "properties": {
        "called_at": {
          "type": "string",
          "format": "date-time",
          "title": "Called At"
        },
        "protocol": {
          "type": "string",
          "title": "Protocol"
        },
        "method": {
          "type": "string",
          "title": "Method"
        },
        "tool": {
          "type": "string",
          "title": "Tool"
        },
        "outcome": {
          "type": "string",
          "title": "Outcome"
        },
        "client_name": {
          "type": "string",
          "title": "Client Name"
        },
        "client_vendor": {
          "type": "string",
          "title": "Client Vendor"
        },
        "user_agent": {
          "type": "string",
          "title": "User Agent"
        },
        "duration_ms": {
          "type": "integer",
          "title": "Duration Ms"
        }
      },
      "type": "object",
      "required": [
        "called_at",
        "protocol",
        "method",
        "tool",
        "outcome"
      ],
      "title": "AgentRecentCall"
    },
    "AgentToolDay": {
      "properties": {
        "date": {
          "type": "string",
          "format": "date",
          "title": "Date"
        },
        "tool": {
          "type": "string",
          "title": "Tool"
        },
        "calls": {
          "type": "integer",
          "title": "Calls"
        }
      },
      "type": "object",
      "required": [
        "date",
        "tool",
        "calls"
      ],
      "title": "AgentToolDay",
      "description": "日 (JST) × tool の、ok の tools/call と SendMessage"
    }
  }
}