Class TopologySelector

java.lang.Object
com.tnsai.autoteam.TopologySelector

public final class TopologySelector extends Object
Analyzes inter-agent dependencies and selects the optimal coordination formation.

TopologySelector examines the dependency graph from a TeamPlan and determines the best coordination pattern. The selection considers:

  • Dependency depth (sequential chains suggest SEQUENTIAL)
  • Presence of a lead agent (suggests HIERARCHICAL)
  • Independent agents (suggests PARALLEL)
  • LLM's suggestion as a tiebreaker

Formation Selection Logic

ConditionFormation
1 agentPARALLEL (trivial)
Has lead + dependenciesHIERARCHICAL
Linear dependency chainSEQUENTIAL
No dependenciesPARALLEL
Since:
0.3.0
See Also:
  • Method Details

    • select

      public static String select(TeamPlan plan)
      Selects the optimal formation for the given team plan.
      Parameters:
      plan - the team plan with agents and dependencies
      Returns:
      the selected formation name (PARALLEL, SEQUENTIAL, or HIERARCHICAL)