Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
add library judge into telemetry event
Alezander94965e0d94c5a
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex c90b47de8..58b4a3b08 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -1380,6 +1380,12 @@ class Agent(Generic[Context, AgentStructuredOutput]):final_res = self.history.final_result()final_result_str = json.dumps(final_res) if final_res is not None else None+ # Extract judgement data if available+ judgement_data = self.history.judgement()+ judge_verdict = judgement_data.get('verdict') if judgement_data else None+ judge_reasoning = judgement_data.get('reasoning') if judgement_data else None+ judge_failure_reason = judgement_data.get('failure_reason') if judgement_data else None+self.telemetry.capture(AgentTelemetryEvent(task=self.task,@@ -1406,6 +1412,9 @@ class Agent(Generic[Context, AgentStructuredOutput]):success=self.history.is_successful(),final_result_response=final_result_str,error_message=agent_run_error,+ judge_verdict=judge_verdict,+ judge_reasoning=judge_reasoning,+ judge_failure_reason=judge_failure_reason,))diff --git a/browser_use/telemetry/views.py b/browser_use/telemetry/views.pyindex f925ffa53..b04679c84 100644--- a/browser_use/telemetry/views.py+++ b/browser_use/telemetry/views.py@@ -48,6 +48,10 @@ class AgentTelemetryEvent(BaseTelemetryEvent):success: bool | Nonefinal_result_response: str | Noneerror_message: str | None+ # judge details+ judge_verdict: bool | None+ judge_reasoning: str | None+ judge_failure_reason: str | Nonename: str = 'agent_event'