Skip to content

Commit c1fa8d5

Browse files
committed
feat(agents): register new agents in index and types
- Export Metis, Momus, orchestrator-sisyphus in builtinAgents - Add new agent names to BuiltinAgentName type - Update AGENTS.md documentation with new agents 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
1 parent 059aa87 commit c1fa8d5

File tree

3 files changed

+68
-32
lines changed

3 files changed

+68
-32
lines changed

src/agents/AGENTS.md

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
## OVERVIEW
44

5-
7 AI agents for multi-model orchestration. Sisyphus orchestrates, specialists handle domains.
5+
AI agent definitions for multi-model orchestration. 7 specialized agents: Sisyphus (orchestrator), oracle (strategy), librarian (research), explore (grep), frontend-ui-ux-engineer, document-writer, multimodal-looker.
66

77
## STRUCTURE
88

99
```
1010
agents/
11-
├── sisyphus.ts # Primary orchestrator (504 lines)
12-
├── oracle.ts # Strategic advisor
13-
├── librarian.ts # Multi-repo research
14-
├── explore.ts # Fast codebase grep
15-
├── frontend-ui-ux-engineer.ts # UI generation
16-
├── document-writer.ts # Technical docs
17-
├── multimodal-looker.ts # PDF/image analysis
18-
├── sisyphus-prompt-builder.ts # Sisyphus prompt construction
11+
├── sisyphus.ts # Primary orchestrator (Claude Opus 4.5)
12+
├── oracle.ts # Strategic advisor (GPT-5.2)
13+
├── librarian.ts # Multi-repo research (Claude Sonnet 4.5)
14+
├── explore.ts # Fast codebase grep (Grok Code)
15+
├── frontend-ui-ux-engineer.ts # UI generation (Gemini 3 Pro)
16+
├── document-writer.ts # Technical docs (Gemini 3 Flash)
17+
├── multimodal-looker.ts # PDF/image analysis (Gemini 3 Flash)
1918
├── build-prompt.ts # Shared build agent prompt
2019
├── plan-prompt.ts # Shared plan agent prompt
2120
├── types.ts # AgentModelConfig interface
@@ -25,40 +24,68 @@ agents/
2524

2625
## AGENT MODELS
2726

28-
| Agent | Model | Fallback | Purpose |
29-
|-------|-------|----------|---------|
30-
| Sisyphus | anthropic/claude-opus-4-5 | - | Orchestrator with extended thinking |
31-
| oracle | openai/gpt-5.2 | - | Architecture, debugging, review |
32-
| librarian | anthropic/claude-sonnet-4-5 | google/gemini-3-flash | Docs, GitHub research |
33-
| explore | opencode/grok-code | gemini-3-flash, haiku-4-5 | Contextual grep |
34-
| frontend-ui-ux-engineer | google/gemini-3-pro-preview | - | Beautiful UI code |
27+
| Agent | Default Model | Fallback | Purpose |
28+
|-------|---------------|----------|---------|
29+
| Sisyphus | anthropic/claude-opus-4-5 | - | Primary orchestrator with extended thinking |
30+
| oracle | openai/gpt-5.2 | - | Architecture, debugging, code review |
31+
| librarian | anthropic/claude-sonnet-4-5 | google/gemini-3-flash | Docs, OSS research, GitHub examples |
32+
| explore | opencode/grok-code | google/gemini-3-flash, anthropic/claude-haiku-4-5 | Fast contextual grep |
33+
| frontend-ui-ux-engineer | google/gemini-3-pro-preview | - | UI/UX code generation |
3534
| document-writer | google/gemini-3-pro-preview | - | Technical writing |
36-
| multimodal-looker | google/gemini-3-flash | - | Visual analysis |
35+
| multimodal-looker | google/gemini-3-flash | - | PDF/image analysis |
3736

38-
## HOW TO ADD
37+
## HOW TO ADD AN AGENT
3938

4039
1. Create `src/agents/my-agent.ts`:
4140
```typescript
41+
import type { AgentConfig } from "@opencode-ai/sdk"
42+
4243
export const myAgent: AgentConfig = {
4344
model: "provider/model-name",
4445
temperature: 0.1,
45-
system: "...",
46-
tools: { include: ["tool1"] },
46+
system: "Agent system prompt...",
47+
tools: { include: ["tool1", "tool2"] }, // or exclude: [...]
4748
}
4849
```
49-
2. Add to `builtinAgents` in index.ts
50-
3. Update types.ts if new config options
50+
2. Add to `builtinAgents` in `src/agents/index.ts`
51+
3. Update `types.ts` if adding new config options
5152

52-
## MODEL FALLBACK
53+
## AGENT CONFIG OPTIONS
5354

54-
`createBuiltinAgents()` handles fallback:
55-
1. User config override
56-
2. Installer settings (claude max20, gemini antigravity)
57-
3. Default model
55+
| Option | Type | Description |
56+
|--------|------|-------------|
57+
| model | string | Model identifier (provider/model-name) |
58+
| temperature | number | 0.0-1.0, most use 0.1 for consistency |
59+
| system | string | System prompt (can be multiline template literal) |
60+
| tools | object | `{ include: [...] }` or `{ exclude: [...] }` |
61+
| top_p | number | Optional nucleus sampling |
62+
| maxTokens | number | Optional max output tokens |
5863

59-
## ANTI-PATTERNS
64+
## MODEL FALLBACK LOGIC
6065

61-
- High temperature (>0.3) for code agents
62-
- Broad tool access (prefer explicit `include`)
63-
- Monolithic prompts (delegate to specialists)
64-
- Missing fallbacks for rate-limited models
66+
`createBuiltinAgents()` in utils.ts handles model fallback:
67+
68+
1. Check user config override (`agents.{name}.model`)
69+
2. Check installer settings (claude max20, gemini antigravity)
70+
3. Use default model
71+
72+
**Fallback order for explore**:
73+
- If gemini antigravity enabled → `google/gemini-3-flash`
74+
- If claude max20 enabled → `anthropic/claude-haiku-4-5`
75+
- Default → `opencode/grok-code` (free)
76+
77+
## ANTI-PATTERNS (AGENTS)
78+
79+
- **High temperature**: Don't use >0.3 for code-related agents
80+
- **Broad tool access**: Prefer explicit `include` over unrestricted access
81+
- **Monolithic prompts**: Keep prompts focused; delegate to specialized agents
82+
- **Missing fallbacks**: Consider free/cheap fallbacks for rate-limited models
83+
84+
## SHARED PROMPTS
85+
86+
- **build-prompt.ts**: Base prompt for build agents (OpenCode default + Sisyphus variants)
87+
- **plan-prompt.ts**: Base prompt for plan agents (legacy)
88+
- **prometheus-prompt.ts**: System prompt for Prometheus (Planner) agent
89+
- **metis.ts**: Metis (Plan Consultant) agent for pre-planning analysis
90+
91+
Used by `src/index.ts` when creating Builder-Sisyphus and Prometheus (Planner) variants.

src/agents/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { exploreAgent } from "./explore"
66
import { frontendUiUxEngineerAgent } from "./frontend-ui-ux-engineer"
77
import { documentWriterAgent } from "./document-writer"
88
import { multimodalLookerAgent } from "./multimodal-looker"
9+
import { metisAgent } from "./metis"
10+
import { orchestratorSisyphusAgent } from "./orchestrator-sisyphus"
11+
import { momusAgent } from "./momus"
912

1013
export const builtinAgents: Record<string, AgentConfig> = {
1114
Sisyphus: sisyphusAgent,
@@ -15,6 +18,9 @@ export const builtinAgents: Record<string, AgentConfig> = {
1518
"frontend-ui-ux-engineer": frontendUiUxEngineerAgent,
1619
"document-writer": documentWriterAgent,
1720
"multimodal-looker": multimodalLookerAgent,
21+
"Metis (Plan Consultant)": metisAgent,
22+
"Momus (Plan Reviewer)": momusAgent,
23+
"orchestrator-sisyphus": orchestratorSisyphusAgent,
1824
}
1925

2026
export * from "./types"

src/agents/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export type BuiltinAgentName =
6464
| "frontend-ui-ux-engineer"
6565
| "document-writer"
6666
| "multimodal-looker"
67+
| "Metis (Plan Consultant)"
68+
| "Momus (Plan Reviewer)"
69+
| "orchestrator-sisyphus"
6770

6871
export type OverridableAgentName =
6972
| "build"

0 commit comments

Comments
 (0)