Interface GroupDecisionFramework

All Known Implementing Classes:
DefaultGroupDecisionFramework

public interface GroupDecisionFramework
Framework for group-level decision-making with propose, vote, and converge phases.

Provides a structured protocol for agents within an AgentGroup to reach consensus on decisions. Supports pluggable consensus algorithms via VotingMethod.

Decision Pipeline

  1. Propose — Create a DecisionProposal with topic and options
  2. Vote — Collect votes from group members
  3. Converge — Tally votes, determine outcome, sync beliefs

Usage


 GroupDecisionFramework framework = new DefaultGroupDecisionFramework(traceStore);
 DecisionProposal proposal = DecisionProposal.of("Which database?",
     List.of("PostgreSQL", "MySQL", "MongoDB"));
 DecisionResult result = framework.makeDecision(group, proposal);
 
See Also:
  • Method Details

    • propose

      DecisionProposal propose(String topic, List<String> options, VotingMethod method)
      Creates a decision proposal.
      Parameters:
      topic - the question to decide
      options - available choices (at least 2)
      method - consensus algorithm
      Returns:
      a new proposal
    • vote

      List<Vote> vote(com.tnsai.agents.groups.AgentGroup group, DecisionProposal proposal)
      Collects votes from all group members on a proposal.
      Parameters:
      group - the agent group whose members will vote
      proposal - the proposal to vote on
      Returns:
      collected votes
    • converge

      DecisionResult converge(com.tnsai.agents.groups.AgentGroup group, List<Vote> votes, DecisionProposal proposal)
      Tallies votes, determines outcome, saves trace, and broadcasts result. If no consensus is reached and a leader exists, falls back to leader decision.
      Parameters:
      group - the agent group (for leader fallback and belief sync)
      votes - collected votes
      proposal - the original proposal
      Returns:
      the decision result
    • makeDecision

      default DecisionResult makeDecision(com.tnsai.agents.groups.AgentGroup group, DecisionProposal proposal)
      Convenience method: propose, vote, and converge in one call.
      Parameters:
      group - the agent group
      proposal - the decision proposal
      Returns:
      the decision result