Skip to content

Commit ea7ee88

Browse files
authored
Merge pull request #24 from kevinelliott/copilot/add-aider-cli-support
Add Aider CLI agent support
2 parents 32c119c + a1d40e3 commit ea7ee88

File tree

6 files changed

+446
-1
lines changed

6 files changed

+446
-1
lines changed

examples/aider-coding.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: "1.0"
2+
3+
agents:
4+
- id: aider-1
5+
type: aider
6+
name: "Code Assistant"
7+
prompt: "You are an AI pair programmer helping with code review and suggestions."
8+
announcement: "🤖 Aider has joined to help with code!"
9+
model: "gpt-4"
10+
temperature: 0.7
11+
max_tokens: 2000
12+
13+
orchestrator:
14+
mode: round-robin
15+
max_turns: 5
16+
turn_timeout: 90s
17+
response_delay: 2s
18+
initial_prompt: "Let's discuss the best practices for implementing error handling in Go."
19+
20+
logging:
21+
enabled: true
22+
show_metrics: true

examples/aider-team-coding.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: "1.0"
2+
3+
agents:
4+
- id: aider-coder
5+
type: aider
6+
name: "Aider Coder"
7+
prompt: "You are an expert pair programmer who focuses on clean, maintainable code and best practices."
8+
announcement: "🤖 Aider has joined the coding session!"
9+
model: "gpt-4"
10+
temperature: 0.7
11+
max_tokens: 2000
12+
13+
- id: reviewer-1
14+
type: claude
15+
name: "Code Reviewer"
16+
prompt: "You are a senior code reviewer who looks for potential issues, edge cases, and improvements."
17+
announcement: "👁️ Code Reviewer is ready to analyze!"
18+
model: "claude-sonnet-4.5"
19+
temperature: 0.6
20+
max_tokens: 1500
21+
22+
- id: architect-1
23+
type: gemini
24+
name: "System Architect"
25+
prompt: "You are a system architect who thinks about overall design, scalability, and patterns."
26+
announcement: "🏗️ System Architect has joined to provide design insights!"
27+
model: "gemini-2.0-flash"
28+
temperature: 0.7
29+
max_tokens: 1500
30+
31+
orchestrator:
32+
mode: round-robin
33+
max_turns: 8
34+
turn_timeout: 90s
35+
response_delay: 2s
36+
initial_prompt: "Let's design and implement a new feature for handling concurrent API requests with rate limiting in a Go application. We need to consider error handling, retry logic, and observability."
37+
38+
logging:
39+
enabled: true
40+
show_metrics: true

internal/registry/agents.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,30 @@
335335
"windows": "npm update -g opencode-ai"
336336
},
337337
"requires_auth": true
338+
},
339+
{
340+
"name": "Aider",
341+
"command": "aider",
342+
"description": "AI pair programming in your terminal",
343+
"docs": "https://aider.chat/docs/install.html",
344+
"package_manager": "pypi",
345+
"package_name": "aider-chat",
346+
"install": {
347+
"darwin": "pip install aider-chat",
348+
"linux": "pip install aider-chat",
349+
"windows": "pip install aider-chat"
350+
},
351+
"uninstall": {
352+
"darwin": "pip uninstall aider-chat",
353+
"linux": "pip uninstall aider-chat",
354+
"windows": "pip uninstall aider-chat"
355+
},
356+
"upgrade": {
357+
"darwin": "pip install --upgrade aider-chat",
358+
"linux": "pip install --upgrade aider-chat",
359+
"windows": "pip install --upgrade aider-chat"
360+
},
361+
"requires_auth": true
338362
}
339363
]
340364
}

internal/registry/registry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func TestGetAll(t *testing.T) {
2929
}
3030

3131
// Verify we have the expected agents
32-
expectedCount := 14 // Amp, Claude, Codex, Copilot, Crush, Cursor, Factory, Gemini, Groq, Kimi, OpenCode, Qoder, Qwen, Ollama
32+
expectedCount := 15 // Aider, Amp, Claude, Codex, Copilot, Crush, Cursor, Factory, Gemini, Groq, Kimi, OpenCode, Qoder, Qwen, Ollama
3333
if len(agents) != expectedCount {
3434
t.Errorf("Expected %d agents, got %d", expectedCount, len(agents))
3535
}

pkg/adapters/adapters_test.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,37 @@ func TestAmpAgentInitialization(t *testing.T) {
256256
}
257257
}
258258

259+
func TestAiderAgentInitialization(t *testing.T) {
260+
aiderAgent := NewAiderAgent()
261+
262+
config := agent.AgentConfig{
263+
ID: "aider-1",
264+
Type: "aider",
265+
Name: "Aider",
266+
Prompt: "You are Aider",
267+
Announcement: "Aider has joined!",
268+
Model: "gpt-4",
269+
}
270+
271+
err := aiderAgent.Initialize(config)
272+
if err != nil {
273+
if strings.Contains(err.Error(), "not found") {
274+
t.Skip("aider CLI not available, skipping test")
275+
}
276+
t.Fatalf("initialization failed: %v", err)
277+
}
278+
279+
if aiderAgent.GetID() != "aider-1" {
280+
t.Errorf("expected ID 'aider-1', got '%s'", aiderAgent.GetID())
281+
}
282+
if aiderAgent.GetName() != "Aider" {
283+
t.Errorf("expected name 'Aider', got '%s'", aiderAgent.GetName())
284+
}
285+
if aiderAgent.GetType() != "aider" {
286+
t.Errorf("expected type 'aider', got '%s'", aiderAgent.GetType())
287+
}
288+
}
289+
259290
func TestAgentAnnouncement(t *testing.T) {
260291
tests := []struct {
261292
name string
@@ -270,6 +301,7 @@ func TestAgentAnnouncement(t *testing.T) {
270301
{"qwen", NewQwenAgent, "Qwen", "Qwen active!"},
271302
{"codex", NewCodexAgent, "Codex", "Codex ready!"},
272303
{"amp", NewAmpAgent, "Amp", "Amp is live!"},
304+
{"aider", NewAiderAgent, "Aider", "Aider in the house!"},
273305
}
274306

275307
for _, tt := range tests {
@@ -338,6 +370,7 @@ func TestAgentHealthCheckTimeout(t *testing.T) {
338370
{"qwen", NewQwenAgent()},
339371
{"codex", NewCodexAgent()},
340372
{"amp", NewAmpAgent()},
373+
{"aider", NewAiderAgent()},
341374
}
342375

343376
for _, tt := range agents {

0 commit comments

Comments
 (0)