Skip to content

How to use multiple tools during RL training? #62

Open

Description

@zwxandy

I notice that only one tool is allowed when invoking the tool. How can I use more than one tools during training, e.g., search and python. The LLM should decide which tool to use in each iteration itself.

def _default_tool(name):
    if name == "search":
        from agent_r1.tool.tools.search_tool import SearchTool
        return SearchTool()
    elif name == "wiki_search":
        from agent_r1.tool.tools.wiki_search_tool import WikiSearchTool
        return WikiSearchTool()
    elif name == "python":
        from agent_r1.tool.tools.python_tool import PythonTool
        return PythonTool()
    else:
        raise NotImplementedError(f"Tool {name} not implemented")

Activity

  1. 0russwest0 commented on Aug 5, 2025

    @0russwest0
    Collaborator

    _default_tool here is just for registering the tool. You can configure multiple tools through the tool.tools parameter, for example: tool.tools=['search','python'].

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions