Enum Class ToolMergeMode

java.lang.Object
java.lang.Enum<ToolMergeMode>
io.agentscope.core.agui.model.ToolMergeMode
All Implemented Interfaces:
Serializable, Comparable<ToolMergeMode>, Constable

public enum ToolMergeMode extends Enum<ToolMergeMode>
Enum defining how tools from the frontend should be merged with agent's toolkit.

The AG-UI protocol allows tools to be defined from the frontend. This enum determines how those frontend-provided tools interact with the agent's existing toolkit.

  • Enum Constant Details

    • FRONTEND_ONLY

      public static final ToolMergeMode FRONTEND_ONLY
      Use only tools provided from the frontend.

      The agent's existing toolkit is ignored completely. Only tools passed in RunAgentInput.getTools() will be available.

    • AGENT_ONLY

      public static final ToolMergeMode AGENT_ONLY
      Use only the agent's existing toolkit.

      Tools provided from the frontend are ignored. Only tools registered in the agent's toolkit will be available.

    • MERGE_FRONTEND_PRIORITY

      public static final ToolMergeMode MERGE_FRONTEND_PRIORITY
      Merge frontend tools with agent's toolkit, frontend takes priority.

      Both frontend tools and agent toolkit tools are available. If there are name conflicts, frontend tools override agent tools.

  • Method Details

    • values

      public static ToolMergeMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ToolMergeMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null