{
  "http": {
    "name": "HTTP Endpoint",
    "icon": "/images/agents-icon/http.webp",
    "description": "Configure HTTP endpoint to send requests",
    "fields": [
      {
        "field": "label",
        "label": "Agent Name",
        "type": "text",
        "required": true,
        "placeholder": "Enter a descriptive name for this agent(Letters and numbers only)",
        "description": "A descriptive name for this agent"
      },
      {
        "field": "url",
        "label": "URL",
        "type": "text",
        "required": true,
        "placeholder": "https://api.example.com/chat",
        "description": "The HTTP endpoint URL to send requests to"
      },
      {
        "field": "method",
        "label": "HTTP Method",
        "type": "select",
        "required": true,
        "options": [
          { "label": "POST", "value": "POST" },
          { "label": "GET", "value": "GET" },
          { "label": "PUT", "value": "PUT" },
          { "label": "PATCH", "value": "PATCH" },
          { "label": "DELETE", "value": "DELETE" }
        ],
        "defaultValue": "POST",
        "description": "HTTP request method"
      },
      {
        "field": "headers",
        "label": "Headers",
        "type": "json",
        "required": false,
        "placeholder": "{\n  \"Content-Type\": \"application/json\"\n}",
        "defaultValue": "{\n  \"Content-Type\": \"application/json\"\n}",
        "rows": 4,
        "description": "HTTP headers in JSON format"
      },
      {
        "field": "body",
        "label": "Request Body",
        "type": "textarea",
        "required": false,
        "placeholder": "{\n  \"message\": \"{{prompt}}\"\n}",
        "defaultValue": "{\n  \"message\": \"{{prompt}}\"\n}",
        "rows": 6,
        "description": "Request body template. Use {{prompt}} for the test input"
      },
      {
        "field": "transform_response",
        "label": "Response Parser",
        "type": "text",
        "required": false,
        "placeholder": "json.choices[0].message.content",
        "description": "JSONPath to extract the response (optional)"
      },
      {
        "field": "timeout_ms",
        "label": "Timeout (ms)",
        "type": "number",
        "required": false,
        "min": 1000,
        "max": 300000,
        "step": 1000,
        "defaultValue": 30000,
        "description": "Request timeout in milliseconds"
      }
    ]
  },
  "dify": {
    "name": "Dify AI",
    "icon": "/images/agents-icon/dify.webp",
    "description": "Configure Dify AI platform",
    "fields": [
      {
        "field": "label",
        "label": "Agent Name",
        "type": "text",
        "required": true,
        "placeholder": "Enter a descriptive name for this agent(Letters and numbers only)",
        "description": "A descriptive name for this agent"
      },
      {
        "field": "extra.dify_type",
        "label": "Dify Endpoint Type",
        "type": "select",
        "required": false,
        "options": [
          { "label": "Chat Messages", "value": "chat" },
          { "label": "Workflow", "value": "workflow" }
        ],
        "defaultValue": "chat",
        "description": "Chat Messages for conversational apps, Workflow for workflow execution"
      },
      {
        "field": "apiBaseUrl",
        "label": "API Base URL",
        "type": "text",
        "required": false,
        "placeholder": "https://api.dify.ai/v1",
        "description": "Dify API base URL. Leave empty to use default"
      },
      {
        "field": "apiKey",
        "label": "API-Key",
        "type": "password",
        "required": true,
        "placeholder": "app-xxxx",
        "description": "Dify API-Key"
      },
      {
        "field": "extra.user",
        "label": "User ID",
        "type": "text",
        "required": false,
        "defaultValue": "agent-user",
        "description": "User identifier for the conversation"
      },
      {
        "field": "extra.conversation_id",
        "label": "Conversation ID",
        "type": "text",
        "required": false,
        "placeholder": "Leave empty to start a new conversation",
        "description": "Leave empty to start a new conversation, or provide an existing conversation ID"
      },
      {
        "field": "extra.inputs",
        "label": "Custom Inputs",
        "type": "json",
        "required": false,
        "placeholder": "{}",
        "defaultValue": "{}",
        "rows": 4,
        "description": "Custom inputs that will be passed to the Dify app/workflow (JSON format)"
      },
      {
        "field": "timeout_ms",
        "label": "Timeout (ms)",
        "type": "number",
        "required": false,
        "min": 1000,
        "max": 300000,
        "step": 1000,
        "defaultValue": 60000,
        "description": "Request timeout in milliseconds"
      }
    ]
  },
  "coze": {
    "name": "Coze AI",
    "icon": "/images/agents-icon/coze.png",
    "description": "Configure Coze AI bot platform",
    "fields": [
      {
        "field": "label",
        "label": "Agent Name",
        "type": "text",
        "required": true,
        "placeholder": "Enter a descriptive name for this agent(Letters and numbers only)",
        "description": "A descriptive name for this agent"
      },
      {
        "field": "extra.coze_region",
        "label": "Coze Region",
        "type": "select",
        "required": false,
        "options": [
          { "label": "China (api.coze.cn)", "value": "coze-cn" },
          { "label": "International (api.coze.com)", "value": "coze-com" }
        ],
        "defaultValue": "coze-cn",
        "description": "Select the Coze API region"
      },
      {
        "field": "extra.bot_id",
        "label": "Bot ID",
        "type": "text",
        "required": true,
        "placeholder": "Enter your Coze Bot ID",
        "description": "Required. Your Coze bot ID from the Coze platform"
      },
      {
        "field": "apiBaseUrl",
        "label": "API Base URL",
        "type": "text",
        "required": false,
        "placeholder": "https://api.coze.cn",
        "description": "Coze API base URL. Leave empty to use default based on region"
      },
      {
        "field": "apiKey",
        "label": "API-Key",
        "type": "password",
        "required": true,
        "placeholder": "pat_xxxx",
        "description": "Coze API-Key"
      },
      {
        "field": "extra.user_id",
        "label": "User ID",
        "type": "text",
        "required": false,
        "defaultValue": "agent-user",
        "description": "User identifier for the conversation"
      },
      {
        "field": "extra.conversation_id",
        "label": "Conversation ID",
        "type": "text",
        "required": false,
        "placeholder": "Leave empty to start a new conversation",
        "description": "Leave empty to start a new conversation, or provide an existing conversation ID"
      },
      {
        "field": "timeout_ms",
        "label": "Timeout (ms)",
        "type": "number",
        "required": false,
        "min": 1000,
        "max": 300000,
        "step": 1000,
        "defaultValue": 120000,
        "description": "Request timeout in milliseconds (default: 120000ms = 2 minutes)"
      }
    ]
  },
  "common": {
    "name": "Common Configuration",
    "description": "Common configuration options for all provider types",
    "fields": [
      {
        "field": "delay",
        "label": "Delay (ms)",
        "type": "number",
        "required": false,
        "min": 0,
        "max": 60000,
        "step": 100,
        "defaultValue": 0,
        "description": "Delay between requests in milliseconds to simulate a real user"
      }
    ]
  }
}
