Skip to content

A logical conflict between the meta tool and Plannote during React agent initialization. #974

@Libertax-coder

Description

@Libertax-coder

When plan_notebook is not None but enable_meta_tool=False, reset_equipped_tools will be enabled. However, in the subsequent if plan_notebook: block, since enable_meta_tool=False, the "plan_related" tool group won't be created, making the earlier enabling of reset_equipped_tools meaningless.
Furthermore, when a user passes enable_meta_tool=False, they explicitly don't want the agent to autonomously manage tools. If the code needs to enable reset_equipped_tools due to certain factors, it should at least inform the user that reset_equipped_tools has been enabled and that the agent will now manage tool groups autonomously.

    if enable_meta_tool or plan_notebook:
        self.toolkit.register_tool_function(
            self.toolkit.reset_equipped_tools,
        )

    self.parallel_tool_calls = parallel_tool_calls

    # -------------- RAG management --------------
    # The knowledge base(s) used by the agent
    if isinstance(knowledge, KnowledgeBase):
        knowledge = [knowledge]
    self.knowledge: list[KnowledgeBase] = knowledge or []
    self.enable_rewrite_query = enable_rewrite_query

    # -------------- Plan management --------------
    # Equipped the plan-related tools provided by the plan notebook as
    # a tool group named "plan_related". So that the agent can activate
    # the plan tools by the meta tool function
    self.plan_notebook = None
    if plan_notebook:
        self.plan_notebook = plan_notebook
        # When enable_meta_tool is True, plan tools are in plan_related
        # group and active by agent.
        # Otherwise, plan tools in bassic group and always active.
        if enable_meta_tool:
            self.toolkit.create_tool_group(
                "plan_related",
                description=self.plan_notebook.description,
            )
            for tool in plan_notebook.list_tools():
                self.toolkit.register_tool_function(
                    tool,
                    group_name="plan_related",
                )
        else:
            for tool in plan_notebook.list_tools():
                self.toolkit.register_tool_function(
                    tool,
                )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions