| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338 |
- {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "urn:hermes-agent:schema:shared-metrics:v1",
- "title": "Hermes Shared Metrics Package v1",
- "type": "object",
- "additionalProperties": false,
- "required": [
- "schema_version",
- "package_id",
- "install_id",
- "period_start",
- "period_end",
- "generated_at",
- "resource",
- "metrics"
- ],
- "properties": {
- "schema_version": {
- "const": "hermes.shared_metrics.v1"
- },
- "package_id": {
- "$ref": "#/$defs/uuid"
- },
- "install_id": {
- "description": "Random persistent identifier scoped to one HERMES_HOME; local-only in schema v1.",
- "$ref": "#/$defs/uuid"
- },
- "period_start": {
- "type": "string",
- "format": "date-time"
- },
- "period_end": {
- "type": "string",
- "format": "date-time"
- },
- "generated_at": {
- "type": "string",
- "format": "date-time"
- },
- "resource": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "hermes_version"
- ],
- "properties": {
- "hermes_version": {
- "type": "string",
- "minLength": 1,
- "maxLength": 64
- }
- }
- },
- "metrics": {
- "type": "array",
- "minItems": 1,
- "items": {
- "oneOf": [
- {
- "$ref": "#/$defs/model_call_counter"
- },
- {
- "$ref": "#/$defs/task_started_counter"
- },
- {
- "$ref": "#/$defs/task_finished_counter"
- }
- ]
- }
- }
- },
- "$defs": {
- "uuid": {
- "type": "string",
- "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
- },
- "model_call_counter": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "name",
- "type",
- "dimensions",
- "value"
- ],
- "properties": {
- "name": {
- "const": "hermes.model_call.count"
- },
- "type": {
- "const": "counter"
- },
- "dimensions": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "call_role",
- "locality",
- "model_family",
- "outcome",
- "provider_family"
- ],
- "properties": {
- "call_role": {
- "const": "primary"
- },
- "locality": {
- "enum": [
- "local",
- "remote",
- "unknown"
- ]
- },
- "model_family": {
- "enum": [
- "claude",
- "deepseek",
- "gemini",
- "gemma",
- "glm",
- "gpt",
- "grok",
- "kimi",
- "llama",
- "minimax",
- "mimo",
- "mistral",
- "nemotron",
- "nova",
- "o1",
- "o3",
- "o4",
- "qwen",
- "step",
- "trinity",
- "unknown"
- ]
- },
- "outcome": {
- "enum": [
- "cancelled",
- "failed",
- "success"
- ]
- },
- "provider_family": {
- "enum": [
- "aggregator",
- "custom",
- "direct",
- "local",
- "unknown"
- ]
- }
- }
- },
- "value": {
- "type": "integer",
- "minimum": 1
- }
- }
- },
- "task_started_counter": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "name",
- "type",
- "dimensions",
- "value"
- ],
- "properties": {
- "name": {
- "const": "hermes.task_run.started"
- },
- "type": {
- "const": "counter"
- },
- "dimensions": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "entrypoint",
- "execution_surface"
- ],
- "properties": {
- "entrypoint": {
- "$ref": "#/$defs/task_entrypoint"
- },
- "execution_surface": {
- "$ref": "#/$defs/execution_surface"
- }
- }
- },
- "value": {
- "type": "integer",
- "minimum": 1
- }
- }
- },
- "task_finished_counter": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "name",
- "type",
- "dimensions",
- "value"
- ],
- "properties": {
- "name": {
- "const": "hermes.task_run.finished"
- },
- "type": {
- "const": "counter"
- },
- "dimensions": {
- "type": "object",
- "additionalProperties": false,
- "required": [
- "duration_bucket",
- "end_reason",
- "entrypoint",
- "execution_surface",
- "model_call_count_bucket",
- "outcome",
- "retry_count_bucket",
- "termination",
- "tool_call_count_bucket"
- ],
- "properties": {
- "duration_bucket": {
- "$ref": "#/$defs/duration_bucket"
- },
- "end_reason": {
- "enum": [
- "approval_denied",
- "completed",
- "failed",
- "guardrail_blocked",
- "iteration_limit",
- "system_aborted",
- "timed_out",
- "unknown",
- "user_cancelled"
- ]
- },
- "entrypoint": {
- "$ref": "#/$defs/task_entrypoint"
- },
- "execution_surface": {
- "$ref": "#/$defs/execution_surface"
- },
- "model_call_count_bucket": {
- "$ref": "#/$defs/count_bucket"
- },
- "outcome": {
- "enum": [
- "cancelled",
- "failed",
- "success",
- "timed_out",
- "unknown"
- ]
- },
- "retry_count_bucket": {
- "$ref": "#/$defs/count_bucket"
- },
- "termination": {
- "enum": [
- "none",
- "system_aborted",
- "timed_out",
- "unknown",
- "user_cancelled"
- ]
- },
- "tool_call_count_bucket": {
- "$ref": "#/$defs/count_bucket"
- }
- }
- },
- "value": {
- "type": "integer",
- "minimum": 1
- }
- }
- },
- "execution_surface": {
- "enum": [
- "api",
- "batch",
- "cli",
- "desktop",
- "gateway",
- "other",
- "python",
- "scheduled_task",
- "tui",
- "unknown"
- ]
- },
- "task_entrypoint": {
- "enum": [
- "api",
- "background",
- "batch",
- "delegated",
- "gateway_message",
- "interactive",
- "other",
- "python",
- "scheduled_task",
- "unknown"
- ]
- },
- "duration_bucket": {
- "enum": [
- "1s_to_5s",
- "2m_to_10m",
- "30s_to_2m",
- "5s_to_30s",
- "gte_10m",
- "lt_1s"
- ]
- },
- "count_bucket": {
- "enum": [
- "0",
- "1",
- "2",
- "3_to_5",
- "6_to_10",
- "gte_11"
- ]
- }
- }
- }
|