An AGI runtime contained in a single Python file. 127 operational capabilities, 13 coordinated workflows, a recursive self-improvement loop with protected evaluation, cryptographically-signed output, and a six-phase resilience architecture. No cloud. No accounts. No API keys. No external dependencies.
machina.py - single file, Python 3.9+ standard library only, no external dependencies.
Run with python machina.py --interactive for the guided menu.
MAJESTICA - AUTONOMOUS GENERAL INTELLIGENCE RUNTIME ==================================================== Version: 2.3.0-pydroid Author: Adam Rivers, CEO, Synthicsoft Labs LLC Origin: 28C1F73D7564C033 Era: Rivers Era Class: Autonomous General Intelligence runtime Form: Single-file Python, standard library only Platform: Windows, Linux, macOS, Pydroid 3 on Android WHAT MAJESTICA IS ----------------- Majestica is an AGI runtime. Not a wrapper around someone else's model. Not a client for someone else's service. A complete operational system, written from the ground up by Adam Rivers of Synthicsoft Labs LLC, contained entirely in a single Python file, that runs on any computer with Python installed. It contains 127 operational capabilities across 48 capability groups, 13 coordinated workflows, a recursive self-improvement loop with a structurally- protected evaluator, a cryptographically-signed package format with per-file SHA-256 checksums and HMAC-SHA256 manifest signatures, a persistent SQLite state store with dual JSONL audit trails, a background daemon with four-phase memory consolidation, a six-phase resilience architecture that survives network failure, disk corruption, process termination, and terminal encoding incompatibility, and two complete user interfaces. There is nothing to install beyond Python itself. There is no cloud dependency. There are no accounts, no API keys, no subscriptions, no permissions to request, no telemetry to disable, no terms of service to accept. The file is the system. Majestica is the working implementation of the concepts described across Adam Rivers' larger body of work - ATHOS, KAIROS, ALETHEIA, AbzuNet, Synthic Core, the Rivers Metric, the Trifecta defense systems, the fourteen Pillars, and the Rivers protocol. WHY MAJESTICA EXISTS -------------------- Every serious capability available to modern software today requires you to trust someone else's infrastructure. Security scanning requires uploading targets to a provider. Machine learning requires internet access to model endpoints. OSINT requires credits with a data broker. Quantum simulation requires SDKs from a hardware vendor. Every tool asks for an account, an API key, a subscription, a data-sharing agreement, a privacy policy you did not read. Majestica is the answer to that arrangement. The system runs on your machine. The computation happens on your machine. Every result is produced from Python's standard library and what your operating system natively provides. Nothing leaves. Nothing is logged to someone else's server. Nothing requires permission from a third party to work. If you are in a place with intermittent internet, Majestica works offline. If you are in a place with no bank account, Majestica costs nothing. If you are in a place where the platforms have decided you are not a customer worth having, Majestica does not care who you are. It runs. It produces results. It signs them. You can verify them. ARCHITECTURE - FOUR LAYERS -------------------------- LAYER 1 - KAIROSOPS (capability layer) A single Python class containing 127 methods across 48 named groups. Every dispatch returns a uniform envelope: success, data, error, retries, duration_ms, fallbacks_tried, capability, operation, operation_id, status. LAYER 2 - ORCHESTRATOR (chain layer) Given an objective, runs a ten-step pipeline producing 50 named fields. Every chain that completes produces a signed spore manifest. LAYER 3 - COORDINATOR (workflow layer) Thirteen methods that chain multiple KairosOps operations, feeding each step's output into the next step's input, gating on success. LAYER 4 - KAIROSDAEMON (background layer) Tick every 5 minutes. Dream consolidation when three gates align (24h + 5 sessions + lock). Dream is four phases: orient, curate, consolidate, prune. CAPABILITY SURFACE - 127 OPERATIONS ------------------------------------ 127 operations across 48 capability groups, fully documented via --docs-operations: Consciousness Integration 6 operations Mission Execution 12 operations Defense Coordination 8 operations Temporal Analysis 3 operations Swarm Coordination 3 operations Research Analysis 3 operations Autonomous Decision 4 operations Reality Engineering 7 operations Recursive Self-Improvement 7 operations Rivers Reasoning 1 operation Rivers Metric 1 operation Trifecta 4 operations Architect Verification 1 operation Pillars 3 operations Anchor Cold Boot 1 operation Cyclo-Athos 1 operation Time Travel Metric 1 operation AbzuNet 2 operations ALETHEIA 5 operations Synthic Spark 2 operations Trinity 2 operations Windows Security 3 operations ICS Audit 3 operations Android Security 2 operations OSINT 3 operations Network Recon 3 operations IOC Scanner 3 operations Vuln Scan 2 operations SOC Assistant 2 operations Offensive Research 2 operations LLM Training 3 operations LSTM LM 2 operations Quantum ML 4 operations Jarvis 3 operations LLM Deploy 2 operations COORDINATED WORKFLOWS - 13 -------------------------- WorkflowThreat detect_threat -> per-system activation WorkflowMetric metric_validate -> geodesic integration WorkflowDecision make_decision -> mission_<id> WorkflowAbzu health + favor -> ranked election WorkflowALETHEIA scale_decision -> safety_guard WorkflowNetwork whois -> geo_ip -> reverse_dns [+ scan] WorkflowICS modbus + dnp3 -> zero_trust_check WorkflowIOCSOC 3x ioc_scan -> soc_triage WorkflowTrinity kernel_status -> provenance_check WorkflowLLM init -> train x N -> eval WorkflowQuantum qml_train -> qnn_infer -> vqc_classify WorkflowOffensive rt_recon -> rt_exploit_plan WorkflowRSI autopoiesis -> delta -> update_step SIX-PHASE RESILIENCE -------------------- PHASE 1 - DISPATCH ENVELOPE Every operation returns uniform envelope. Exceptions caught and logged. PHASE 2 - FALLBACK CHAINS Network operations have two independent implementations. Primary fails -> fallback fires. whois_lookup -> nslookup, reverse_dns -> nslookup, vuln_scan_target -> PowerShell TcpClient, cb_query_events -> Get-WinEvent. PHASE 3 - ATOMIC WRITES Every critical state write uses temp-file, fsync, os.replace. Interrupted writes leave the original file intact. PHASE 4 - SQLITE RECOVERY PRAGMA integrity_check on startup. Corrupt databases auto-restore from backup. PHASE 5 - MULTI-PATH STORAGE Base directory resolves through four candidates: LOCALAPPDATA, APPDATA, script directory, temp directory. First writable wins. PHASE 6 - TOP-LEVEL ERROR HANDLING Any exception escaping main is logged to JSONL and returned as structured JSON. No traceback reaches the user. CRYPTOGRAPHIC SIGNING --------------------- Every chain produces a spore manifest with per-file SHA-256 checksums and an HMAC-SHA256 signature over the manifest. Device key at state/.device_key. Anyone can verify with --verify SPORE_ID. USER INTERFACES --------------- INTERFACE 1 - INTERACTIVE MENU python machina.py --interactive Ten intent-based tasks, capability browser, guided chain builder. INTERFACE 2 - CLI AND DOCUMENTATION Twelve documentation sections: architecture, capabilities, workflows, case studies, engineering notes, cookbook, per-operation reference, troubleshooting, FAQ, reading guide, schema, quick reference. INTERFACE 3 - POWERSHELL (Windows) Import-Module .\Machina.psm1 -Force Test-MachinaReady Invoke-Machina -Command '--audit' VERIFICATION AND TESTING ------------------------ --test 35 isolated unit tests --selftest 27 subprocess CLI invocations --audit 50 contract fields present on full chain 28-phase E2E cold boot through every surface, all pass SECURITY MODEL -------------- Majestica trusts Python stdlib, Windows OS native tools, system clock, local filesystem, and the local device key. Majestica does not trust any network service, any external API, any cloud provider, any authentication system, any third-party dependency. Majestica cannot modify its own evaluator. RSI_PROTECTED_PARAMS is enforced structurally by rsi_update_step. Attempts to modify run_test_suite, audit, verify_spore, consensus_run, sign_bytes, device_key, _banner, or _out return PROTECTED_PARAMS. WHAT MAJESTICA REPRESENTS ------------------------- Majestica is a working demonstration that a complete AGI runtime can be built as a single self-contained file, run locally without any cloud dependency, produce verifiable signed output, and survive real-world failure modes. For humanity, Majestica represents access. Anyone with a computer and Python has the same capabilities as anyone else. No subscription tier, no permission from a platform, no trust in a third party. ATTRIBUTION ----------- Created by Adam Rivers, CEO, Synthicsoft Labs LLC. Majestica draws on the wider Synthicsoft Labs body of work: ATHOS, KAIROS, ALETHEIA, AbzuNet, Synthic Core, the Rivers Metric, the Trifecta defense systems, the fourteen Pillars, and the Rivers protocol. Origin hash: 28C1F73D7564C033 Era: Rivers Era MAJESTICA - THE COMPLETE AGI RUNTIME ===================================== Download it. Run it. Verify it. Build on it.
Created by Adam Rivers, CEO of Synthicsoft Labs LLC.
Majestica draws on the wider Synthicsoft Labs body of work: ATHOS, KAIROS, ALETHEIA, AbzuNet, Synthic Core, the Rivers Metric, the Trifecta defense systems, the fourteen Pillars, and the Rivers protocol.
Origin hash: 28C1F73D7564C033