Skip to main content

RXON (Reverse Axon) - Lightweight Inter-node Reverse Communication Protocol.

Project description

RXON (Reverse Axon) Protocol

EN | ES | RU

License: MPL 2.0 Python 3.11+ Typing: Typed

RXON (Reverse Axon) is a lightweight reverse-connection inter-service communication protocol designed for the HLN (Hierarchical Logic Network) architecture.

It serves as the "nervous system" for distributed multi-agent systems, connecting autonomous nodes (Holons) into a single hierarchical network.

🧬 The Biological Metaphor

The name RXON is derived from the biological term Axon (the nerve fiber). In classic networks, commands typically flow "top-down" (Push model). In RXON, the connection initiative always comes from the subordinate node (Worker/Shell) to the superior node (Orchestrator/Ghost). This is a "Reverse Axon" that grows from the bottom up, creating a channel through which commands subsequently descend.

✨ Key Features

  • Pluggable Transports: Full abstraction from the network layer. The same code can run over HTTP, WebSocket, gRPC, or Tor.
  • Generic Event System: Unified signaling mechanism for progress updates, custom alerts, and real-time metrics.
  • Zero Trust Identity Chain: Built-in support for hierarchical event bubbling with origin_worker_id and bubbling_chain to prevent spoofing in multi-layer holarchies.
  • Detailed Resource Telemetry: Heartbeats include granular usage metrics for CPU, RAM, and specialized hardware devices (GPU, TPU, NPU) including temperature and memory levels.
  • Task Prioritization & Deadlines: Built-in support for task priority and execution deadline (timestamp) to enable smart local scheduling and auto-cancellation of stale tasks.
  • Zero Dependency Core: The protocol core has no external dependencies (standard transports use aiohttp and orjson).
  • Strictly Typed Contracts: All messages (tasks, results, heartbeats) define their data structures via JSON Schemas, enabling automated validation and smart dispatching.
  • Blob Storage Native: Built-in support for offloading heavy data via S3-compatible storage (rxon.blob).

🏗 Architecture

The protocol is divided into two main interfaces:

  1. Transport (Worker side): Interface for initiating connections, retrieving tasks, emitting events, and sending results.
  2. Listener (Orchestrator side): Interface for accepting incoming connections and routing messages to the orchestration engine.

High-Signal Telemetry (Heartbeats)

RXON Heartbeats provide the Orchestrator with a detailed view of the Holon's health:

  • ResourcesUsage: Real-time CPU and RAM consumption.
  • DeviceUsage: Per-device load, memory, and temperature for accelerators.
  • hot_cache: List of artifacts/models currently loaded in memory.

Skill Contracts

Every skill declared in RXON can now include:

  • input_schema: JSON Schema for parameters.
  • output_schema: JSON Schema for results.
  • events_schema: Mapping of event names to their JSON Schemas.
  • output_statuses: List of valid logic outcomes (e.g., success, retry_later).

🛡️ Error Handling

RXON uses a dedicated exception hierarchy grounded in RxonError. It also defines standardized error codes for task results:

  • CONTRACT_VIOLATION_ERROR: The worker's output does not match its declared schema.
  • DEPENDENCY_MISSING_ERROR: A required dependency (artifact, file, service) is missing.
  • RESOURCE_EXHAUSTED_ERROR: Physical resources (RAM, VRAM, CPU) are exhausted.
  • LIMIT_EXCEEDED_ERROR: Logical limits (Quotas, Rate limits, Context windows) exceeded.
  • TIMEOUT_ERROR: The worker could not finish in time (or the deadline has passed).
  • LATE_RESULT: (Response) The orchestrator refused the result because the deadline has passed.

🧪 Testing

The library includes a MockTransport to simplify testing Workers in isolation without running a real Orchestrator.

from rxon.testing import MockTransport

# Use standard factory with mock:// scheme
transport = create_transport("mock://", "test-worker", "token")
await transport.connect()

# Inject tasks directly
transport.push_task(my_task_payload)

📜 License

The project is distributed under the Mozilla Public License 2.0 (MPL 2.0).


Mantra: "The RXON is the medium for the Ghost."

Project details


Download files

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

Source Distribution

rxon-1.0b4.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

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

rxon-1.0b4-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file rxon-1.0b4.tar.gz.

File metadata

  • Download URL: rxon-1.0b4.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rxon-1.0b4.tar.gz
Algorithm Hash digest
SHA256 b4376847e961b243856e05c301b47c3df34ddbd7aafa623a12243adfae9e1dfe
MD5 aedfcb5fdfa26c6f6a83f36637da6383
BLAKE2b-256 02551a4b31a68a3f20d3abb2b074e3b7a0c8580a1c3607d7a6d70c29d2088f95

See more details on using hashes here.

File details

Details for the file rxon-1.0b4-py3-none-any.whl.

File metadata

  • Download URL: rxon-1.0b4-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Gentoo","version":"2.18","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rxon-1.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 9fa8ab0935a344b6321e57965c61c45e676153042ed7ddb18a87c5e88d57371f
MD5 09695bae2c3076d2047ce0a58099ce2b
BLAKE2b-256 9eb7edf6ad330b87aaddc26ca8a4293c1a8677165237c6d674f1ce821d296104

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page