#!/usr/bin/env python3
"""
Repository Factory
Factory function to create appropriate repository based on configuration.
"""
from __future__ import annotations
import logging
from typing import Any
from .auto_persist_repo import AutoPersistRepo
from .repository import ChatRepository
logger = logging.getLogger(__name__)
def create_repository(config: dict[str, Any]) -> ChatRepository:
"""Create the chat repository.
The system now uses a single, optimized storage backend: AutoPersistRepo.
Any legacy `storage.type` configuration is ignored.
"""
logger.info("Using auto-persist storage with retention policies")
return AutoPersistRepo(config)
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jck411/MCP_BACKEND_OPENROUTER'
If you have feedback or need assistance with the MCP directory API, please join our Discord server