AutoDev 1.7.0 AutoDev AI Agent
In the #51 issue of the open-source AI IDE plugin AutoDev, we designed the AI Agent capability for AutoDev. Half a year later, we have finally delivered this feature.
In AutoDev 1.7.0, you can now integrate internal AI Agents and seamlessly combine them with existing AI-assisted capabilities.
Introduction paragraph text here.
This article will demonstrate how to use AutoDev's Agent capabilities through a demo combining AI Agents. For details, see the documentation: https://ide.unitmesh.cc/agent/agent.html, or refer to the source code.
Custom AI Agent
Background: As we know, general-purpose large language models lack internal reference materials, requiring RAG extensions. In scenarios where our documentation might be constantly updated, implementing similar functionality directly on the IDE is impractical. Therefore, we should implement such capabilities on the server side and expose interfaces to the IDE.
Based on our previous experience with custom LLM implementations, we designed AutoDev's custom AI Agent capability to facilitate...
1. Direct Response Example: Internal API Integration
Typical scenarios:
- When models lack specific knowledge. For example, when learning HarmonyOS application development, internal APIs can be deployed to accelerate learning.
- Internal knowledge. When dealing with extensive domain knowledge, specifications, or API information.
In these scenarios, use Direct
as the response type to integrate corresponding AI Agents. Configuration example:
{
"name": "Internal API Integration",
"url": "http://127.0.0.1:8765/api/agent/api-market",
"responseAction": "Direct"
}
This configuration directly returns and processes the content.
2. Retrieval Result Example: Component Library Integration
Typical scenarios:
- Knowledge retrieval. When needing specific categories of knowledge for further communication. For example, requiring AI to select appropriate components while possessing all component information for subsequent coding.
In these scenarios, use TextChunk
as the response type. Configuration example:
{
"name": "Component Query",
"url": "http://127.0.0.1:8765/api/agent/component-list",
"responseAction": "TextChunk"
}
Here, the AI returns search results that can be used for subsequent conversations.
3. WebView Result Example: Low-code Page Generation
Typical scenarios:
- Frontend page generation
- Low-code page generation
These similar scenarios often require integration with internal component libraries or RAG due to frequent issues in AI-generated frontend code. However, directly generating prototypes through AI for discussion among product managers, UX designers, and developers proves more valuable.
In these scenarios, use WebView
as the response type. Configuration example:
{
"name": "Page Generation",
"url": "http://127.0.0.1:8765/api/agent/ux",
"auth": {
"type": "Bearer",
"token": "eyJhbGci"
},
"responseAction": "WebView"
}
This configuration returns results in WebView format, which will be displayed in the chat interface.
Summary
Within the IDE, we can treat AI Agents as a series of capability plugins to accelerate our development process.