Enum Class SubagentDeclaration.Mode

java.lang.Object
java.lang.Enum<SubagentDeclaration.Mode>
io.agentscope.harness.agent.subagent.SubagentDeclaration.Mode
All Implemented Interfaces:
Serializable, Comparable<SubagentDeclaration.Mode>, Constable
Enclosing class:
SubagentDeclaration

public static enum SubagentDeclaration.Mode extends Enum<SubagentDeclaration.Mode>
Whether a declaration can be used as a top-level primary agent, only as a delegated subagent, or both.

The DefaultAgentManager.createAgentIfPresent(java.lang.String, io.agentscope.core.agent.RuntimeContext) path rejects spawn requests for PRIMARY-only declarations so they can never be invoked as workers; conversely, top-level launchers may want to reject SUBAGENT declarations as entry points (current core does not own that check — top-level launch goes through HarnessAgent.builder() directly, not through a declaration).

  • Enum Constant Details

  • Method Details

    • values

      public static SubagentDeclaration.Mode[] 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 SubagentDeclaration.Mode 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