Skip to content

AgentSkillRepository 能否按不同情况,加载不同的skill #1963

Open

Description

@luoshu-open

HarnessAgent 目前看文档改成无状态了,支持单例并发操作。但是 AgentSkillRepository 能不能改一下,让它的API能够感知到一些传入的参数,比如我要根据用户来加载不同的skill, 如果不能感知到用户,那所有的用户的skill都是一样的

Activity

  1. xyzcoconut commented on Jun 29, 2026

    @xyzcoconut

    目前还是不行。只能自定义skill middleware替代默认的system prompts自己注进入,接口层面没有暴露runtimecontext给到skill repository。如果使用filter,那是后置过滤了,不适合技能市场。

    另外虽然官方说已经实现了无状态,但是实际上内部还有很多设计有bug,会出现串session、串用户的情况。
    目前不适合生产。

  2. liuyh09 commented on Jun 30, 2026

    @liuyh09

    我是自定义实现AgentSkillRepository,可以自己根据业务传入参数。

  3. amyaxy commented on Jul 2, 2026

    @amyaxy
    Contributor

    HarnessAgent 目前看文档改成无状态了,支持单例并发操作。但是 AgentSkillRepository 能不能改一下,让它的API能够感知到一些传入的参数,比如我要根据用户来加载不同的skill, 如果不能感知到用户,那所有的用户的skill都是一样的

    如果是 HarnessAgent 在初始化时,默认的skills是已知的,只不过是让用户选择启用的话
    那么可以使用 Skill + ToolGroup:按需披露工具 方式实现的

    Image
  4. TianyuGeek001 commented on Jul 16, 2026

    @TianyuGeek001

    目前是不行的,底层的技能库表结构都没有设计字段来区分
    CREATE TABLE IF NOT EXISTS agentscope_skills (
    id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL UNIQUE,
    description TEXT NOT NULL,
    skill_content LONGTEXT NOT NULL,
    source VARCHAR(255) NOT NULL,
    metadata_json LONGTEXT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    所以默认是全局加载了,这样对于云端就不太容易实现多智能体平台,希望后续能增加吧。

  5. self-assigned this
    on Oct 8, 2026
  6. moved this from Backlog to In progress in AgentScope Javaon Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/core/toolTool, skill, RAG abstractionsquestionFurther information is requested

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions