#!/usr/bin/env python3 """ Vitalis Cortex Hybrid — Interactive CLI Ferrell Synthetic Intelligence Just run: python launch.py Then type your questions. Type 'quit' to exit. """ import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from src.brain.inference import InferenceEngine def main(): print("\n" + "=" * 60) print(" 🧠 VITALIS CORTEX HYBRID v1.0") print(" Ferrell Synthetic Intelligence") print("=" * 60) print("\nBooting architecture...") engine = InferenceEngine(auto_download=True) print("\n" + "=" * 60) print("āœ… ONLINE. Ready for queries.") print("=" * 60) print("\nCommands:") print(" /stats — Show session statistics") print(" /verbose — Toggle verbose mode (show pipeline internals)") print(" /reset — Clear memory and start fresh") print(" /quit — Exit") print("\nJust type your question and press Enter.\n") verbose = False while True: try: user_input = input("You > ").strip() if not user_input: continue if user_input.lower() in ["/quit", "quit", "exit", "/exit"]: print("\nShutting down Vitalis Cortex...") break if user_input.lower() == "/stats": stats = engine.get_stats() print(f"\nšŸ“Š Stats — Turns: {stats['turns']} | Memory: {stats['memory_entries']} entries | Attestations: {stats['attestation_history']}") continue if user_input.lower() == "/verbose": verbose = not verbose print(f"\nVerbose mode: {'ON' if verbose else 'OFF'}") continue if user_input.lower() == "/reset": engine.reset() print("\nšŸ”„ Memory cleared. Fresh session.") continue # Run the full cognitive pipeline result = engine.think(user_input, verbose=verbose) response = result["response"] meta = result["metadata"] att = result["attestation"] # Display response print(f"\nVitalis > {response}") # Show metadata line lane_emoji = {"LOGICAL": "🧠", "FACTUAL": "šŸ“š", "CREATIVE": "šŸŽØ", "PROCEDURAL": "āš™ļø"}.get(meta["lane"], "🧠") att_emoji = "āœ…" if att["passed"] else "āš ļø" print(f" {lane_emoji} {meta['lane']} | {att_emoji} Attestation: {att['confidence']:.2f} | šŸ”„ Turn {meta['turn']} | šŸ’¾ Memory: {'injected' if meta['memory_injected'] else 'none'}") # Warn if attestation flagged issues if att["flagged"]: print(f" āš ļø Flagged: {', '.join(att['flagged'])}") print() except KeyboardInterrupt: print("\n\nShutting down...") break except Exception as e: print(f"\nāŒ Error: {e}\n") if __name__ == "__main__": main()