Complete API documentation for the GENXAIS Framework.
Main framework class that provides access to all GENXAIS features.
from genxais_sdk import GENXAISFramework
framework = GENXAISFramework(config_path: Optional[str] = None)Set the current development mode.
Parameters:
mode: One of "VAN", "PLAN", "CREATE", "IMPLEMENT", "REFLECT", "ARCHIVE"
Returns:
bool: Success status
Get the current development mode.
Returns:
str: Current mode
Initialize and manage RAG storage components.
from rag_system.init_storage import RAGStorageInitializer
initializer = RAGStorageInitializer(mongodb_uri: Optional[str] = None)Initialize filesystem structure.
Returns:
- Dictionary with initialization status
Initialize MongoDB collections and indexes.
Returns:
- Dictionary with initialization status
Initialize all RAG components.
Returns:
- Dictionary with complete initialization status
Manage and recover from errors.
from error_handling import SDKErrorHandler
handler = SDKErrorHandler()Handle specific error types with recovery strategies.
Parameters:
error_type: Type of errorerror_details: Error detailscontext: Error context
Returns:
- Dictionary with error handling results
Safely execute a function with error handling.
Parameters:
func: Function to execute*args: Positional arguments**kwargs: Keyword arguments
Returns:
- Dictionary with execution results
Manage APM development cycles.
from apm_framework import APMCycleManager
manager = APMCycleManager()Start a new APM cycle.
Parameters:
mode: Development mode
Returns:
- Dictionary with cycle status
End current APM cycle.
Returns:
- Dictionary with cycle results
Base class for all agents.
from agents import BaseAgent
class CustomAgent(BaseAgent):
def __init__(self):
super().__init__()Validate if action is allowed in current mode.
Parameters:
action: Proposed actioncontext: Action context
Returns:
bool: Action validity
Manage development context and history.
from memory_bank import MemoryManager
memory = MemoryManager()Store development context.
Parameters:
context: Context data
Returns:
str: Context ID
Retrieve stored context.
Parameters:
context_id: Context identifier
Returns:
- Dictionary with context data
from genxais_sdk.utils import optimize_tokens
optimized = optimize_tokens(text: str, max_tokens: int) -> strfrom genxais_sdk.utils import create_pipeline
pipeline = create_pipeline(steps: List[Dict[str, Any]]) -> Pipelinefrom genxais_sdk.events import EventEmitter
emitter = EventEmitter()
emitter.on("event_name", callback_function)
emitter.emit("event_name", event_data)from genxais_sdk.config import ConfigManager
config = ConfigManager()
config.load_config("config.json")
config.get_value("key")
config.set_value("key", "value")from genxais_sdk.constants import *
MODES = ["VAN", "PLAN", "CREATE", "IMPLEMENT", "REFLECT", "ARCHIVE"]
DEFAULT_TIMEOUT = 60
MAX_RETRIES = 3from genxais_sdk.types import *
Pipeline = List[Dict[str, Any]]
Context = Dict[str, Any]
ActionResult = Dict[str, Any]