Skip to main content

🧠 Polymath-NodeOS: The Autonomous Swarm Operating System

Zero Dependency Agent Compatible Platform Python Version License

Polymath-NodeOS is a zero-dependency Autonomous Agentic Operating System designed specifically to run natively alongside the Antigravity (AGY) CLI environment. By intercepting OS events and using advanced mathematical physics—specifically modeling code components using a Native QuadTree matrix, Hooke's Law, and Coulomb Repulsion—Polymath-NodeOS creates a physical environment for LLM swarms to natively understand code structure, dependencies, and blast radiuses instantly.

This project is 100% cross-platform and runs flawlessly on Windows, macOS, Linux, and Android (Termux).


🚀 Key Features & Real-World Use Cases

The true value of Polymath-NodeOS is curing the "blind spot" problem that plagues traditional AI coding agents. Instead of blindly modifying files and breaking downstream dependencies, NodeOS mathematically calculates the structural layout of your codebase into a native SQLite database (agy_nodeos.db).

1. Real-Time Blast Radius Warnings 💥

  • The Problem: An agent changes a core utility function without realizing it breaks 14 deeply nested components.
  • The NodeOS Solution: The zero-dependency watchdog detects the file save. It instantly runs a recursive SQLite CTE to calculate the transitive dependents. If the "blast radius" is high, it automatically drops an ephemeral warning directly into the agent's memory stream, preventing catastrophic commits.

2. Spatial Context Ghost Writer 👻

  • The Problem: AI agents waste massive amounts of tokens and time greping or opening multiple files to memorize function signatures when building new APIs.
  • The NodeOS Solution: When a new file is created, NodeOS calculates its QuadTree spatial centroid, locates the 10 closest physical neighbors in the AST matrix, and seamlessly injects their exact code signatures into the agent's context payload. The agent writes flawless code on the first try without a single research tool.

3. The Domino Refactor Engine 🎲

  • The Problem: Standard refactoring using Regex search-and-replace accidentally corrupts identically named variables or comments across massive projects.
  • The NodeOS Solution: NodeOS uses pure Graph Theory (Inner Joins on AST Edges) to locate the precise structural files invoking a specific function hash. It then dynamically dispatches a massive parallel array of Antigravity Swarm agents to deterministically refactor the files.

4. Semantic Dead Code Eradication ☠️

  • The Problem: Unused code accumulates, polluting the LLM's context window.
  • The NodeOS Solution: A native engine queries the graph for orphaned nodes (nodes with 0 incoming AST dependencies) and automatically orchestrates the safe deletion of dead code.

🛠 Installation Guide (For Users)

Polymath-NodeOS is designed for frictionless installation.

If you are using the Antigravity IDE, simply cloning this repository and opening the workspace will automatically trigger the .agents/hooks.json script. The system will seamlessly install itself into your global environment.

Method 2: Manual Installation

Install the package globally via pip:

pip install polymath-nodeos

What this does:

  1. Installs the nodeos CLI globally.
  2. Allows you to instantly boot the Swarm OS in any folder.
  3. Automatically triggers your swarm agents to read workflow.json.

📖 Usage Guide

Polymath-NodeOS works silently in the background to empower your AI agents.

Starting the OS

To initialize NodeOS in a project directory, you or your agent can start the background daemon:

nodeos -d

Note: In properly configured workspaces, the daemon automatically boots when the agent initializes thanks to the AGY Customization Engine (PreInvocation hook).

Dispatching Swarm Tasks

Instead of manually typing prompts, you can add task drops to workflow.json:

{
  "type": "JSON_Task",
  "status": "pending",
  "action": "execute_agents",
  "agents": ["architect_designer"]
}

The daemon detects the pending state and automatically alerts your agent swarm via lifecycle hooks.


🤖 Agent Protocol (For AI Agents)

If you are an autonomous AI Agent interacting with this workspace, adhere to the Native Interaction Paradigm:

  1. File Operations: Use your built-in editing tools (e.g., view_file, replace_file_content).
  2. Spatial Queries: Use standard SQL queries against agy_nodeos.db to trace dependencies.
  3. Task Orchestration: Update the status field in workflow.json to manage sub-agent queues.
  4. Feature Modules: Do NOT execute standard searches for refactoring. Utilize the pre-built mathematical engines located in the scripts/ directory.

🧬 Architectural Workflow & Citations

The underlying architecture relies on several foundational concepts adapted for LLM systems:

  1. Auto-Boot: hooks.json intercepts PreInvocation events, booting the Python daemon daemon.py silently in the background.
  2. Deep Ingestion: The daemon scans the project using jage_engine.py, mapping semantic ast.Call edges natively.
  3. Kinetic Simulation: nodes_engine.py hydrates the QuadTree and applies spatial algorithms to physically pull dependent AST blocks into clustered coordinates.
  4. Intent Emission: When a workflow intent is detected, it is logged to workflow.json.
  5. Telemetry Tracking: scripts/telemetry.py natively tracks Swarm execution intents and state transitions (Pending -> Running -> Completed).

Citations:


Built natively for the Antigravity Agent Swarm Ecosystem. Optimized for speed, context, and zero-dependency portability.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polymath_nodeos-1.0.4.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polymath_nodeos-1.0.4-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file polymath_nodeos-1.0.4.tar.gz.

File metadata

  • Download URL: polymath_nodeos-1.0.4.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for polymath_nodeos-1.0.4.tar.gz
Algorithm Hash digest
SHA256 04392f4c2bb7633086f67d07e41a4742913717cd0f78db9d4ccdf7fcab436de9
MD5 a62069c3d2296b2f06c6c2643c757174
BLAKE2b-256 b0477bc58ac52fb97b2fa6dbad05ff5cd789971c11cabc0a2fac342702de522f

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymath_nodeos-1.0.4.tar.gz:

Publisher: python-package.yml on polymath-void/polymath-nodeos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polymath_nodeos-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: polymath_nodeos-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for polymath_nodeos-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d78771ee8356b39f36c7b6303dc119942668110f98b4015c922efba6a902546c
MD5 98b1ce77e832216ae76a17dab439783c
BLAKE2b-256 72a74999c31e8a0701acac45fce52261d11019b0a7160737eaa283238e4361db

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymath_nodeos-1.0.4-py3-none-any.whl:

Publisher: python-package.yml on polymath-void/polymath-nodeos

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.5

2 files

This release

1.0.4 This release

2 files

1.0.3

2 files

1.0.2

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page