Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Engine Services

The engine hosts 37 services organized into four groups: resource management, intelligence, data, and external integration. All services run in a single daemon process, enabling zero-cost inter-service calls and shared access to GPU resources.

Service Groups

Resource Management

ServicePurpose
OrchestratorServicevLLM endpoint lifecycle, GPU allocation, capability-based scheduling
SchedulerServicePriority job queue (CRITICAL→EVOLUTION), OR-Tools makespan optimization, XAI budget
HealthServiceGPU health via pynvml, endpoint liveness, FMEA score computation
AgendaTrackerTracks scheduled endpoint transitions to suppress false-positive health incidents

Intelligence

ServicePurpose
EvolutionServiceAgent prompt optimization via APO/GEPA during GPU idle periods
CognitionServiceAutonomous thought generation — pattern, connection, curiosity, self-observation
CLTServiceCross-Layer Transcoder sparse feature extraction (20,480-dim, ~115 active)
TopologyServiceSemantic attractor detection, drift monitoring via CLT features
NGRCPredictorReservoir computing (NVAR) for temporal prediction of embedding trajectories

Data

ServicePurpose
DatasetServiceNiFi SoM dataset generation for agent training
FlowSchedulerServiceMetaflow pipeline scheduling and execution
KBServiceKnowledge base CRUD operations
LineageServiceOpenLineage event materialization into Apache AGE graph

External Integration

ServicePurpose
XBookmarksServiceX (Twitter) bookmark synchronization with folder-first sync

Background Tasks

Several services run scheduled background tasks without external cron:

TaskServiceSchedulePurpose
cognition_cycleCognitionServiceEvery 4hDetect patterns across recent KB entries
self_observationCognitionServiceEvery 8hMeta-cognitive reflection on thought quality
engine_auditCognitionServiceEvery 12hSystem health patterns, resource utilization
Evolution cycleEvolutionServiceGPU idle (<30% for 60s)Agent prompt optimization via APO/GEPA
Health checkHealthServiceEvery 30sEndpoint liveness polling
X bookmark syncXBookmarksServiceConfigurableFolder-first bookmark synchronization

Service Dependencies

Services form a directed dependency graph. The orchestrator and scheduler are foundational:

OrchestratorService → VLLMController → GPU Pool (6x NVIDIA)
SchedulerService → OrchestratorService → BackendRouter
EvolutionService → SchedulerService (submits jobs at EVOLUTION priority)
CognitionService → SchedulerService (submits jobs at NORMAL priority)
HealthService → GPU Pool (via pynvml, not via orchestrator)
TopologyService → CLTService → circuit-tracer (BluelightAI)
NGRCPredictor → TopologyService (embedding centroid trajectories)

Service Lifecycle

Each service implements a standard lifecycle:

class SomeService:
    async def start(self) -> None:
        """Initialize resources, start background tasks."""
        ...

    async def stop(self) -> None:
        """Clean shutdown, release resources."""
        ...

Services are registered at engine startup and torn down in reverse order. Background tasks use asyncio.create_task() with structured cancellation on shutdown.

See Also