omega-runtime
Production runtime orchestrator integrating all ExoGenesis Omega subsystems with health monitoring, circuit breakers, and graceful degradation.
Part of the ExoGenesis-Omega cognitive architecture.
Overview
omega-runtime is the production-ready orchestration layer that brings together all ExoGenesis Omega components: AgentDB for vector storage, the 12-tier Memory system, 7 temporal Loops, and META-SONA for architecture evolution. It provides a unified, type-safe API with built-in reliability features for deploying AI systems at scale.
The runtime handles subsystem lifecycle management, inter-component communication, health monitoring, automatic recovery, and graceful degradation under failure conditions.
Features
- Unified API: Single interface to all Omega subsystems
- Health Monitoring: Continuous health checks for all components
- Circuit Breakers: Automatic failure detection and isolation
- Graceful Degradation: Maintains reduced functionality during failures
- Retry Logic: Configurable exponential backoff with jitter
- Event System: Comprehensive event bus for system-wide notifications
- State Management: Robust state machine with lifecycle tracking
- Configuration: Validated configuration with sensible defaults
- Metrics: Built-in performance and usage metrics
- Async-First: Full Tokio integration for high concurrency
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
use ;
use Arc;
async
Core Concepts
OmegaRuntime
The main orchestrator managing all subsystems:
- AgentDB: Vector database for semantic search
- Memory: 12-tier cosmic memory system
- Loops: 7 temporal cognitive loops
- META-SONA: Architecture search and evolution
Each subsystem is independently monitored and can fail gracefully.
OmegaAPI
High-level interface abstracting subsystem details:
Health Monitoring
Continuous monitoring with automatic recovery:
- Subsystem Health: Independent health checks
- Performance Metrics: Latency, throughput, error rates
- Resource Usage: Memory, CPU, storage
- Automatic Recovery: Restart failed components
Circuit Breakers
Prevent cascade failures:
- Closed: Normal operation
- Open: Failures detected, bypass subsystem
- Half-Open: Testing recovery
Event System
System-wide event bus:
Use Cases
1. Production AI Agent Deployment
use ;
use Arc;
// Configure for production
let config = OmegaConfig ;
let runtime = new;
runtime.start.await?;
let api = new;
// Agent runs indefinitely
loop
2. Health Monitoring and Alerts
use ;
use ;
let api = new;
// Monitor health every 30 seconds
let mut health_check = interval;
loop
3. Multi-Agent Orchestration
use ;
let api = new;
// Create specialized agents
let researcher = api.create_intelligence.await?;
let executor = api.create_intelligence.await?;
// Coordinate through deliberative loop
let planning_input = CycleInput ;
let plan = api.execute_loop_cycle.await?;
println!;
4. Self-Improving System
use ;
let api = new;
// Run evolutionary loop weekly
spawn;
5. Graceful Degradation Example
use ;
let api = new;
// Subscribe to health events
let mut event_rx = runtime.subscribe_events.await;
spawn;
Examples
Custom Configuration
use ;
let config = OmegaConfig ;
let runtime = new.await?;
Metrics Collection
let api = new;
let metrics = api.metrics.await?;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
println!;
Architecture
The runtime integrates all Omega subsystems:
┌──────────────────────────────────────────┐
│ OmegaAPI (Public) │
│ - Memory operations │
│ - Intelligence operations │
│ - Loop operations │
│ - System operations │
└────────────┬─────────────────────────────┘
│
▼
┌──────────────────────────────────────────┐
│ OmegaRuntime (Core) │
│ - Lifecycle management │
│ - State machine │
│ - Event bus │
│ - Health monitoring │
└──┬────────┬────────────┬─────────────┬───┘
│ │ │ │
▼ ▼ ▼ ▼
┌──────┐┌────────┐┌───────────┐┌───────────┐
│Agent ││Memory ││ Loops ││META-SONA │
│ DB ││System ││ Engine ││ Factory │
└──────┘└────────┘└───────────┘└───────────┘
Performance
Runtime overhead is minimal:
- API Call Overhead: <1ms
- Health Check: <10ms per subsystem
- Event Propagation: <1ms
- State Transitions: <100μs
Memory usage: ~10MB base + subsystem usage
Related Crates
Core Infrastructure
- omega-core - Core types (used by runtime)
- omega-persistence - Storage backend
Subsystems
- omega-agentdb - Vector database subsystem
- omega-memory - Memory subsystem
- omega-loops - Loop engine subsystem
- omega-meta-sona - Architecture evolution subsystem
Brain-Like Cognition
- omega-brain - Unified cognitive architecture
- omega-snn - Spiking neural networks
- omega-attention - Attention mechanisms
- omega-consciousness - Consciousness models
- omega-hippocampus - Memory circuits
- omega-sleep - Sleep/wake consolidation
- omega-strange-loops - Self-awareness
License
Licensed under the MIT License. See LICENSE for details.