write agent.py
This commit is contained in:
4
agent.py
4
agent.py
@@ -526,6 +526,7 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu
|
|||||||
if manifest_path:
|
if manifest_path:
|
||||||
saved_paths.append(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 {
|
return {
|
||||||
"status": "ok" if unique_items else "no_items",
|
"status": "ok" if unique_items else "no_items",
|
||||||
"items": unique_items,
|
"items": unique_items,
|
||||||
@@ -535,8 +536,9 @@ class SeleniumbaseWebsiteScraper(A2AAgent[SeleniumbaseWebsiteScraperConfig, NoAu
|
|||||||
"pages_visited": all_pages,
|
"pages_visited": all_pages,
|
||||||
"html_captures": all_htmls,
|
"html_captures": all_htmls,
|
||||||
"iterations": len(decisions) or 0,
|
"iterations": len(decisions) or 0,
|
||||||
"steps": len(decisions) or 0,
|
"steps": step_logs,
|
||||||
"decisions": decisions,
|
"decisions": decisions,
|
||||||
|
"goal_summary": goal_summary,
|
||||||
}
|
}
|
||||||
|
|
||||||
def _build_deep_agent(self, *, ctx: RunContext[NoAuth], creds: Any, system_prompt: str):
|
def _build_deep_agent(self, *, ctx: RunContext[NoAuth], creds: Any, system_prompt: str):
|
||||||
|
|||||||
Reference in New Issue
Block a user