{
  "$id": "https://comitiva.dev/schema/SharedAgentDraft.json",
  "title": "SharedAgentDraft",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "avatar": {
      "type": "object",
      "properties": {
        "color": {
          "type": "string",
          "enum": [
            "indigo",
            "violet",
            "pink",
            "rose",
            "orange",
            "amber",
            "emerald",
            "teal",
            "sky",
            "slate"
          ]
        },
        "emoji": {
          "type": "string",
          "minLength": 1,
          "maxLength": 16
        }
      },
      "required": [
        "color"
      ]
    },
    "provider": {
      "type": "string",
      "enum": [
        "anthropic",
        "openai-compatible",
        "google",
        "ollama",
        "claude-code",
        "codex",
        "gemini-cli"
      ]
    },
    "model": {
      "default": null,
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ]
    },
    "role": {
      "default": "",
      "type": "string",
      "maxLength": 100000
    },
    "params": {
      "default": {},
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "minimum": 0,
          "maximum": 2
        },
        "maxTokens": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "topP": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "maxToolIterations": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200
        }
      }
    },
    "toolServerIds": {
      "default": [],
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "permissionPolicy": {
      "default": "ask",
      "type": "string",
      "enum": [
        "ask",
        "allow-writes",
        "read-only"
      ]
    },
    "tags": {
      "default": [],
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32
      }
    }
  },
  "required": [
    "name",
    "avatar",
    "provider"
  ]
}
