Skip to content

[Bug]:harnessAgent编排:业务Tool被HarnessAgent跳过子agent直接调用工具,设置工具组父不可见子可用无效 #1953

Description

@rogerlmj123

需求期望: Harness编排父不可调用业务Tool,子继承可直接使用; 避免编排LLM编排直接跳过子agent直接拿Tool

是否如下图分析:
https://java.agentscope.io/v2/zh/docs/building-blocks/tool.html#id8

设置代码端
toolkit.createToolGroup(
"business_tools",
"Business tools (hidden from parent LLM, inherited by sub-agents via tools: whitelist)",
true, // active=true
ToolGroupScope.EXTERNAL // EXTERNAL scope(父Agent不可见)
);

        for (Map.Entry<String, Object> entry : businessToolIndex.entrySet()) {
            Object bean = entry.getValue();
            toolkit.registration().tool(bean).group("business_tools").apply();
            toolkit.registerTool(bean);     // ★ 双注册:同时注册到 ungrouped 组,供子Agent tools: 白名单继承
            businessCount++;
        }
Image

==============另外: 文档描述和RC4版本不一致==========================

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions