diff --git a/ai-hub/app/core/orchestration/agent_loop.py b/ai-hub/app/core/orchestration/agent_loop.py index 8029583..325577b 100644 --- a/ai-hub/app/core/orchestration/agent_loop.py +++ b/ai-hub/app/core/orchestration/agent_loop.py @@ -201,7 +201,7 @@ if not result: break # 2. Evaluation Phase - if self.evaluator and result.get("response"): + if self.evaluator: # Ensure rubric is ready if rubric_task and not rubric_content: rubric_content = await rubric_task or "# Evaluation Rubric\nTask completion required." @@ -216,8 +216,6 @@ # Plan Rework current_prompt = f"### CO-WORKER DIRECTIVE (ATTEMPT {current_attempt + 1})\n\n{audit_summary}\n\nProceed with rework." current_attempt += 1 - else: - break # No auditor or no response to evaluate except Exception as e: logger.error(f"[AgentExecutor] Round {current_attempt} failed: {e}\n{traceback.format_exc()}") @@ -329,7 +327,8 @@ partner_ctx = {"system_prompt": self.template.system_prompt_content, "skills": available_tools} # 1. Blind Rating & History Fetching in parallel for efficiency - blind_task = asyncio.create_task(self.evaluator.evaluate_blind(prompt, rubric, result["response"], partner_context=partner_ctx)) + agent_evidence = f"Text Response: {result.get('response', '')}\n\nReasoning Trace: {result.get('reasoning', '')}" + blind_task = asyncio.create_task(self.evaluator.evaluate_blind(prompt, rubric, agent_evidence, partner_context=partner_ctx)) hist_task = asyncio.create_task(self._fetch_tester_history()) blind_eval = await blind_task