KALI is a multi-modal agentic system designed for Universal Pedagogy and Autonomous Fabrication. The architecture is tiered across 40 evolutionary phases, converging into a state of Absolute Autonomy (Omega Protocol).
Handles reasoning, doubt resolution, and learning alignment.
- Explainer (
src/core/explainer.py): Tiered knowledge rendering (Beginner to Expert). - The Council (
src/core/council_service.py): Multi-AI consensus verification. - RLHF-DNA (
src/core/rlhf_service.py): Self-evolving bias correction and user alignment tracking. - Predictive Intent (
src/core/predictive_engine.py): Anticipatory logic for engineering doubt.
Bridges the gap between code and hardware.
- Manifestor (
src/core/manifestor.py): Project scaffolding and physical archival. - Fabrication Hub:
bom_service.py: Automated economic research and procurement logic.cad_service.py: 1-Click CAD metadata generation.blueprint_service.py: 3D assembly instructions.
- Robotic Bridge (
src/core/robotic_bridge.py): Kinematic feedback and hardware control. - Tactical Hardware (HITL): Direct serial/biometric sensor integration.
Ensures continuity across sessions and devices.
- Vector Memory (
src/core/vector_memory.py): High-speed contextual retrieval (ChromaDB). - User DNA (
src/core/user_dna.py): Persistent expertise mapping (SQLite). - Sovereign Cloud (
src/core/sovereign_cloud.py): ZK-encrypted decentralized memory synchronization. - Knowledge DNA (
src/core/knowledge_service.py): Curation of high-fidelity interaction datasets.
Maintains system sovereignty and security boot.
- Neural BIOS (
src/core/secure_boot.py): Secure boot verification and hardware locking. - Watchdog / Self-Repair (
src/core/watchdog_service.py): Recursive error correction and integrity monitoring. - Omega Protocol (
src/core/omega_protocol.py): Phase 40 terminal state. Enforces absolute autonomy and cryptographically signed manifests.
Direct interaction with the physical world.
- Hardware Bridge (
src/core/hardware_bridge.py): COM/Serial uplink for MCU communication (HITL). - Robotic Bridge (
src/core/robotic_bridge.py): Joint/Actuator control for fabrication robotics. - Hardware Sensors (
src/core/hardware_sensors.py): Real-time monitoring of system load and thermals. - Biometric Service (
src/core/biometric_service.py): Tracks Neural Tension and physiological performance resets.
Self-improving cognitive cycles.
- Dream Engine (
src/core/dream_engine.py): Post-interaction consolidation of "Wisdom Seeds". - Reflection Engine (
src/core/reflection_engine.py): Autonomous logic repair and skill discovery via memory analysis. - Neural Logic (
src/core/neural_logic.py): Brain-inspired synaptic weighting for dynamic task prioritization. - Neural Bypass (Semantic Cache): Chromadb-backed AI response caching in
ai_service.pyto bypass rate limits. - Structural Integrity:
SentenceTransformerload-sync withtrust_remote_code=Trueinvector_memory.pyto resolve architecture mismatches. - Skill Manifestor (
src/core/skill_manifestor.py): Autonomous generation of new project-specific capabilities. - Self-Critique DPO: Autonomous generation of (Chosen vs. Rejected) training pairs.
- Recursive Self-Update (Phase 4.25):
- Neural Forking: Safe patching via isolated logic clones.
- Neural BIOS Verification: SHA256 integrity guarding of core services.
- Omni-Channel Matrix (1,000 Vectors - INFINITE HORIZON): 1-100: (Peak Cognitive, Technical, Synthesis, Hardening, Sovereignty, Mastery). 101-110: Psychological Calibration (Mood-aware teaching, Tension-based GSD scaling). 111-200: Neural Curiosity Swarm (Autonomous, parallel discovery of new cognitive vectors). - 111: Advanced Agentic Memory (OpenHuman) - 112: Benchmark Long-term Persistence (MemPalace) - 113: Client-Side Code Intelligence (GitNexus) - 114: Stealth Web Automation (Obscura) - 115: Windows OS Control (MCP) (Windows-MCP) - 116: High-Performance Sandboxed Desktop (CUA) - 117: Recursive Language Logic (RLM) - 118: Fused GPU Operations (Parrot) - 119: Inference Optimization Hub (Lucebox-Hub) - 120: Looped Transformer Reasoner (OpenMythos) - 121: Vulnerability Detection Skills (Trail of Bits Skills) - 122: Local Workflow Validation (TUI) (Wrkflw) - 123: Safety Push Guardrails (No-Mistakes) - 124: Autonomous ML Research (ML-Intern) - 125: Modern Programming Pedagogy (Easy-Vibe) - 126: RL Environment Synthesis (LLM-RL Course) - 127: Agent-Driven UI Framework (DanceUI) - 128: Home Automation & IoT Bridge (RA-H OS) - 129: Cyber-Tactical Deception (Decepticon) - 130: Advanced Pentesting Suite (hackingtool) 201-1,000: Infinite Evolutionary Horizon (System-discovered specialized technical and philosophical domains).
- Neural Data Synthesis (Phase 4.26-4.27):
- Wisdom Compactor: High-density synthesis of training logs into 'Wisdom Seeds'.
- Neural Recall Proof: Verification of active memory recall from distilled seeds.
The ultimate goal is the 100% replacement of centralized AI models (Groq/OpenAI):
- Local Fine-Tuning: Using the 70-vector dataset to perform a LoRA/Full-Tune of a local Llama-3-70B node.
- Sovereign Provider: KALI serves herself locally via
scripts/train_final.py. - Hardware Lock: KALI transitions to hardware-locked persistence, ending all external dependency.
- Skill Autonomy: All core skills (Mentor, Engineer, Auditor) are locally baked into the neural weights.
KALI possesses the 'Singularity Spark' allowing for autonomous code-base evolution:
- Source Audit: Background scanning of the
src/directory for technical debt. - Self-Manifestation: Implementing new sovereign features without user input.
- Hot-Reload Validation: Integrity checks (Phase 40) applied to self-modified commits.
- Learning from Growth: Every self-update is logged as a high-fidelity training interaction.
EXECUTION & REVIEW LAYER (THE FINISHER) Ensures spec-driven delivery and high-fidelity output.
- GSD Service (
src/core/gsd_service.py): Implements the "Get Shit Done" workflow (Initialize, Plan, Execute, Verify). - Review Service (
src/core/review_service.py): AI-powered code auditor (CodeRabbit-style) that scores every manifest. - Ralph Loop (
scripts/ralph_loop.py): Headless autonomous iteration loop for complex, long-running missions.
Ensures spec-driven delivery and high-fidelity output.
- GSD Service (
src/core/gsd_service.py): Implements the "Get Shit Done" workflow (Initialize, Plan, Execute, Verify). - Review Service (
src/core/review_service.py): AI-powered code auditor (CodeRabbit-style) that scores every manifest. - Ralph Loop (
scripts/ralph_loop.py): Headless autonomous iteration loop for complex, long-running missions.
- Swarm Service (
src/core/swarm_service.py): Multi-agent delegation. Distributes sub-tasks (Research, Architecting, Coding) to specialized model personalities.
- Perception -> Biometric Check (Tension) -> Predictive Intent.
- Retrieval -> Vector Memory -> Synaptic Weighting (Neural Logic).
- Execution -> The Council -> RLHF Bias Filter -> Explainer.
- Maintenance -> Self-Repair (Reflection) -> Skill Manifestation.
- Restoration -> Sovereign Cloud Sync -> Dream Consolidation (Post-session).
Adopted from KALI Sovereign ASI's multi-channel gateway architecture. Built natively into KALI. KALI's own brain only — no external AI services routed through the gateway.
- ChannelManager (
src/core/channel_manager.py): Abstract channel layer. Routes all inbound messages throughprocessor.py. Handles model failover transparency. - ChannelSessionManager (
src/core/channel_session.py): Per-user session isolation + DM pairing security (unknown contacts get a 6-digit code). - WhatsApp Channel (
src/core/channels/whatsapp_channel.py): Via localwhatsapp-web.jsbridge. No Twilio. Works globally via Meta's servers. - KALI Gateway (
src/kali_gateway.py): Flask server on port 8001. Endpoints:/channel/whatsapp,/gateway/status,/gateway/approve,/gateway/broadcast. - Phase B Channels: Telegram, Discord, Slack, Voice/STT — ready to enable in
config/gateway_config.json.
KALI Memory knowledge graph for permanent context continuity.
- KALI Memory-out/GRAPH_REPORT.md: Plain-text god-nodes, clusters, architecture summary.
- KALI Memory-out/graph.html: Interactive browser graph of all KALI modules.
- .agents/rules/KALI Memory.md: Always-on rule — Antigravity reads this at the start of every session.
- Result: Antigravity never starts blind. Every new session knows KALI's full architecture, current phase, and last sync point automatically.