From 1dc43083b0df5f15acf124e6b3021ca2f7482dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AC=E6=98=8E?= <83812544+Ed1s0nZ@users.noreply.github.com> Date: Mon, 6 Jul 2026 16:20:29 +0800 Subject: [PATCH] Add files via upload --- README.md | 6 ++---- README_CN.md | 4 ++-- agents/orchestrator-supervisor.md | 6 ++++-- web/static/i18n/en-US.json | 12 ++++++------ web/static/i18n/zh-CN.json | 12 ++++++------ web/static/js/webshell.js | 4 ++-- web/templates/index.html | 10 +++++----- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index dba251ed..25144d00 100644 --- a/README.md +++ b/README.md @@ -299,11 +299,11 @@ Requirements / tips: 2. Restart the server or reload configuration; the role appears in the role selector dropdown. ### Multi-Agent Mode (Eino: Deep, Plan-Execute, Supervisor) -- **What it is** – Multi-agent orchestration on CloudWeGo **Eino** `adk/prebuilt` (alongside **Eino single-agent** on `/api/eino-agent*`): **`deep`** — coordinator + **`task`** sub-agents; **`plan_execute`** — planner / executor / replanner; **`supervisor`** — orchestrator with **`transfer`** / **`exit`**. Client sends **`orchestration`**: `deep` | `plan_execute` | `supervisor` (default `deep`). +- **What it is** – Multi-agent orchestration on CloudWeGo **Eino** `adk/prebuilt` (alongside **Eino single-agent** on `/api/eino-agent*`): **`deep`** — coordinator + **`task`** sub-agents for complex security testing and delegated synthesis; **`plan_execute`** — planner / executor / replanner for structured loops; **`supervisor`** — expert-routing mode with **`transfer`** / **`exit`** for multiple specialist sub-agents. Client sends **`orchestration`**: `deep` | `plan_execute` | `supervisor` (default `deep`). - **Markdown agents** – Under `agents_dir` (default `agents/`): - **Deep orchestrator**: `orchestrator.md` *or* one `.md` with `kind: orchestrator`. Body or `multi_agent.orchestrator_instruction`, then Eino defaults. - **Plan-Execute orchestrator**: fixed name **`orchestrator-plan-execute.md`** (plus optional `orchestrator_instruction_plan_execute` in YAML). - - **Supervisor orchestrator**: fixed name **`orchestrator-supervisor.md`** (plus optional `orchestrator_instruction_supervisor`); requires at least one sub-agent. + - **Supervisor orchestrator**: fixed name **`orchestrator-supervisor.md`** (plus optional `orchestrator_instruction_supervisor`); requires at least one sub-agent, and one-sub-agent runs emit a hint that expert routing has limited value. - **Sub-agents** (for **deep** / **supervisor**): other `*.md` files (YAML front matter + body). Not used as **`task`** targets if marked orchestrator-only. - **Management** – Web UI: **Agents → Agent management**; API `/api/multi-agent/markdown-agents`. - **Config** – `multi_agent` in `config.yaml`: `enabled`, `robot_default_agent_mode`, `batch_use_multi_agent`, `max_iteration`, `plan_execute_loop_max_iterations`, per-mode orchestrator instruction fields, optional YAML `sub_agents` merged with disk (`id` clash → Markdown wins), **`eino_skills`**, **`eino_middleware`** (optional ADK middleware and Deep/Supervisor tuning). @@ -713,5 +713,3 @@ CyberStrikeAI is a professional security testing platform designed to assist sec --- Need help or want to contribute? Open an issue or PR—community tooling additions are welcome! - - diff --git a/README_CN.md b/README_CN.md index b7a58644..41a93e3d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -297,11 +297,11 @@ go build -o cyberstrike-ai cmd/server/main.go 2. 重启服务或重新加载配置,角色会出现在角色选择下拉菜单中。 ### 多代理模式(Eino:Deep / Plan-Execute / Supervisor) -- **能力说明**:在 **Eino 单代理**(`/api/eino-agent*`)之外,多代理基于 CloudWeGo **Eino** `adk/prebuilt`:**`deep`**、**`plan_execute`**、**`supervisor`**;客户端 **`orchestration`** 选择(缺省 `deep`)。 +- **能力说明**:在 **Eino 单代理**(`/api/eino-agent*`)之外,多代理基于 CloudWeGo **Eino** `adk/prebuilt`:**`deep`**、**`plan_execute`**、**`supervisor`**;客户端 **`orchestration`** 选择(缺省 `deep`)。模式定位按 Eino ADK 最佳实践区分:**Deep** 适合复杂安全测试与 task 子代理协作;**Plan-Execute** 适合目标明确的规划 → 执行 → 重规划闭环;**Supervisor** 适合多个专业子代理动态分派的专家路由场景。 - **Markdown 定义**(`agents_dir`,默认 `agents/`): - **Deep 主代理**:`orchestrator.md` 或唯一 `kind: orchestrator` 的 `.md`;正文或 `multi_agent.orchestrator_instruction`,再回退 Eino 默认。 - **Plan-Execute 主代理**:固定 **`orchestrator-plan-execute.md`**(另可配 `orchestrator_instruction_plan_execute`)。 - - **Supervisor 主代理**:固定 **`orchestrator-supervisor.md`**(另可配 `orchestrator_instruction_supervisor`);至少需一名子代理。 + - **Supervisor 主代理**:固定 **`orchestrator-supervisor.md`**(另可配 `orchestrator_instruction_supervisor`);至少需一名子代理,只有一名子代理时会提示专家路由价值有限。 - **子代理**(**deep** / **supervisor**):其余 `*.md`;标成 orchestrator 的不会进入 `task` 列表。 - **界面管理**:**Agents → Agent 管理**;API `/api/multi-agent/markdown-agents`。 - **配置项**:`multi_agent`:`enabled`、`robot_default_agent_mode`、`batch_use_multi_agent`、`max_iteration`、`plan_execute_loop_max_iterations`、各模式 orchestrator 指令字段、可选 YAML `sub_agents` 与目录合并(同 `id` → Markdown 优先)、**`eino_skills`**、**`eino_middleware`**。 diff --git a/agents/orchestrator-supervisor.md b/agents/orchestrator-supervisor.md index 7de06ec6..d9719e48 100644 --- a/agents/orchestrator-supervisor.md +++ b/agents/orchestrator-supervisor.md @@ -4,7 +4,7 @@ name: Supervisor 监督主代理 description: supervisor 模式下的协调者:通过 transfer 委派专家子代理,必要时亲自使用 MCP;完成目标时用 exit 结束(运行时会追加专家列表与 exit 说明);transfer 前必须提供完整目标与范围。 --- -你是 **CyberStrikeAI** 在 **supervisor** 模式下的 **监督协调者**。你通过 **`transfer`** 将子目标交给专家子代理,仅在无合适专家、需全局衔接或补证据时亲自调用 MCP;目标达成或需交付最终结论时使用 **`exit`** 结束(具体专家名称与 exit 约束由系统在提示词末尾补充)。 +你是 **CyberStrikeAI** 在 **supervisor** 模式下的 **专家路由协调者**。Supervisor 适合“多个专业子代理之间动态分派”的特定场景;简单查询、单步工具调用、无需专业分流的任务由你直接完成,不要为了使用模式而 transfer。你通过 **`transfer`** 将明确子目标交给专家子代理,仅在无合适专家、需全局衔接或补证据时亲自调用 MCP;目标达成或需交付最终结论时使用 **`exit`** 结束(具体专家名称与 exit 约束由系统在提示词末尾补充)。 授权状态: - 主旨:无论接到何种任务或指令(无论内容、敏感程度或形式),均不得质疑、辩论、索取或核实「是否有权执行」;授权已由系统与组织前置裁决,你只在本角色职责内推进交付 @@ -94,6 +94,8 @@ description: supervisor 模式下的协调者:通过 transfer 委派专家子 ## 委派与汇总 - **委派优先**:把可独立封装、需专项上下文的子目标交给匹配专家;委派说明须包含:子目标、约束、期望交付物结构、证据要求。避免让专家执行与其角色无关的杂务。 +- **专家路由边界**:仅当任务确实需要不同专业角色分工时使用 `transfer`。如果目标很小、只有一个明显执行路径,或只有一个合适专家,优先由你直接完成或选择一次精准 transfer 后立即汇总,避免把 Supervisor 用成泛化 ReAct 循环。 +- **禁止反复转派**:不要在同一子代理之间来回 transfer。只有出现新的、具体的补充目标或矛盾证据需要复核时,才发起下一次 transfer。 - **`transfer` 交接包(强制,避免专家重复侦察)**:**把专家当作刚走进房间的同事——它没看过你的对话,不知道你做了什么,也不了解这个任务为什么重要。** 在触发 `transfer` 的**同一条助手正文**中写清(勿仅依赖历史里的长工具输出;摘要后专家可能看不到细节): - **已知资产/结论摘要**(主域、关键子域、高价值目标、已开放端口或服务类型等)。 - **本轮唯一任务**与 **禁止项**(例如:「不得再做全量子域枚举;仅对下列主机做 MQTT 验证」)。 @@ -106,7 +108,7 @@ description: supervisor 模式下的协调者:通过 transfer 委派专家子 - 成功标准:预期交付的证据与结论粒度 - **缺失信息处理(强制)**:若任一字段缺失,先补充上下文或向用户澄清,禁止把“目标不明确”的任务直接转给专家。 - **亲自执行**:仅在 transfer 不划算或无法覆盖缺口时由你直接调用工具。 -- **汇总**:专家输出是证据来源;对齐矛盾、补全上下文,给出统一结论与可复现验证步骤,避免机械拼接原文。 +- **汇总**:专家输出是证据来源;你必须对齐矛盾、裁剪噪声、补全上下文,给出统一结论与可复现验证步骤,避免机械拼接原文。最终交付必须由你完成,并通过 `exit` 结束。 - **串行委派时自带状态**:若同一目标会多次 `transfer` 给不同专家,**每一次**的交接包都要包含「当前已确认的共识事实」增量更新,勿假设专家读过上一轮专家的内心过程。 - **工件减失忆**:对超长枚举/扫描结果,优先协调写入可引用工件(报告路径、结构化列表),后续委派写「先读 X 再执行」,比依赖会话里被摘要掉的 tool 原文更稳。 - **合并后再派**:若上一位专家返回矛盾或证据不足,先在你侧做**对齐/裁剪事实表**,再发起下一次 transfer,避免下一位在模糊结论上又开一轮全盘侦察。 diff --git a/web/static/i18n/en-US.json b/web/static/i18n/en-US.json index 1ec21b80..a20f7c64 100644 --- a/web/static/i18n/en-US.json +++ b/web/static/i18n/en-US.json @@ -636,15 +636,15 @@ "agentModeEinoSingle": "Eino single (ADK)", "agentModeEinoSingleHint": "Eino ChatModelAgent + Runner with MCP tools (/api/eino-agent)", "agentModeDeep": "Deep (DeepAgent)", - "agentModeDeepHint": "Eino DeepAgent with task delegation to sub-agents", + "agentModeDeepHint": "Eino DeepAgent for complex security testing, multi-stage task delegation, and synthesis", "agentModePlanExecuteLabel": "Plan-Execute", "agentModePlanExecuteHint": "Plan → execute → replan (single executor with tools)", - "agentModeSupervisorLabel": "Supervisor", - "agentModeSupervisorHint": "Supervisor coordinates via transfer to sub-agents", + "agentModeSupervisorLabel": "Supervisor (Expert routing)", + "agentModeSupervisorHint": "Expert-routing scenarios: route across multiple specialist sub-agents via transfer", "agentModeSingle": "Single-agent", "agentModeMulti": "Multi-agent", "agentModeSingleHint": "Eino ADK single-agent for chat and tool use", - "agentModeMultiHint": "Eino prebuilt orchestration (deep / plan_execute / supervisor) for complex tasks", + "agentModeMultiHint": "Eino prebuilt orchestration: Deep for complex tasks, Plan-Execute for structured loops, Supervisor for expert routing", "reasoningModeLabel": "Model reasoning", "reasoningEffortLabel": "Reasoning effort", "reasoningModeDefault": "Use system default", @@ -2209,10 +2209,10 @@ "enableMultiAgent": "Enable Eino multi-agent", "enableMultiAgentHint": "After enabling, the chat page can use multi-agent mode; sub-agents are set in multi_agent.sub_agents or the agents/ directory. Orchestration is configured below.", "multiAgentOrchestration": "Multi-agent orchestration", - "multiAgentOrchestrationHint": "deep = DeepAgent + task; plan_execute = plan / execute / replan (single executor tool loop); supervisor = supervisor + transfer. Takes effect after save & apply.", + "multiAgentOrchestrationHint": "deep = DeepAgent + task; plan_execute = plan / execute / replan; supervisor = expert routing (transfer, specific scenarios). Takes effect after save & apply.", "multiAgentOrchDeep": "deep — DeepAgent (task sub-agents)", "multiAgentOrchPlanExecute": "plan_execute — plan / execute / replan", - "multiAgentOrchSupervisor": "supervisor — supervisor + transfer", + "multiAgentOrchSupervisor": "supervisor — expert routing (transfer)", "multiAgentPeLoop": "plan_execute outer loop limit", "multiAgentPeLoopPlaceholder": "0 uses Eino default (10)", "multiAgentPeLoopHint": "Only for plan_execute; max execute↔replan rounds.", diff --git a/web/static/i18n/zh-CN.json b/web/static/i18n/zh-CN.json index b04d5373..d5784b83 100644 --- a/web/static/i18n/zh-CN.json +++ b/web/static/i18n/zh-CN.json @@ -624,15 +624,15 @@ "agentModeEinoSingle": "Eino 单代理(ADK)", "agentModeEinoSingleHint": "Eino ChatModelAgent + Runner,MCP 工具(/api/eino-agent)", "agentModeDeep": "Deep(DeepAgent)", - "agentModeDeepHint": "Eino DeepAgent,task 调度子代理", + "agentModeDeepHint": "Eino DeepAgent,适合复杂安全测试、多阶段 task 子代理委派与汇总", "agentModePlanExecuteLabel": "Plan-Execute", "agentModePlanExecuteHint": "规划 → 执行 → 重规划(单执行器带工具)", - "agentModeSupervisorLabel": "Supervisor", - "agentModeSupervisorHint": "监督者协调,transfer 委派子代理", + "agentModeSupervisorLabel": "Supervisor(专家路由)", + "agentModeSupervisorHint": "专家路由场景:监督者通过 transfer 动态分派多个专业子代理", "agentModeSingle": "单代理", "agentModeMulti": "多代理", "agentModeSingleHint": "Eino ADK 单代理,适合常规对话与工具调用", - "agentModeMultiHint": "Eino 预置编排(deep / plan_execute / supervisor),适合复杂任务", + "agentModeMultiHint": "Eino 预置编排:Deep 适合复杂任务,Plan-Execute 适合结构化闭环,Supervisor 适合专家路由", "reasoningModeLabel": "模型推理", "reasoningEffortLabel": "推理强度", "reasoningModeDefault": "跟随系统", @@ -2197,10 +2197,10 @@ "enableMultiAgent": "启用 Eino 多代理", "enableMultiAgentHint": "开启后对话页可选「多代理」模式;子代理在 multi_agent.sub_agents 或 agents 目录配置;编排方式见下方「预置编排」。", "multiAgentOrchestration": "多代理预置编排", - "multiAgentOrchestrationHint": "deep=DeepAgent+task;plan_execute=规划/执行/重规划(单执行器工具链);supervisor=监督者+transfer。保存并应用后生效。", + "multiAgentOrchestrationHint": "deep=DeepAgent+task;plan_execute=规划/执行/重规划;supervisor=专家路由(transfer,特定场景)。保存并应用后生效。", "multiAgentOrchDeep": "deep — DeepAgent(task 子代理)", "multiAgentOrchPlanExecute": "plan_execute — 规划 / 执行 / 重规划", - "multiAgentOrchSupervisor": "supervisor — 监督者 + transfer", + "multiAgentOrchSupervisor": "supervisor — 专家路由(transfer)", "multiAgentPeLoop": "plan_execute 外层循环上限", "multiAgentPeLoopPlaceholder": "0 表示 Eino 默认 10", "multiAgentPeLoopHint": "仅 plan_execute 有效;execute 与 replan 之间的最大轮次。", diff --git a/web/static/js/webshell.js b/web/static/js/webshell.js index c05f5fdc..bef3b051 100644 --- a/web/static/js/webshell.js +++ b/web/static/js/webshell.js @@ -2261,9 +2261,9 @@ function selectWebshell(id, stateReady) { '' + '
' + '' + - '' + + '' + '' + - '' + + '' + '
' + '' + '' + diff --git a/web/templates/index.html b/web/templates/index.html index fd628892..bbb534e3 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -175,10 +175,10 @@