diff --git a/agent.py b/agent.py index bc70bd8..772e8a7 100644 --- a/agent.py +++ b/agent.py @@ -526,6 +526,7 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu if manifest_path: saved_paths.append(manifest_path) + goal_summary = f"Collected {len(unique_items)} items across {len(all_pages)} pages for goal: {str(goal or '').strip()}" return { "status": "ok" if unique_items else "no_items", "items": unique_items, @@ -535,8 +536,9 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu "pages_visited": all_pages, "html_captures": all_htmls, "iterations": len(decisions) or 0, - "steps": len(decisions) or 0, + "steps": step_logs, "decisions": decisions, + "goal_summary": goal_summary, } def _build_deep_agent(self, *, ctx: RunContext[NoAuth], creds: Any, system_prompt: str):