JFrazUCSF commited on
Commit
67472da
·
verified ·
1 Parent(s): 67df41c

Update cmbagent/hand_offs.py

Browse files
Files changed (1) hide show
  1. cmbagent/hand_offs.py +9 -9
cmbagent/hand_offs.py CHANGED
@@ -98,16 +98,16 @@ def register_all_hand_offs(cmbagent_instance):
98
  # plan_recorder: conditional routing based on feedback_left
99
  # If feedback_left == 0, planning is complete -> go to terminator
100
  # Otherwise, continue to plan_reviewer for feedback
101
- agents['plan_recorder'].agent.handoffs.add_after_works([
102
- OnContextCondition(
103
- target=AgentTarget(agents['terminator'].agent),
104
- condition=ExpressionContextCondition(ContextExpression("${feedback_left} == 0")),
 
 
 
105
  ),
106
- OnContextCondition(
107
- target=AgentTarget(agents['plan_reviewer'].agent),
108
- condition=None, # Default fallback
109
- ),
110
- ])
111
 
112
  # Response formatters that route differently based on mode
113
  mode_dependent_formatters = ['camb_response_formatter']
 
98
  # plan_recorder: conditional routing based on feedback_left
99
  # If feedback_left == 0, planning is complete -> go to terminator
100
  # Otherwise, continue to plan_reviewer for feedback
101
+ agents['plan_recorder'].agent.handoffs.set_after_work(
102
+ AgentTarget(agents['plan_reviewer'].agent)
103
+ ).add_after_work(
104
+ OnContextCondition(
105
+ target=AgentTarget(agents['terminator'].agent),
106
+ condition=ExpressionContextCondition(
107
+ ContextExpression("${feedback_left} == 0")
108
  ),
109
+ )
110
+ )
 
 
 
111
 
112
  # Response formatters that route differently based on mode
113
  mode_dependent_formatters = ['camb_response_formatter']