Architecture
LYDOS Agent OS v12.0.0 is a beta-stage AI orchestration platform built on FastAPI, with 29 active modules, 109 agents, and 245 Q-Series engines. All components are health-monitored with an overall system score of 98/100.
System Overview
Directory Structure
Each Q-Series engine owns its own module file and route handler under core/engines/ and core/routes/.
| LYDOS-AGENT-ORCHESTRATOR/ |
| ├── server.py # FastAPI server (port 8888, Q1-Q248 registered) |
| ├── core/ |
| │ ├── agents/ # 13 Python agent implementations |
| │ ├── engines/ # Q25-Q248 engine modules |
| │ ├── infrastructure/ # MCP server (162 tools), DB pool, circuit breaker |
| │ ├── routes/ # API route handlers (per-engine) |
| │ ├── system/ # self_healing_engine, kernel_loader |
| │ ├── lyd/ # LYD v3.0 orchestrator, TELOS, voice_engine |
| │ ├── security_hardening.py |
| │ ├── observability.py |
| │ └── health_dashboard.py |
| ├── config/ |
| │ ├── agents.yaml # 99 YAML agent definitions (14 departments) |
| │ ├── kernel.yaml # System configuration |
| │ └── master_prompt.md # AI system prompt (constitutional) |
| ├── hooks/ |
| │ ├── session-start.sh # Auto-start server + health cache write |
| │ └── post-compact.sh # TELOS goals + health injection post-compaction |
| ├── telos/ # TELOS goal storage (23 active goals) |
| ├── web/ # Next.js 15 frontend (this site) |
| ├── data/ # Skill library, CTI feeds, free-for-dev index |
| ├── tests/ # 7670+ tests (pytest), 0 failures |
| ├── scripts/ # Utility scripts, cache refresh, sync |
| └── .env # API keys (never committed to git) |
29 Active Modules
All 29 modules are health-monitored at GET /api/health. The overall system score is 98/100.
| Layer | Module | Description | Score |
|---|---|---|---|
| Core | kernel_loader | System bootstrap, module loading and registration | 100/100 |
| Core | config_manager | YAML/JSON configuration management with hot reload | 100/100 |
| Core | error_handler | Structured error handling with automatic recovery | 100/100 |
| Core | self_healing_engine | Auto-recovery, health monitoring, fault detection | 100/100 |
| Agents | agent_manager | 109 agents: 99 YAML + 13 Python, lifecycle management | 100/100 |
| Agents | harika_agent | Project analysis, code review, quality assessment | 100/100 |
| Agents | harika_supreme | Multi-agent supreme analysis with consensus voting | 100/100 |
| Agents | harika_ultra_team | 8-agent UltraTeam orchestration, parallel analysis | 100/100 |
| LLM | groq_api | Primary Provider LLM integration (llama-3.3-70b, speech recognition) | 100/100 |
| LLM | llm_router | Multi-provider routing (Q43) with automatic failover | 100/100 |
| LLM | groq_full_client | Full Primary Provider API client with streaming support | 100/100 |
| LLM | zai_client | Bilingual Provider integration (long context, multilingual) | 100/100 |
| LLM | claude_api | Analysis Provider integration with tool calling | 100/100 |
| v7 | rate_limiter | Token bucket rate limiting per endpoint and user | 100/100 |
| v7 | http_client | Async HTTP client pool with retry logic | 100/100 |
| v7 | circuit_breaker | Circuit breaker pattern for external service calls | 100/100 |
| v7 | db_pool | SQLite WAL connection pool with async support | 100/100 |
| v7 | observability | Structured logging, metrics collection, tracing | 100/100 |
| v7 | agent_scheduler | Cron-based agent scheduling with dependency resolution | 100/100 |
| v7 | task_queue | Priority task queue with retry and dead-letter support | 100/100 |
| v7 | websocket_hub | Real-time WebSocket events, pub/sub channels | 100/100 |
| v7 | multi_stt_engine | Speech-to-text engine using speech recognition | 100/100 |
| v7 | semantic_memory | Vector-based semantic memory with similarity search | 100/100 |
| v7 | security_hardening | Security headers, input validation, sanitization | 100/100 |
| v7 | cuda_agent | GPU acceleration agent for heavy computation | 100/100 |
| Infra | mcp_server | 162 MCP tools, STDIO transport, AI IDE integration | 100/100 |
| Infra | nim_llm_client | NVIDIA NIM integration for on-premise inference | 100/100 |
| Deps | python_dependencies | 7/7 dependency management, version pinning | 100/100 |
Agent Architecture
Programmatic agents with full code logic, async support, and tool integration
Declarative config-driven agents defined in agents.yaml with schema validation
Vulnerability scanning, compliance checking, penetration testing patterns
Static analysis, refactoring, test generation, documentation
Web research, CTI feeds, competitive analysis, knowledge extraction
CI/CD integration, infrastructure monitoring, deployment automation
Delegation routingis handled by Q29 Agent Intelligence using 4 strategies: Function Calling, ReAct, Plan & Execute, and Chain of Thought. Q22 Agent Bus provides inter-agent RPC with circuit breaker and deadlock detection.
Infrastructure
Health Monitoring
All 29 modules emit health signals. The self_healing_engine automatically recovers failed modules. Q62 Dashboard Engine provides WebSocket real-time monitoring.
| # Check system health |
| import httpx |
| response = await httpx.AsyncClient().get("http://localhost:8888/api/health") |
| health = response.json() |
| print(f"Overall score: {health['score']}/100") |
| print(f"Modules: {health['modules_healthy']}/29 healthy") |
| # Per-module status |
| for module, status in health["modules"].items(): |
| indicator = "OK" if status["healthy"] else "FAIL" |
| print(f" [{indicator}] {module}: {status['score']}/100") |
| # Q62 WebSocket real-time monitoring |
| import websockets |
| import json |
| async with websockets.connect("ws://localhost:8888/api/q62/dashboard/ws") as ws: |
| async for message in ws: |
| event = json.loads(message) |
| if event["type"] == "agent.status": |
| print(f"Agent {event['agent_id']}: {event['status']}") |
| elif event["type"] == "health.update": |
| print(f"Health score: {event['score']}/100") |
LYD v3.0 Integration
LYD v3.0 (LYDOS Operating System) sits above the Q-Series layer and orchestrates autonomous goal execution via TELOS. Goals persist across sessions in telos/. The voice engine enables hands-free operation via speech recognition STT. Memory consolidation runs automatically at session end.
| # LYD v3.0 CLI commands |
| lyd status # Full system overview |
| lyd telos # TELOS goal hierarchy (23 active goals) |
| lyd tasks # Today's task list |
| lyd listen 5 # Voice command (5 seconds speech recognition) |
| lyd memory # Semantic memory overview |
| lyd consolidate # Save session memories to long-term storage |