from __future__ import annotations
from typing import List, Dict, Optional, Type


# We'll use a registry pattern rather than hardcoded strings
class AgentRegistry:
    """Registry for agent types and classes"""

    _registry: Dict[str, Type] = {}

    @classmethod
    def register(cls, agent_type: str, agent_class: Type) -> Type:
        """Register an agent class with its type"""
        cls._registry[agent_type] = agent_class
        return agent_class

    @classmethod
    def get_class(cls, agent_type: str) -> Optional[Type]:
        """Get the class for a given agent type"""
        return cls._registry.get(agent_type)

    @classmethod
    def get_types(cls) -> List[str]:
        """Get all registered agent types"""
        return list(cls._registry.keys())

    @classmethod
    def get_classes(cls) -> Dict[str, Type]:
        """Get all registered agent classes"""
        return cls._registry.copy()


# Create a singleton instance
agent_registry = AgentRegistry()
