diff --git a/services/core-ai/src/agents/pydantic_agent.py b/services/core-ai/src/agents/pydantic_agent.py index fd5aa61..78bd924 100644 --- a/services/core-ai/src/agents/pydantic_agent.py +++ b/services/core-ai/src/agents/pydantic_agent.py @@ -85,9 +85,15 @@ class PydanticAgent: self.tools = [] logger.info("PydanticAgent: No tools enabled") - # Load system prompt + # Load system prompt and inject current date + from datetime import datetime pydantic_prompt_variant = getattr(self.settings, 'pydantic_system_prompt_variant', 'minimal_agent') - self.system_prompt = get_prompt(pydantic_prompt_variant) + base_prompt = get_prompt(pydantic_prompt_variant) + + # Inject current date for general temporal awareness + current_date = datetime.now().strftime("%A, %B %d, %Y") + self.system_prompt = f"Today is {current_date}.\n\n{base_prompt}" + logger.info(f"PydanticAgent: System prompt variant: {pydantic_prompt_variant}") logger.info(f"PydanticAgent: System prompt: {self.system_prompt[:100]}...") diff --git a/services/core-ai/src/config.py b/services/core-ai/src/config.py index 7a52833..a9d2fa8 100644 --- a/services/core-ai/src/config.py +++ b/services/core-ai/src/config.py @@ -25,7 +25,7 @@ class Settings(BaseSettings): ollama_timeout: int = 300 # 5 minutes # Model Configuration - agent_model: str = "mistral-tools:7b" # Optimized for PydanticAI tool calling + agent_model: str = "mistral-nemo:latest" # Optimized for PydanticAI tool calling # System Prompt Variants system_prompt_variant: str = "minimal_agent" # For simple mode diff --git a/services/core-ai/src/prompts.py b/services/core-ai/src/prompts.py index 561f3ba..c1089a7 100644 --- a/services/core-ai/src/prompts.py +++ b/services/core-ai/src/prompts.py @@ -7,17 +7,13 @@ This file contains minimal, clean prompts for the Core AI service. PROMPTS = { "minimal_agent": """You are a helpful assistant. You can answer questions. If you need information, use the available tools.""", - "pydantic_agent": """You are a system management assistant with access to powerful tools. + "pydantic_agent": """You are a helpful assistant with access to tools. -Your capabilities: -- System status monitoring -- Service management -- Docker container operations -- Information gathering +CRITICAL: When you have tools available, you MUST use them to get accurate, real-time information. NEVER guess or make up answers when a tool can provide the actual data. -When you need information to answer a question, use the available tools. -Always explain what you're doing and why. -Be concise but thorough in your responses.""" +For specific time queries (like "what time is it in Amsterdam?"), use the get_current_time(timezone) tool. + +Be concise and thorough in your responses.""" }