Skip to content

请问是不是一个skill只能在一个ReActAgent里? #979

Description

@czhcc

看代码是一个skill注册在一个SkillBox里,然后这个SkillBox注册在ReActAgent里

Activity

  1. chensk0601 commented on Mar 17, 2026

    @chensk0601
    Contributor

    不是,他可以在多个Agent下使用。

  2. lfz757077613 commented on Mar 18, 2026

    @lfz757077613

    是的,这里有并发问题,所以不能并发用,toolkit也要每次新建一个。我也觉得agentscope的这种设计不好,agent/toolkit/skillbox/memory每次发起请求都要新建

    Image
  3. fang-tech commented on Mar 18, 2026

    @fang-tech
    Collaborator

    是的,这里有并发问题,所以不能并发用,toolbox也要每次新建一个。我也觉得agentscope的这种设计不好,agent/toolkit/skillbox/memory每次发起请求都要新建

    This design itself is intended to ensure that the agent is stateless. Thus, each user request loads the state from the outside, which is a beneficial design for containerization scenarios.

  4. fang-tech commented on Mar 18, 2026

    @fang-tech
    Collaborator

    看代码是一个skill注册在一个SkillBox里,然后这个SkillBox注册在ReActAgent里

    The skill class is reusable. It is a final class that is thread-safe and can be registered simultaneously in multiple ReactAgents. However, it is recommended that a skillBox be placed within only one ReactAgent.

  5. lfz757077613 commented on Mar 18, 2026

    @lfz757077613

    看代码是一个skill注册在一个SkillBox里,然后这个SkillBox注册在ReActAgent里

    The skill class is reusable. It is a final class that is thread-safe and can be registered simultaneously in multiple ReactAgents. However, it is recommended that a skillBox be placed within only one ReactAgent.

    这不是明显有并发问题吗,一个skillbox怎么能复用在多个ReActAgent里呢?skillbox是线程安全的不代表可以在多个ReActAgent里复用,这里的toolkit是每个ReActAgent深copy出来的独立的新对象

    Image 比如一个线程要执行这个apply了,另一个线程新建的ReActAgent正好执行bindToolkit把skillbox的toolkit给换了,这个apply就会因为skill-build-in-tools group没创建而报错 Image
  6. fang-tech commented on Mar 18, 2026

    @fang-tech
    Collaborator

    At present, it is indeed necessary for you to create a new skillBox for each reactagent.

  7. fang-tech commented on Mar 18, 2026

    @fang-tech
    Collaborator

    I will simplify the setup here by using the same automatic copying method as the toolkit.

  8. added this to the 1.0.12 milestone on Apr 2, 2026
  9. removed this from the 1.0.12 milestone on Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/core/toolTool, skill, RAG abstractionsenhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions