From 2ddf38d7cd8d2a6f1fb99bf9fb9f65f58fff7329 Mon Sep 17 00:00:00 2001 From: ValueOn AG Date: Fri, 16 May 2025 18:27:44 +0200 Subject: [PATCH] agent coach enhanced --- connectors/connectorDbJson.py | 4 ---- modules/agentCoach.py | 3 ++- modules/workflowManager.py | 9 ++++++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/connectors/connectorDbJson.py b/connectors/connectorDbJson.py index bd2ddd13..024a4984 100644 --- a/connectors/connectorDbJson.py +++ b/connectors/connectorDbJson.py @@ -154,10 +154,6 @@ class DatabaseConnector: path = self._getTablePath(table) try: - # Log the path and data being saved - logger.debug(f"Attempting to save table {table} to {path}") - logger.debug(f"Data to save: {json.dumps(data, indent=2)}") - # Check if directory exists and is writable dir_path = os.path.dirname(path) if not os.path.exists(dir_path): diff --git a/modules/agentCoach.py b/modules/agentCoach.py index 5995dff7..8f97cf78 100644 --- a/modules/agentCoach.py +++ b/modules/agentCoach.py @@ -20,8 +20,9 @@ class AgentCoach(AgentBase): super().__init__() self.name = "coach" self.label = "Coach & Assistant" - self.description = "Answers questions and generates content directly from extracted data without complex processing" + self.description = "Answers questions, converts and generates content directly from data without complex processing" self.capabilities = [ + "dataConversion", "questionAnswering", "contentGeneration", "simpleDataFormatting", diff --git a/modules/workflowManager.py b/modules/workflowManager.py index 99237e02..7187d7a6 100644 --- a/modules/workflowManager.py +++ b/modules/workflowManager.py @@ -442,12 +442,19 @@ Please analyze the request and create: ## IMPORTANT RULES FOR THE WORKPLAN: 1. Each input document must either already exist (provided by the user or previously created by an agent) or be created by an agent before it's used. -2. If necessary, convert input documents to a suitable format using agents when the type doesn't match. +2. Document data is already extracted for the agent based on your prompt to the agent. He does not need to do this again. 3. Do not define document inputs that don't exist or haven't been generated beforehand. 4. Create a logical sequence - earlier agents can create documents that are later used as inputs. 5. If the user has provided documents but hasn't clearly stated what they want, try to act according to the context. 6. ALL documents provided by the user (where fileSource is "user") MUST be included in the work plan, even if they don't have content summaries or if content extraction failed. +## AGENT SELECTION GUIDELINES: +1. Carefully analyze the task requirements and match them with agent capabilities +2. Consider the type of operation needed (data processing, analysis, documentation, etc.) +3. Review each agent's capabilities and select the most appropriate one for the task +4. Ensure the selected agent has the necessary capabilities to handle the input and output formats +5. If multiple agents could handle the task, choose the one with the most specific capabilities for the task + Your answer must be strictly in the JSON_OUTPUT format, with no additions before or after the JSON object. JSON_OUTPUT = {{