Nairobi OS: Heavy Iron Data Science Infrastructure with Lagos Vision (Hardware-Accelerated Zero-Copy Rendering)
Project description
English | 简体中文 | Español | Deutsch
Nairobi OS
Overview
Nairobi OS is a high-performance, distributed AI and data science infrastructure designed for extreme resource efficiency. It enables processing of massive datasets in constrained environments (Edge, IoT, Serverless) by leveraging a specialized Rust-based refinery daemon, and provides Computer Use without pixels via its MCP-compliant accessibility bridge.
By utilizing kernel-level features such as io_uring, memfd, and Huge Pages, Nairobi OS achieves sub-millisecond IPC overhead and zero-copy data pipelines.
Key Features
- Computer Use Without Pixels: Interacts directly with the Linux desktop through AT-SPI2 and the TOON (Token-Oriented Object Notation) compression algorithm, bypassing OCR or visual processing for AI agents.
- Zero-Copy Ingestion: Hardware-accelerated data loading using
io_uringand 1GB Huge Pages. - Hardware-Accelerated Visualization: Interactive Jupyter plotting via the Lagos Vision engine (
wgpuandegui). - Fused Analytics Pipeline: Ingest, crunch, and correlate data in a single D-Bus round trip.
- Kernel-Bypass Performance: Vectorized analytics leveraging Polars and Rayon for maximum hardware saturation.
- Sovereign Interface: A fluent Python API that hides the complexity of low-level IPC and memory management.
Architecture
Nairobi OS is built on a triad of specialized components connected via D-Bus and shared memory:
- Nairobi Axum Refinery: The high-performance Rust core. Manages raw data ingestion and parallelized analytics.
- Nairobi Hub: The IPC orchestrator. Coordinates file descriptors and signals between the refinery and clients.
- Lagos Vision: The visual cortex. A headless rendering engine that maps
memfdhandles directly into the GPU pipeline. - Nairobi Connector: The semantic bridge. An MCP server exposing the Linux desktop's accessibility tree to LLMs.
- Nairobi Python: The high-level bridge. Provides a Pythonic interface to the entire Rust ecosystem.
Installation
From PyPI
pip install nairobi-os
Build from Source
-
Clone the Repository:
git clone https://github.com/KevinKenya/nairobi-connector-open-source cd nairobi-connector-open-source
-
Setup Virtual Environment:
python3 -m venv .venv source .venv/bin/activate pip install maturin pyo3-build-config zbus anywidget traitlets
-
Build the Entire Stack:
./build_wheel.sh
Usage
Data Analytics
import nairobi_os
# Ignite the refinery
nairobi_os.connect()
# Ingest data into a SovereignFrame
df = nairobi_os.read_csv("dataset.csv")
# Perform vectorized analytics
print(f"Mean: {df.column_name.mean()}")
# Spawn interactive visualization
df.plot()
Computer Use (MCP Server)
AI agents using the Nairobi Connector should follow this fundamental loop via MCP tools:
- Target a window using
nairobi_find_window. - Observe the current state via
nairobi_get_ui_map. - Read the TOON
[ID: N]of the desired interactive element. - Execute an action on that element via
nairobi_interactornairobi_type_text.
System Configuration (Contributor Guide)
Huge Pages
The refinery engine prioritizes 1GB Huge Pages for zero-copy buffers. To enable these on your host:
echo 1 | sudo tee /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
Note: If 1GB pages are unavailable, the engine will automatically fall back to Transparent Huge Pages (THP).
io_uring and SQPOLL
The DiracEngine uses io_uring with SQPOLL for maximum I/O throughput.
License
This project is licensed under the Apache License 2.0. (Note: Portions of the TOON format and bridge implementation are credited to The TOON Authors.)
© 2026 Kevin Chege. All Rights Reserved.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nairobi_os-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nairobi_os-0.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 19.5 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f4ab7ee8ae260ec2f09f9a2e94abdc19ca7909a4c65f5dfad1392cffa13463
|
|
| MD5 |
5378be85295b2c642ec891d0b9476537
|
|
| BLAKE2b-256 |
89623f7eb72a67e0472fb59e0e7676d475207626c09ce4c7c2700376c910a61e
|