AutoDev@1.7.0

Since AutoDev@1.7.0 version, we support custom AI agent, you can integrate your own AI agent into AutoDev.

Custom AI Agent Dropdown

Custom AI Agent

  1. open AutoDev Config in Settings -> Tools -> AutoDev, select Custom Agent.
  2. click Enable Custom Agent
  3. fill JSON format config in Custom Agent Config textarea.
  4. Apply and OK.
  5. Click x and Close AutoDev panel and click NewChat in the AutoDev tool window.

Custom Agent Examples

Demo:

[
  {
    "name": "内部 API 集成",
    "description": "在一个组织或项目中,不同系统或组件之间的通信接口。",
    "url": "http://127.0.0.1:8765/api/agent/api-market",
    "responseAction": "Direct"
  },
  {
    "name": "组件库查询",
    "description": "从组件库中检索特定的 UI 组件,以便在开发的应用程序中使用。",
    "url": "http://127.0.0.1:8765/api/agent/component-list",
    "responseAction": "TextChunk"
  },
  {
    "name": "页面生成",
    "description": "使用 React 框架,基于组件和状态来生成页面。",
    "url": "http://127.0.0.1:8765/api/agent/ux",
    "auth": {
      "type": "Bearer",
      "token": "eyJhbGci"
    },
    "responseAction": "WebView"
  },
  {
    "name": "DevInInsert",
    "description": "Update,並指定20秒的timeout時間",
    "url": "http://127.0.0.1:8765/api/agent/devins-sample",
    "responseAction": "DevIns",
    "defaultTimeout": 20
  }
]

Dif Example

{
    "name": "DifyAI",
    "description": "Dify Example",
    "url": "https://api.dify.ai/v1/completion-messages",
    "auth": {
      "type": "Bearer",
      "token": "app-abcd"
    },
    "connector": {
      "requestFormat": "{\"fields\": {\"inputs\": {\"feature\": \"$content\"}, \"response_mode\": \"streaming\", \"user\": \"phodal\" }}",
      "responseFormat": "$.answer"
    },
    "responseAction": "Stream"
}

Coze Example

[
  {
    "name": "CozeAI",
    "description": "Coze Example",
    "url": "https://api.coze.cn/v3/chat",
    "auth": {
      "type": "Bearer",
      "token": "xxx"
    },
    "connector": {
      "requestFormat": "{\"fields\":{\"stream\": true, \"user_id\": \"user\",\"bot_id\": \"749xxx\",\"additional_messages\": [{\"role\": \"user\", \"content_type\":\"text\", \"content\": \"$content\" }]}}",
      "responseFormat": "$[?(@.type == 'answer' && !(@.created_at))].content"
    },
    "responseAction": "Stream"
  }
]

responseAction

enum class CustomAgentResponseAction {
    /**
     * Direct display result
     */
    Direct,

    /**
     * Stream response
     */
    Stream,

    /**
     * Text splitting result
     */
    TextChunk,

    /**
     * Display result in WebView
     */
    WebView,

    /**
     * Handle by DevIns language compile and run in code block.
     * @since: AutoDev@1.8.2
     */
    DevIns
}

interactive

enum class InteractionType {
    ChatPanel,
    AppendCursor,
    AppendCursorStream,
    OutputFile,
    ReplaceSelection,
    ReplaceCurrentFile,
    ;
}