import json from agents.base import BaseAgent from integrations.anthropic_client import AnthropicClient class PerformanceAnalyst(BaseAgent): def __init__(self, client: AnthropicClient): super().__init__(client) @property def name(self) -> str: return "Performance Analyst" @property def system_prompt(self) -> str: return ( "You are a quantitative performance analyst. " f"\n\n{self.MARKDOWN_INSTRUCTIONS}" ) def analyze(self, metrics: dict, extra_context: str = "") -> str: user_content = ( "Analyze these portfolio performance metrics:\n" + json.dumps(metrics["performance"], indent=2) + extra_context ) return self._client.ask(self.system_prompt, user_content, temperature=0.3)