from .coordination import SharedMemory
from .internet_access import (
    FirecrawlProvider,
    InternetAccessProvider,
    TavilyProvider,
    create_internet_access_provider,
)
from .long_term_memory.procedural.toolbox import Toolbox
from .long_term_memory.semantic import KnowledgeBase
from .long_term_memory.semantic.persona import Persona, RoleType
from .memagent import MemAgent
from .memory_provider import MemoryProvider, MemoryType
from .short_term_memory.working_memory.cwm import CWM


# Lazy import MongoDB to avoid requiring pymongo when not needed
def __getattr__(name):
    if name == "MongoDBProvider":
        from .memory_provider.mongodb import MongoDBProvider

        return MongoDBProvider
    if name in ("FileSystemProvider", "FileSystemConfig"):
        from .memory_provider.filesystem import FileSystemConfig, FileSystemProvider

        return FileSystemProvider if name == "FileSystemProvider" else FileSystemConfig
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")


__all__ = [
    "MemoryProvider",
    "MongoDBProvider",
    "FileSystemProvider",
    "FileSystemConfig",
    "MemoryType",
    "Persona",
    "RoleType",
    "Toolbox",
    "KnowledgeBase",
    "CWM",
    "SharedMemory",
    "MemAgent",
    "InternetAccessProvider",
    "FirecrawlProvider",
    "TavilyProvider",
    "create_internet_access_provider",
]
