orka.orka_start module
OrKa Service Runner
Main entry point for starting the OrKa service stack. By default, uses RedisStack backend for high-performance memory operations with HNSW vector indexing.
This provides optimal performance with simplified infrastructure: - RedisStack for ultra-fast memory operations and vector search - HNSW indexing for 100x faster semantic search - Simplified architecture with single backend
Environment Variables:
ORKA_MEMORY_BACKEND: Backend type (‘redisstack’ or ‘redis’) REDIS_URL: Redis connection URL (default: redis://localhost:6380/0)
- async orka.orka_start.main() None [source]
Main entry point for starting and managing OrKa services.
This asynchronous function: 1. Determines which backend to use (Redis or RedisStack) 2. Starts the appropriate infrastructure services (Redis natively) 3. Waits for services to be ready 4. Launches the OrKa backend server 5. Monitors the backend process to ensure it’s running 6. Handles graceful shutdown on keyboard interrupt
The function runs until interrupted (e.g., via Ctrl+C), at which point it cleans up all started processes and containers.
- orka.orka_start.run_startup() None [source]
Run the startup process with proper error handling.
This function serves as the main entry point and handles keyboard interrupts and unexpected errors gracefully.
- orka.orka_start.wait_for_redis(port: int, max_attempts: int = 30) None [source]
Wait for Redis to be ready and responsive (works for both native and Docker).
- Parameters:
port – Redis port to check
max_attempts – Maximum number of connection attempts
- Raises:
RuntimeError – If Redis doesn’t become ready within the timeout