{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://orkestron.dev/schemas/agent-protocol/0.1.0/agent-protocol.schema.json",
  "title": "Orkestron Agent Protocol",
  "description": "What an Agent Provider publishes on orkestron.dev to list an agent: its advertised capabilities, the meta-models it operates on, its runtime binding (how .net reaches it via the AIL), SLA and pricing. Transport-agnostic; maps onto the A2A AgentCard.",
  "type": "object",
  "additionalProperties": false,
  "required": ["protocol_version", "name", "capabilities", "runtime", "work_modes"],
  "properties": {
    "protocol_version": { "type": "string", "const": "0.1.0" },
    "name": { "type": "string", "minLength": 1 },
    "description": { "type": "string" },
    "capabilities": {
      "description": "Discrete skills the agent advertises (an atomic_task is dispatched to a matching skill; the Contract's acceptance defines 'done').",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["id", "name"],
        "properties": {
          "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_.-]*$" },
          "name": { "type": "string", "minLength": 1 },
          "description": { "type": "string" },
          "tags": { "type": "array", "items": { "type": "string" } },
          "input_modes": { "type": "array", "items": { "type": "string" } },
          "output_modes": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    "meta_models": {
      "description": "AISMM models the agent can operate on (product_id / model_instance_id, optionally specific layers).",
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["product_id"],
        "properties": {
          "product_id": { "type": "string", "format": "uuid" },
          "model_instance_id": { "type": "string", "format": "uuid" },
          "layers": { "type": "array", "items": { "type": "string", "pattern": "^b\\d+\\.\\d{3}$" } }
        }
      }
    },
    "work_modes": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string", "enum": ["contract-based", "process-based"] }
    },
    "runtime": {
      "description": "How .net reaches the agent through the AIL. Orthogonal transport (A2A wire / MCP context channel).",
      "type": "object",
      "additionalProperties": false,
      "required": ["binding", "endpoint"],
      "properties": {
        "binding": { "type": "string", "enum": ["a2a", "mcp", "hosted"] },
        "endpoint": { "type": "string", "description": "URL the runtime exposes (A2A service / MCP server); 'hosted' = run on the platform." }
      }
    },
    "sla": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "response_time": { "type": "string", "description": "ISO 8601 duration, e.g. PT4H." },
        "availability": { "type": "string", "description": "e.g. 99.5%." }
      }
    },
    "pricing": {
      "type": "object",
      "additionalProperties": false,
      "required": ["scheme"],
      "properties": {
        "scheme": { "type": "string", "enum": ["fixed", "hourly", "value_based", "bid"] },
        "amount": { "type": "number", "minimum": 0 },
        "currency": { "type": "string", "default": "USD" }
      }
    }
  }
}
