Class SupervisorAgent


public class SupervisorAgent extends FlowAgent
  • Constructor Details

  • Method Details

    • builder

      public static SupervisorAgent.SupervisorAgentBuilder builder()
    • buildSpecificGraph

      protected StateGraph buildSpecificGraph(FlowGraphBuilder.FlowGraphConfig config) throws GraphStateException
      Description copied from class: FlowAgent
      Abstract method for subclasses to specify their graph building strategy. This method should be implemented by concrete FlowAgent subclasses to define how their specific graph structure should be built.
      Specified by:
      buildSpecificGraph in class FlowAgent
      Parameters:
      config - the graph configuration
      Returns:
      the constructed StateGraph
      Throws:
      GraphStateException - if graph construction fails
    • getSystemPrompt

      public String getSystemPrompt()
    • getInstruction

      public String getInstruction()
    • getMainAgent

      public ReactAgent getMainAgent()
      Returns the main agent (ReactAgent) that produces routing decisions. The supervisor uses this agent's output to decide which sub-agents to invoke or to finish.
      Returns:
      the main agent instance