{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/axonflow/json-schema/axonflow-create-agent-request-schema.json",
  "title": "CreateAgentRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/axonflow-agents-api-openapi.yml#/components/schemas/CreateAgentRequest",
  "type": "object",
  "required": [
    "name",
    "config"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Agent name (lowercase, alphanumeric, hyphens, underscores)"
    },
    "domain": {
      "type": "string",
      "description": "Agent domain"
    },
    "description": {
      "type": "string"
    },
    "is_active": {
      "type": "boolean",
      "default": true
    },
    "config": {
      "$ref": "#/$defs/AgentConfigSpec"
    }
  },
  "$defs": {
    "AgentConfigSpec": {
      "type": "object",
      "description": "Agent configuration specification",
      "properties": {
        "execution": {
          "type": "object",
          "properties": {
            "default_mode": {
              "type": "string",
              "enum": [
                "auto",
                "parallel",
                "sequential"
              ]
            },
            "max_parallel_tasks": {
              "type": "integer"
            },
            "timeout_seconds": {
              "type": "integer"
            }
          }
        },
        "agents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AgentDefinition"
          }
        },
        "routing": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RoutingRule"
          }
        }
      }
    },
    "AgentDefinition": {
      "type": "object",
      "required": [
        "name",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "llm-call",
            "connector-call"
          ]
        },
        "llm": {
          "type": "object",
          "description": "LLM config (required for llm-call type)",
          "properties": {
            "provider": {
              "type": "string"
            },
            "model": {
              "type": "string"
            }
          }
        },
        "connector": {
          "type": "object",
          "description": "Connector config (required for connector-call type)",
          "properties": {
            "name": {
              "type": "string"
            },
            "operation": {
              "type": "string"
            }
          }
        }
      }
    },
    "RoutingRule": {
      "type": "object",
      "required": [
        "pattern",
        "agent"
      ],
      "properties": {
        "pattern": {
          "type": "string",
          "description": "Regex pattern to match"
        },
        "agent": {
          "type": "string",
          "description": "Target agent name"
        },
        "priority": {
          "type": "integer",
          "description": "Higher priority rules match first"
        }
      }
    }
  }
}