Oh My OpenCode 核心 Agent 与调用指南¶
状态: ✅ 已完成
创建日期: 2026-02-22
最后更新: 2026-02-22
📅 日历事件¶
| 事件名称 | 开始 | 结束 | 地点 | 日历 | 备注 |
|---|---|---|---|---|---|
| - | - | - | - | - | - |
日历状态说明: ✅=已加入 / 📄=仅文档
调研范围¶
基于官方文档整理以下问题:
- 核心 4 个主 Agent(Sisyphus、Hephaestus、Prometheus、Atlas)的目的
- 实操使用技巧(何时用、怎么用)
- 其他附加 Agent/模型的作用与直接调用方式
- Tmux 是什么,以及在 Oh My OpenCode 中的用途
核心 4 个主 Agent¶
| Agent | 核心目的 | 适用场景 | 快速调用 |
|---|---|---|---|
| Sisyphus - Ultraworker | 默认总编排器;做任务分解、并行委派、推进到完成 | 日常开发主流程、跨模块任务、需要持续推进的工作 | 直接正常对话即可(默认 orchestrator) |
| Hephaestus - Deep Agent | 自主深度执行者(goal-oriented);强调先研究后行动、端到端完成 | 复杂改造、跨文件修复、需要强执行闭环的任务 | 切换到 Hephaestus 模式后给“目标”而非“步骤” |
| Prometheus - Plan Builder | 规划代理(访谈式澄清需求并输出计划) | 需求不清、变更风险大、要先出执行计划 | Tab 进入规划模式,或 @plan "任务描述" |
| Atlas - Plan Executor | 计划执行编排器;按 todo/work plan 调度并验证 | 已有 Prometheus 计划,要系统化执行 | /start-work |
实操技巧(重点)¶
- 先分流再执行:范围大/不确定时先走 Prometheus,避免直接写代码返工。
- 计划执行分离:Prometheus 负责“想清楚”,Atlas 负责“做到底”,比单轮对话更稳。
- Hephaestus 适合“目标驱动”:给验收标准(输出文件、测试结果、约束),不要给过细手工步骤。
- Sisyphus 适合“多代理并行”:当你需要同时查文档、查代码、实现与验证时,交给它统一编排。
- 关键变更前置验证:把
lsp_diagnostics、测试、build 作为完成标准写进提示词,减少半成品输出。
其他附加 Agent / 模型的作用¶
常用附加 Agent¶
| Agent | 作用 | 常见时机 |
|---|---|---|
| Oracle | 只读高质量顾问,擅长架构取舍与复杂调试建议 | 重大设计决策、2 次以上修复失败后 |
| Librarian | 外部文档/多仓实现检索 | 不熟悉库、需要官方 API 证据 |
| Explore | 快速代码库结构探索与模式查找 | 新仓接手、定位实现入口 |
| Metis | 计划前风险扫描(找遗漏与歧义) | 复杂需求澄清前 |
| Momus | 计划审稿(清晰性/可验证性/完整性) | 计划执行前质量闸门 |
| Sisyphus-Junior | 按 category 生成的执行代理,防止无限递归委派 | task(category=...) 时自动出现 |
| Multimodal-Looker | 图像/PDF/截图理解 | 视觉材料抽取、UI 截图分析 |
模型与类别(Category)关系¶
Oh My OpenCode 倾向于“按任务类型选模型”,而不是每次手选模型:
visual-engineering:前端视觉任务(常映射到 Gemini 族)ultrabrain/deep:深度推理与复杂实现(常映射到 GPT-5.3-codex 或高推理模型)quick:低成本快修(常映射到 Haiku 等轻量模型)writing:文档/写作任务
可在 oh-my-opencode.json 的 agents 与 categories 自定义模型映射与 fallback 链。
直接调用方式(可复制)¶
1) 直接点名 Agent(自然语言)¶
Ask @oracle to review this design and propose an architecture
Ask @librarian how this is implemented in official docs
Ask @explore to find auth-related implementations in this repo
2) 用 task 指定 subagent_type¶
task(
subagent_type="explore",
load_skills=[],
description="Find auth pattern",
prompt="Locate auth middleware and call chain",
run_in_background=true
)
3) 用 task 指定 category(让系统自动选模型)¶
task(
category="visual-engineering",
load_skills=["frontend-ui-ux"],
description="Implement UI",
prompt="Build responsive settings panel",
run_in_background=false
)
4) 规划-执行链路¶
Tmux 是什么?¶
Tmux(terminal multiplexer)是“终端复用器”:
- 允许你在一个终端里开多个会话/窗格(pane)
- 支持会话后台常驻(断开 SSH 后可重新 attach)
- 适合长任务、并行任务、远程开发
在 Oh My OpenCode 里,开启 tmux.enabled 后,后台代理可在独立 pane 实时显示执行过程,便于你并行观察多个 agent 的进度。
示例配置:
选型建议(简版)¶
- 需求模糊或项目大:
Prometheus -> Atlas。 - 问题复杂且你要“直接做完”:Hephaestus。
- 日常综合任务、希望自动多代理编排:Sisyphus。
- 高风险决策前,补一次 Oracle 审阅。
参考来源(官方)¶
- Features Reference(dev 分支): https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/docs/reference/features.md
- Overview(dev 分支): https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/dev/docs/guide/overview.md
说明:本文优先采用官方文档描述;不同版本可能调整默认模型映射与命令细节,落地前建议对照当前安装版本的
oh-my-opencode.json与 release notes。