agents.conversation.debate.agent¶
Structured debate conversation agent with positions and formal argumentation.
This module implements a debate conversation agent that manages structured debates between multiple participants with defined positions, argument tracking, and optional judging/scoring capabilities.
Classes¶
Structured debate conversation with positions and formal argumentation. |
Module Contents¶
- class agents.conversation.debate.agent.DebateConversation¶
Bases:
haive.agents.conversation.base.agent.BaseConversationAgent
Structured debate conversation with positions and formal argumentation.
This agent orchestrates formal debates between participants using a reducer-based state system for automatic tracking and phase management.
Features: - Automatic round tracking via reducers - Phase transitions based on computed properties - Structured debate format with opening/closing statements - Optional judging and scoring - Configurable argument requirements
- conclude_conversation(state)¶
Create debate conclusion using state statistics.
- Parameters:
state (haive.agents.conversation.debate.state.DebateState)
- Return type:
langgraph.types.Command
- classmethod create_simple_debate(topic, position_a, position_b, enable_judge=False, arguments_per_side=3, temperature=0.7, **kwargs)¶
Create a simple two-sided debate conversation.
- get_conversation_state_schema()¶
Return the DebateState schema for this conversation.
- Return type:
type[haive.agents.conversation.debate.state.DebateState]
- process_response(state)¶
Process agent response using reducers for automatic tracking.
- Parameters:
state (haive.agents.conversation.debate.state.DebateState)
- Return type:
langgraph.types.Command
- select_speaker(state)¶
Select the next speaker based on debate phase and rules.
- Parameters:
state (haive.agents.conversation.debate.state.DebateState)
- Return type:
langgraph.types.Command
- setup_agent()¶
Setup the debate agent with proper state schema.
- Return type:
None
- validate_debate_setup()¶
Validate debate configuration and participant setup.
- Return type: