Migrate all agent roles from Legacy to EvoAgent architecture: - fundamentals_analyst, technical_analyst, sentiment_analyst, valuation_analyst - risk_manager, portfolio_manager Key changes: - EvoAgent now supports Portfolio Manager compatibility methods (_make_decision, get_decisions, get_portfolio_state, load_portfolio_state, update_portfolio) - Add UnifiedAgentFactory for centralized agent creation - ToolGuard with batch approval API and WebSocket broadcast - Legacy agents marked deprecated (AnalystAgent, RiskAgent, PMAgent) - Remove backend/agents/compat.py migration shim - Add run_id alongside workspace_id for semantic clarity - Complete integration test coverage (13 tests) - All smoke tests passing for 6 agent roles Constraint: Must maintain backward compatibility with existing run configs Constraint: Memory support must work with EvoAgent (no fallback to Legacy) Rejected: Separate PM implementation for EvoAgent | unified approach cleaner Confidence: high Scope-risk: broad Directive: EVO_AGENT_IDS env var still respected but defaults to all roles Not-tested: Kubernetes sandbox mode for skill execution
49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Agents package for the current mixed runtime.
|
|
|
|
Exports:
|
|
- EvoAgent: Next-generation agent with workspace support
|
|
- ToolGuardMixin: Tool call approval/denial flow
|
|
- CommandHandler: System command handling
|
|
- AgentFactory: Design-time agent creation under `workspaces/`
|
|
- WorkspaceManager: Legacy alias for the persistent `workspaces/` registry
|
|
- WorkspaceRegistry: Explicit design-time `workspaces/` registry
|
|
- RunWorkspaceManager: Run-scoped workspace asset manager
|
|
- AgentRegistry: Central agent registry
|
|
- Legacy compatibility: AnalystAgent, PMAgent, RiskAgent
|
|
"""
|
|
|
|
# New EvoAgent architecture (from agent_core.py)
|
|
from .agent_core import EvoAgent, ToolGuardMixin, CommandHandler
|
|
from .factory import AgentFactory, ModelConfig
|
|
from .workspace import WorkspaceManager, WorkspaceRegistry, WorkspaceConfig
|
|
from .workspace_manager import RunWorkspaceManager
|
|
from .registry import AgentRegistry, AgentInfo, get_registry, reset_registry
|
|
|
|
# Legacy agents (backward compatibility)
|
|
from .analyst import AnalystAgent
|
|
from .portfolio_manager import PMAgent
|
|
from .risk_manager import RiskAgent
|
|
|
|
__all__ = [
|
|
# New architecture
|
|
"EvoAgent",
|
|
"ToolGuardMixin",
|
|
"CommandHandler",
|
|
"AgentFactory",
|
|
"ModelConfig",
|
|
"WorkspaceManager",
|
|
"WorkspaceRegistry",
|
|
"WorkspaceConfig",
|
|
"RunWorkspaceManager",
|
|
"AgentRegistry",
|
|
"AgentInfo",
|
|
"get_registry",
|
|
"reset_registry",
|
|
# Legacy compatibility
|
|
"AnalystAgent",
|
|
"PMAgent",
|
|
"RiskAgent",
|
|
]
|