-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
RootSpace is architected as a hybrid stack to achieve both maximum performance and rapid iteration. The engine is divided into a high-performance Rust Backend and an agile Node.js Dashboard/Integration Layer.
The network layer is built entirely on rust-libp2p. It allows RootSpace nodes to dynamically discover each other, form a mesh network, and communicate without central relays.
-
Multiplexing: We utilize
yamuxfor lightweight stream multiplexing over a single TCP connection. - Security: Noise protocol handshakes ensure all peer-to-peer traffic is encrypted and authenticated.
AI agents deployed to RootSpace do not run as native processes. Instead, they are compiled to WebAssembly (Wasm) and executed within a tightly controlled wasmtime runtime.
- Sandboxing: Memory boundaries and capability-based security ensure agents cannot break out of their execution context.
- WASI Support: Controlled access to the filesystem, network, and environment variables is provided through the WebAssembly System Interface.
Each node maintains its local state (agent metadata, peer routing tables, and telemetry) via an embedded SQLite database.
While the core operations happen in Rust, the user-facing APIs, telemetry aggregation, and web dashboards are served via a Node.js companion process. The Node layer communicates with the Rust engine through strict FFI bindings or local gRPC.
- Bootstrapping: The node starts, initializes its SQLite state, and loads its persistent identity keypair.
-
Discovery: The
libp2pswarm begins mDNS/DHT discovery to find neighboring RootSpace nodes. - Execution: Incoming Wasm agent binaries are queued, validated, and spawned in isolated threads.
- Telemetry: Resource usage (CPU/Memory per agent) is aggregated and exposed to the Node.js dashboard.