From 1612b6ffb23c3828bd065602c43605db6d12054d Mon Sep 17 00:00:00 2001 From: a2a-cloud Date: Mon, 8 Jun 2026 23:06:10 +0000 Subject: [PATCH] write agent.py --- agent.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent.py b/agent.py index 727866f..05416d6 100644 --- a/agent.py +++ b/agent.py @@ -464,10 +464,12 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu "reason": "planner suggested URL outside allowed domains; stopping", "confidence": confidence, }) + step_logs[-1]["decision"] = {"stop": True, "reason": "outside allowed domains"} break if action == "stop": decisions.append({"step": step, "action": "stop", "reason": reason, "confidence": confidence}) + step_logs[-1]["decision"] = {"stop": True, "reason": reason} break if action != "scrape": @@ -477,6 +479,7 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu "reason": "planner returned unknown action", "confidence": confidence, }) + step_logs[-1]["decision"] = {"stop": True, "reason": "unknown action"} break # Adopt next plan