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.
Support
If you find Nairobi OS useful, consider supporting the project:
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.
Metadata
Release files for nairobi-os 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nairobi_os-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details for nairobi_os-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
Release files / nairobi_os-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nairobi_os-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 27.4 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8c79370d50e98010e8387d5e9d411c0e2b9de95c4e1a26439124b983fcdec9f3
|
|
BLAKE2b-256 checksum How to use checksums |
098e6f5fdfc5e395e14ab9d9090b341aefa5c494de8841a05e5c81309dcacf4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for nairobi-os 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.