Skip to content

Commit 4e41d8a

Browse files
committed
feat: Add Auggie ACP agent integration
Add support for Auggie (Augment Code's AI agent) as an ACP agent in AutoDev. Changes: - Updated ConfigFile.kt with Auggie configuration example and documentation - Updated AcpConnectionProvider.jvm.kt with Auggie support documentation - Added auggie-acp-setup.md: Complete setup guide for Auggie integration - Added acp-agents-overview.md: Overview of all supported ACP agents Auggie uses standard ACP JSON-RPC protocol and works with existing JvmAcpConnection implementation. No special handling required. Configuration example: Related: #536 Agent-Id: agent-4cf3ddd1-b330-47f4-986d-094547c663c0
1 parent 6656c86 commit 4e41d8a

File tree

4 files changed

+321
-4
lines changed

4 files changed

+321
-4
lines changed

mpp-core/src/commonMain/kotlin/cc/unitmesh/config/ConfigFile.kt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ import kotlinx.serialization.Serializable
4040
* command: "claude"
4141
* args: "--acp"
4242
* env: ""
43-
* activeAcpAgent: kimi
43+
* auggie:
44+
* name: "Auggie"
45+
* command: "auggie"
46+
* args: "--acp"
47+
* env: "AUGGIE_API_KEY=xxx"
48+
* activeAcpAgent: auggie
4449
* ```
4550
*/
4651
@Serializable
@@ -138,6 +143,12 @@ data class CloudStorageConfig(
138143
* Defines an external ACP-compliant agent that can be spawned as a child process
139144
* and communicated with via JSON-RPC over stdio.
140145
*
146+
* Supported agents:
147+
* - **Kimi CLI**: Chinese AI agent with strong coding capabilities
148+
* - **Claude CLI**: Anthropic's Claude Code agent
149+
* - **Auggie**: Augment Code's AI agent with ACP support
150+
* - **Gemini CLI**: Google's Gemini agent (when available)
151+
*
141152
* Example config.yaml:
142153
* ```yaml
143154
* acpAgents:
@@ -151,7 +162,12 @@ data class CloudStorageConfig(
151162
* command: "claude"
152163
* args: "--acp"
153164
* env: ""
154-
* activeAcpAgent: kimi
165+
* auggie:
166+
* name: "Auggie"
167+
* command: "auggie"
168+
* args: "--acp"
169+
* env: "AUGGIE_API_KEY=xxx"
170+
* activeAcpAgent: auggie
155171
* ```
156172
*/
157173
@Serializable

mpp-ui/docs/acp-agents-overview.md

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# ACP Agents Overview
2+
3+
AutoDev supports the Agent Client Protocol (ACP), allowing you to integrate external AI agents for coding tasks.
4+
5+
## What is ACP?
6+
7+
The Agent Client Protocol (ACP) is an open standard for connecting AI agents to development tools. It uses JSON-RPC 2.0 over stdio for communication, enabling seamless integration of external agents.
8+
9+
**Resources**:
10+
- [ACP GitHub Repository](https://github.com/agentclientprotocol/agent-client-protocol)
11+
- [ACP Specification](https://github.com/agentclientprotocol/agent-client-protocol/blob/main/SPECIFICATION.md)
12+
13+
## Supported Agents
14+
15+
AutoDev supports the following ACP-compliant agents:
16+
17+
### Auggie
18+
- **Provider**: Augment Code
19+
- **Documentation**: [Auggie ACP Setup](./auggie-acp-setup.md)
20+
- **Features**: Code generation, analysis, refactoring
21+
- **Installation**: `brew install augment-code/tap/auggie`
22+
23+
### Kimi CLI
24+
- **Provider**: Moonshot AI
25+
- **Features**: Chinese AI agent with strong coding capabilities
26+
- **Installation**: Follow [Kimi documentation](https://kimi.moonshot.cn)
27+
28+
### Claude Code
29+
- **Provider**: Anthropic
30+
- **Features**: Code generation, analysis, testing
31+
- **Installation**: Follow [Claude Code documentation](https://docs.anthropic.com/claude/docs/claude-code)
32+
33+
### Gemini CLI
34+
- **Provider**: Google
35+
- **Features**: Code generation, analysis
36+
- **Installation**: Follow [Gemini documentation](https://ai.google.dev)
37+
38+
## Configuration
39+
40+
All ACP agents are configured in `~/.autodev/config.yaml`:
41+
42+
```yaml
43+
acpAgents:
44+
auggie:
45+
name: "Auggie"
46+
command: "auggie"
47+
args: "--acp"
48+
env: "AUGGIE_API_KEY=xxx"
49+
50+
kimi:
51+
name: "Kimi CLI"
52+
command: "kimi"
53+
args: "--acp"
54+
env: "KIMI_API_KEY=xxx"
55+
56+
activeAcpAgent: auggie
57+
```
58+
59+
## Usage
60+
61+
### In Compose GUI
62+
63+
1. Open AutoDev Compose
64+
2. Go to the **Agentic** tab
65+
3. Click the **Engine** dropdown
66+
4. Select your preferred ACP agent
67+
5. Enter your task and click **Send**
68+
69+
### In CLI
70+
71+
```bash
72+
autodev code -p /path/to/project -t "Your task" --engine auggie
73+
```
74+
75+
## Architecture
76+
77+
```
78+
AutoDev (Client)
79+
↓ (JSON-RPC over stdio)
80+
ACP Agent CLI (--acp mode)
81+
↓ (ACP Protocol)
82+
External AI Agent
83+
```
84+
85+
## Features
86+
87+
- **Multiple Agents**: Configure and switch between different ACP agents
88+
- **Seamless Integration**: Agents appear in the engine selector dropdown
89+
- **Full Protocol Support**: Supports all standard ACP operations
90+
- **Environment Variables**: Pass API keys and configuration via env vars
91+
- **Custom Arguments**: Add agent-specific command-line arguments
92+
93+
## Troubleshooting
94+
95+
### Agent Not Appearing in Dropdown
96+
97+
- Verify agent is configured in `config.yaml`
98+
- Check `isConfigured()` returns true (command must be set)
99+
- Restart AutoDev
100+
101+
### Connection Issues
102+
103+
- Verify agent CLI is installed: `which auggie`
104+
- Test agent directly: `auggie --acp --help`
105+
- Check API key is valid
106+
- Review logs in `~/.autodev/acp-logs/`
107+
108+
### Performance
109+
110+
- ACP agents run as separate processes
111+
- Each agent maintains its own session
112+
- Agents are reused when possible for efficiency
113+
114+
## Adding New Agents
115+
116+
To add a new ACP agent:
117+
118+
1. Install the agent CLI
119+
2. Verify it supports `--acp` mode
120+
3. Add configuration to `config.yaml`
121+
4. Restart AutoDev
122+
5. Select the agent from the dropdown
123+
124+
## References
125+
126+
- [ACP Specification](https://github.com/agentclientprotocol/agent-client-protocol)
127+
- [Auggie Setup Guide](./auggie-acp-setup.md)
128+
- [AutoDev GitHub](https://github.com/phodal/auto-dev)
129+

mpp-ui/docs/auggie-acp-setup.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# Auggie ACP Agent Integration
2+
3+
This guide explains how to set up and use Auggie as an ACP (Agent Client Protocol) agent in AutoDev.
4+
5+
## Overview
6+
7+
Auggie is Augment Code's AI agent that supports the Agent Client Protocol (ACP). By integrating Auggie with AutoDev, you can leverage Auggie's capabilities for code generation, analysis, and refactoring tasks directly within AutoDev.
8+
9+
## Prerequisites
10+
11+
1. **Auggie CLI installed**: Download and install Auggie from [Augment Code](https://docs.augmentcode.com/cli/acp/agent)
12+
2. **Auggie API Key**: Obtain your API key from your Augment Code account
13+
3. **AutoDev 3.0+**: Ensure you have AutoDev version 3.0 or later
14+
15+
## Installation
16+
17+
### 1. Install Auggie CLI
18+
19+
Follow the official [Auggie installation guide](https://docs.augmentcode.com/cli/acp/agent):
20+
21+
```bash
22+
# macOS / Linux
23+
brew install augment-code/tap/auggie
24+
25+
# Or download from releases
26+
# https://github.com/augment-code/auggie/releases
27+
```
28+
29+
### 2. Verify Installation
30+
31+
```bash
32+
auggie --version
33+
auggie --acp --help
34+
```
35+
36+
## Configuration
37+
38+
### 1. Edit config.yaml
39+
40+
Add Auggie to your AutoDev configuration file at `~/.autodev/config.yaml`:
41+
42+
```yaml
43+
acpAgents:
44+
auggie:
45+
name: "Auggie"
46+
command: "auggie"
47+
args: "--acp"
48+
env: "AUGGIE_API_KEY=your_api_key_here"
49+
50+
activeAcpAgent: auggie
51+
```
52+
53+
### 2. Set Your API Key
54+
55+
Replace `your_api_key_here` with your actual Auggie API key:
56+
57+
```yaml
58+
env: "AUGGIE_API_KEY=sk-aug-xxxxxxxxxxxxx"
59+
```
60+
61+
Alternatively, set the environment variable:
62+
63+
```bash
64+
export AUGGIE_API_KEY=sk-aug-xxxxxxxxxxxxx
65+
```
66+
67+
## Usage
68+
69+
### In AutoDev Compose GUI
70+
71+
1. Open AutoDev Compose
72+
2. In the Agentic tab, click the **Engine** dropdown
73+
3. Select **Auggie** from the list
74+
4. Enter your task in the input field
75+
5. Click **Send** to execute the task
76+
77+
### In AutoDev CLI
78+
79+
```bash
80+
autodev code -p /path/to/project -t "Your task here" --engine auggie
81+
```
82+
83+
## Troubleshooting
84+
85+
### Connection Failed
86+
87+
**Error**: `Failed to connect to ACP agent`
88+
89+
**Solutions**:
90+
- Verify Auggie is installed: `auggie --version`
91+
- Check API key is set correctly
92+
- Ensure Auggie supports ACP mode: `auggie --acp --help`
93+
94+
### Command Not Found
95+
96+
**Error**: `auggie: command not found`
97+
98+
**Solutions**:
99+
- Verify installation: `which auggie`
100+
- Add Auggie to PATH if needed
101+
- Reinstall Auggie
102+
103+
### API Key Issues
104+
105+
**Error**: `Authentication failed` or `Invalid API key`
106+
107+
**Solutions**:
108+
- Verify API key in config.yaml
109+
- Check API key hasn't expired
110+
- Regenerate API key in Augment Code dashboard
111+
112+
## Configuration Examples
113+
114+
### Multiple ACP Agents
115+
116+
You can configure multiple ACP agents and switch between them:
117+
118+
```yaml
119+
acpAgents:
120+
auggie:
121+
name: "Auggie"
122+
command: "auggie"
123+
args: "--acp"
124+
env: "AUGGIE_API_KEY=sk-aug-xxx"
125+
126+
kimi:
127+
name: "Kimi CLI"
128+
command: "kimi"
129+
args: "--acp"
130+
env: "KIMI_API_KEY=xxx"
131+
132+
claude:
133+
name: "Claude Code"
134+
command: "claude"
135+
args: "--acp"
136+
env: ""
137+
138+
activeAcpAgent: auggie
139+
```
140+
141+
### Advanced Configuration
142+
143+
```yaml
144+
acpAgents:
145+
auggie:
146+
name: "Auggie (Production)"
147+
command: "auggie"
148+
args: "--acp --verbose"
149+
env: |
150+
AUGGIE_API_KEY=sk-aug-xxx
151+
AUGGIE_MODEL=claude-3-opus
152+
```
153+
154+
## References
155+
156+
- [Auggie Documentation](https://docs.augmentcode.com/cli/acp/agent)
157+
- [Agent Client Protocol](https://github.com/agentclientprotocol/agent-client-protocol)
158+
- [AutoDev GitHub](https://github.com/phodal/auto-dev)
159+

mpp-ui/src/jvmMain/kotlin/cc/unitmesh/devins/ui/compose/agent/acp/AcpConnectionProvider.jvm.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,21 @@ import java.io.File
1515
/**
1616
* Create the appropriate connection based on agent configuration.
1717
* For Claude Code agents, uses [JvmClaudeCodeConnection] with direct stream-json protocol.
18-
* For all other ACP agents (Gemini, Kimi, Copilot, etc.), uses [JvmAcpConnection].
18+
* For all other ACP agents (Auggie, Gemini, Kimi, Copilot, etc.), uses [JvmAcpConnection].
1919
*/
2020
actual fun createAcpConnection(): AcpConnection? = JvmAcpConnection()
2121

2222
/**
2323
* Create the appropriate connection for the given agent config.
2424
* - Claude Code: uses [JvmClaudeCodeConnection] with direct stream-json protocol.
25-
* - All others: uses [JvmAcpConnection] with standard ACP JSON-RPC.
25+
* - Auggie: uses [JvmAcpConnection] with standard ACP JSON-RPC.
26+
* - All others (Kimi, Gemini, etc.): uses [JvmAcpConnection] with standard ACP JSON-RPC.
27+
*
28+
* Supported agents:
29+
* - **Auggie**: Augment Code's AI agent (https://docs.augmentcode.com/cli/acp/agent)
30+
* - **Claude Code**: Anthropic's Claude Code agent
31+
* - **Kimi**: Chinese AI agent with strong coding capabilities
32+
* - **Gemini**: Google's Gemini agent
2633
*
2734
* @see <a href="https://github.com/phodal/auto-dev/issues/538">Issue #538</a>
2835
*/
@@ -43,6 +50,12 @@ actual fun isAcpSupported(): Boolean = true
4350
* Uses [AcpClient] from mpp-core which handles the ACP protocol details.
4451
* Events are streamed directly to the provided [CodingAgentRenderer] via
4552
* [AcpClient.promptAndRender], allowing seamless integration with ComposeRenderer.
53+
*
54+
* Supports all standard ACP agents including:
55+
* - Auggie (https://docs.augmentcode.com/cli/acp/agent)
56+
* - Kimi CLI (with automatic --work-dir injection)
57+
* - Gemini CLI
58+
* - Any other ACP-compliant agent
4659
*/
4760
class JvmAcpConnection : AcpConnection {
4861
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)

0 commit comments

Comments
 (0)