Agent Zero AI framework
add number of imgs in vision tool
Alessandro33b88d5731e6
diff --git a/prompts/agent.system.tools_vision.md b/prompts/agent.system.tools_vision.mdindex a4ecd1b3f..7611245a4 100644--- a/prompts/agent.system.tools_vision.md+++ b/prompts/agent.system.tools_vision.md@@ -7,6 +7,7 @@ rules:- load all relevant images in one call when comparing screenshots or pages- use when the task depends on screenshots, diagrams, scanned documents, charts, or photos- only bitmaps are supported; convert other formats first if needed+- the tool result includes loaded/skipped image totals and the corresponding path listsexample:```json{diff --git a/tools/vision_load.py b/tools/vision_load.pyindex ee89e69ec..83a7101c7 100644--- a/tools/vision_load.py+++ b/tools/vision_load.py@@ -68,10 +68,14 @@ class VisionLoad(Tool):# build image data messages for LLMs, or error messagecontent = []+ loaded_count = len(self.loaded_paths)+ skipped_count = len(self.skipped_paths)loaded_summary = "\n".join(self.loaded_paths) if self.loaded_paths else "none"skipped_summary = "\n".join(self.skipped_paths) if self.skipped_paths else "none"summary = (+ f"Loaded images: {loaded_count}\n"f"Loaded images:\n{loaded_summary}\n\n"+ f"Skipped images: {skipped_count}\n"f"Skipped images (max {self._get_max_embeds()} loaded at a time according to model configuration):\n{skipped_summary}")if self.images_dict:@@ -103,7 +107,7 @@ class VisionLoad(Tool):message = ("No images processed"if not self.images_dict and not self.skipped_paths- else f"{len(self.loaded_paths)} images loaded, {len(self.skipped_paths)} skipped"+ else f"{loaded_count} images loaded, {skipped_count} skipped")PrintStyle(font_color="#1B4F72", background_color="white", padding=True, bold=True