@mikasomaka/agent-team
v0.1.0
Published
轻量级多 Agent 协作 OpenCode 插件 — 7 个专业子 Agent + Goal 模式 (简称 OAT)
Maintainers
Readme
OAT — OpenCode Agent Team
轻量级多 Agent 协作插件,为 OpenCode 提供专业子 Agent的团队协作能力。
安装
// opencode.jsonc
{
"plugin": ["file:///D:/misutime/101-opencode/agent-team/dist/index.js"]
}插件首次加载时自动将 TUI 侧栏注册到 ~/.config/opencode/tui.json,无需手动操作。重启 opencode 后右侧栏即可看到 Agent Team 模型列表。
配置 Agent 模型
每个 Agent 都有默认模型,用户可在 opencode.jsonc 中覆盖:
{
"agent": {
"explore": {
"model": "google/gemini-3.5-flash"
},
"librarian": {
"model": "deepseek/deepseek-v4-pro"
}
}
}覆盖后的模型会同步显示在 TUI 右侧栏的 Agent Team 区域。
默认模型
| Agent | 模型 |
|-------|------|
| explore | deepseek/deepseek-v4-flash |
| librarian | deepseek/deepseek-v4-flash |
本地开发与测试
1. 构建
just build # 一次性构建 (index.ts + tui.ts)
just dev # watch 模式,文件变更自动重新构建2. 挂载插件
在测试项目的 opencode.jsonc 中添加插件路径(见上方"安装"),或在 ~/.config/opencode/opencode.jsonc 中全局注册。
3. 运行
opencode # Agent Team 插件自动加载常用命令
| 命令 | 说明 |
|------|------|
| just install | 安装依赖 |
| just build | 构建项目 |
| just dev | 开发模式(watch 构建) |
| just typecheck | TypeScript 类型检查 |
| just check | 完整检查(构建 + 类型检查) |
| just clean | 清理构建产物 |
项目结构
├── index.ts # 服务端插件入口(注册 agent/tool/hook)
├── tui.ts # TUI 插件入口(侧栏显示)
├── justfile # 常用命令
├── src/
│ ├── agents/ # Agent 定义(explore, librarian)
│ ├── agent-models.ts # 模型默认值 + 用户覆盖解析
│ └── tools/ # google-search 等工具
└── dist/ # 构建产物License
MIT
依赖的外部服务
插件本身依赖 Gemini API(用于 Google 搜索),其余搜索能力通过 OpenCode 主配置文件(~/.config/opencode/opencode.jsonc)中的 MCP 服务器提供。
插件内置
| 服务 | 用途 | 需要 API Key | 获取方式 |
|------|------|:---:|------|
| Google Gemini API | at_google_search 工具后端 | ✅ | Google AI Studio |
MCP 服务器(需在主配置中注册)
| MCP 名称 | 用途 | 需要 API Key | 获取方式 |
|----------|------|:---:|------|
| playwright | 浏览器自动化(网页交互/截图) | — | 本地 npx,自动安装 |
| github | GitHub 仓库操作(文件/Issue/PR) | ✅ PAT | GitHub Settings |
| grep_app | 全 GitHub 公开仓库代码搜索 | — | 免费 remote |
| context7 | 框架/库 API 文档搜索 | ✅ | context7.com |
| codegraph | 本地代码库 AST 知识图谱 | — | 本地 CLI(codegraph) |
| exa | AI 语义搜索 | ✅ | exa.ai |
| firecrawl | 网页抓取/爬取/结构化提取 | ✅ | firecrawl.dev |
| microsoft-learn | Azure/.NET/TS/PS 等微软官方文档 | — | 免费 remote |
