"""Polyhedra quant agent package. Agent classes are imported lazily so lightweight agent tests and specialized market components do not load provider dependencies until the specific agent is instantiated. """ from __future__ import annotations from typing import Any _LAZY_EXPORTS: dict[str, tuple[str, str]] = { "DataFetcherAgent": ("polyhedra.agents.quant.datafetcher", "DataFetcherAgent"), "TrendAnalystAgent": ("polyhedra.agents.quant.trendanalyst", "TrendAnalystAgent"), "SentimentAnalystAgent": ("polyhedra.agents.quant.sentimentanalyst", "SentimentAnalystAgent"), "MarketEventWatcher": ("polyhedra.agents.quant.market_watchers", "MarketEventWatcher"), "OptionsFlowWatcher": ("polyhedra.agents.quant.market_watchers", "OptionsFlowWatcher"), "MacroContextWatcher": ("polyhedra.agents.quant.market_watchers", "MacroContextWatcher"), "UnusualEventDetector": ("polyhedra.agents.quant.market_watchers", "UnusualEventDetector"), "EventRouter": ("polyhedra.agents.quant.market_watchers", "EventRouter"), "BTCAnalyst": ("polyhedra.agents.quant.asset_analysts", "BTCAnalyst"), "SPYAnalyst": ("polyhedra.agents.quant.asset_analysts", "SPYAnalyst"), "QQQAnalyst": ("polyhedra.agents.quant.asset_analysts", "QQQAnalyst"), "GLDAnalyst": ("polyhedra.agents.quant.asset_analysts", "GLDAnalyst"), "QuantResearcherAgent": ("polyhedra.agents.quant.quantresearcher", "QuantResearcherAgent"), "BacktesterAgent": ("polyhedra.agents.quant.backtester", "BacktesterAgent"), "RiskAnalystAgent": ("polyhedra.agents.quant.riskanalyst", "RiskAnalystAgent"), "QuantStrategistAgent": ("polyhedra.agents.quant.quantstrategist", "QuantStrategistAgent"), "VizAgent": ("polyhedra.agents.quant.vizagent", "VizAgent"), "PortfolioMonitorAgent": ("polyhedra.agents.quant.portfoliomonitor", "PortfolioMonitorAgent"), "PublisherAgent": ("polyhedra.agents.quant.publisher", "PublisherAgent"), } def __getattr__(name: str) -> Any: if name not in _LAZY_EXPORTS: raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from importlib import import_module module_name, attr_name = _LAZY_EXPORTS[name] value = getattr(import_module(module_name), attr_name) globals()[name] = value return value __all__ = list(_LAZY_EXPORTS)