{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "insights/v1/events/honeybadger-ruby/embed.active_agent.json",
  "title": "ActiveAgent: embed",
  "description": "An embedding request made through ActiveAgent.",
  "x-hb": {
    "notifiers": [
      "honeybadger-ruby"
    ],
    "category": "llm",
    "component": "Active Agent"
  },
  "type": "object",
  "properties": {
    "event_type": {
      "type": "string",
      "const": "embed.active_agent"
    },
    "provider": {
      "type": "string",
      "description": "Model provider name.",
      "examples": [
        "OpenAI"
      ]
    },
    "provider_module": {
      "type": "string",
      "description": "ActiveAgent provider module class name.",
      "examples": [
        "OpenAI::Embeddings"
      ]
    },
    "model": {
      "type": "string",
      "description": "Embedding model identifier.",
      "examples": [
        "text-embedding-3-small"
      ]
    },
    "trace_id": {
      "type": "string",
      "description": "Trace ID for correlating events within a single agent run.",
      "examples": [
        "9b4f2a6e-1c8d-4e7a-b3f5-6d2c9e0a4b18"
      ]
    },
    "input_size": {
      "type": "integer",
      "description": "Number of input strings submitted for embedding.",
      "examples": [
        3
      ]
    },
    "embedding_count": {
      "type": "integer",
      "description": "Number of embedding vectors returned.",
      "examples": [
        3
      ]
    },
    "encoding_format": {
      "type": "string",
      "description": "Encoding format requested, e.g. \"float\".",
      "examples": [
        "float"
      ]
    },
    "dimensions": {
      "type": "integer",
      "description": "Embedding vector dimensions.",
      "examples": [
        1536
      ]
    },
    "response_model": {
      "type": "string",
      "description": "Model identifier as returned by the provider.",
      "examples": [
        "text-embedding-3-small"
      ]
    },
    "response_id": {
      "type": "string",
      "description": "Provider-assigned response ID.",
      "examples": [
        "embd-9f8e7d6c5b4a3210fedc"
      ]
    },
    "usage": {
      "type": "object",
      "description": "Token usage reported by the provider.",
      "properties": {
        "input_tokens": {
          "type": "integer",
          "examples": [
            42
          ]
        },
        "total_tokens": {
          "type": "integer",
          "examples": [
            42
          ]
        }
      }
    },
    "duration": {
      "type": "number",
      "description": "Duration in milliseconds.",
      "examples": [
        184.27
      ]
    },
    "instrumenter_id": {
      "type": "string",
      "description": "Rails instrumenter UUID.",
      "examples": [
        "d9f4a7b2c1e8d3f6a0b5"
      ]
    },
    "request_id": {
      "type": "string",
      "description": "Rails request UUID, present on any event fired during a web request context. Merged globally by the Honeybadger agent.",
      "examples": [
        "0f5e4bb2-3c46-4b1c-91d5-2f4e8a6b9c01"
      ]
    },
    "hostname": {
      "type": "string",
      "description": "Server hostname. Attached to every event by default (events.attach_hostname).",
      "examples": [
        "web-1.example.com"
      ]
    },
    "environment": {
      "type": "string",
      "description": "Application environment, e.g. \"production\". Attached to every event by default (events.attach_environment).",
      "examples": [
        "production"
      ]
    }
  },
  "required": [
    "event_type",
    "provider",
    "model"
  ]
}
