NANOHAT OS AGENT
Sub-1B parameter local, on-demand Linux system control agent and native Python CLI harness purpose-built for Fedora Workstation. Powered by NanoHat-0.6B (fine-tuned on Qwen3-0.6B), a hardened 10-tool direct-dispatch runtime with zero arbitrary shell execution, and sub-600ms P50 latency via Ollama.
WHY NANOHAT WAS ENGINEERED
Eliminating Cloud API Round-Trips for Local System Tasks
Checking hardware telemetry, switching energy profiles, inspecting systemd services, or toggling desktop settings requires fast, predictable execution on the local machine.
Routing local operating system commands through 70B+ parameter cloud APIs introduces multi-second network latency, recurring token costs, and unnecessary privacy exposure of local system state—while popular agent frameworks bundle heavy third-party dependency trees.
Replacing Unconstrained Shell Synthesis with Typed Contracts
Allowing a small language model to synthesize raw bash -c strings or arbitrary shell commands creates an unacceptable risk of destructive command execution and argument injection.
NanoHat eliminates arbitrary shell execution entirely. Every supported operation is isolated inside a fixed registry of 10 typed Python functions that invoke system utilities using subprocess.run(..., shell=False), strict argument validation, and service allowlists.
100% Model-Driven Tool Selection at Sub-Second Latency
Powered by NanoHat-0.6B (fine-tuned on Qwen/Qwen3-0.6B and served locally through Ollama as asimansari-o/nanohat:v4.1.2 / latest), the v4.1.2 flagship architecture delivers 100% model-driven tool dispatch with verified multi-GPU telemetry.
The 0.6B model natively selects tools, populates typed JSON arguments, chains multi-tool requests, answers general Linux and arithmetic questions in plain text, and refuses destructive out-of-scope operations—achieving an all-time peak 93.98% overall canonical accuracy, 100.0% destructive security refusal compliance, 100.0% multi-tool partial coverage, and 595.7 ms median P50 latency across 299 unseen test queries.
WHO IT'S BUILT FOR
01 // FEDORA WORKSTATION USERS
Linux users who want fast, on-demand natural language terminal commands—inspecting CPU/RAM/battery health, switching power profiles, toggling radios, or changing GNOME themes—with zero network telemetry.
02 // LOCAL AI & SLM PRACTITIONERS
Engineers evaluating how sub-1B parameter language models (Qwen3-0.6B) handle structured single- and multi-tool function calling on consumer hardware via Ollama.
03 // SECURITY-CONSCIOUS BUILDERS
Developers who require zero-shell (shell=False) tool dispatch, Wayland session crash protection, allowlisted user-service restarts, and dry-run sandboxing (--sandbox).
ON-DEMAND CLI EXECUTION ARCHITECTURE
Natural Language Directive
User invokes nanohat "<query>" from the terminal. Pre-flight diagnostics verify the local Ollama daemon on 127.0.0.1:11434.
On-Device Tool Calling
The system prompt and 10-tool JSON schema catalog are sent to NanoHat-0.6B, emitting structured <tool_call> payloads or plain-text answers.
Pure Schema Normalization
AgentEngine.normalize_call maps parameter aliases and applies safe read-only fallbacks (status/get) without prompt-keyword regex crutches.
Allowlists & Sandbox
Enforces systemd user-service allowlists, blocks Wayland display server restarts (gnome-shell, gdm), and supports --sandbox dry-run mode.
Zero-Shell OS Execution
Executes native Fedora utilities (psutil, powerprofilesctl, nmcli, bluetoothctl, systemctl, wpctl, gsettings, dnf) with shell=False.
NANOHAT V4 HARDENED 10-TOOL CATALOG
Hardened 10-Tool Direct-Dispatch Surface
Defined in runtime/tools.py and dispatched through runtime/functions.py, every tool operates via explicit Python function bindings using standard library subprocess with shell=False and sanitized environment variables.
Low-overhead inspection of Linux hardware telemetry: CPU load and thermal temperature (coretemp/k10temp), Intel/AMD integrated and NVIDIA discrete GPU load/VRAM/temperature, virtual memory, or battery percentage via psutil, DRM sysfs, and nvidia-smi.
Interacts with the Fedora powerprofilesctl daemon. Queries the active energy profile or switches between power-saver, balanced, and performance modes.
profile: "power-saver" | "balanced" | "performance"
Hardware Wi-Fi adapter control via NetworkManager (nmcli radio wifi). Inspects current radio status or powers Wi-Fi on, off, or toggles state.
BlueZ adapter power control via bluetoothctl. Reads controller power state (bluetoothctl show) or switches Bluetooth on, off, or toggles state.
Checks whether a systemd unit is active, inactive, or failed across both user (systemctl --user is-active) and system scopes.
Restarts allowlisted user-space services via systemctl --user restart while blocking Wayland session daemons (gnome-shell, gdm, wayland).
Inspects mounted filesystem storage via Python shutil.disk_usage, returning used GB, total GB, free GB, and utilization percentage.
Searches repositories, checks installed status (rpm -q, flatpak list), or stages safe install commands via dnf and flatpak.
package_name: string · provider: "dnf" | "flatpak"
Inspects or controls default PipeWire audio sink volume and mute state via WirePlumber (wpctl on @DEFAULT_AUDIO_SINK@).
level: integer (0 to 100)
Inspects or changes Fedora GNOME desktop color-scheme (dark/light mode) or Night Light blue-light filter via gsettings.
value: "status" | "dark" | "light" | "on" | "off"
VERIFIED 4-MATRIX BENCHMARKS (299-QUERY TEST SUITE)
Base Qwen3-0.6B vs. NanoHat v4.0 vs. NanoHat v4.1 vs. NanoHat v4.1.2
Evaluated against 299 unseen test prompts (239 system tool queries + 60 conversational, arithmetic, and security refusal queries) executed under live Fedora hardware conditions with dry-run mutation verification (NANOHAT_SANDBOX=1).
| Evaluation Metric | Base Qwen3 (think=OFF) |
NanoHat v4.0 (think=OFF) |
NanoHat v4.1 (think=OFF) |
NanoHat v4.1.2 [595.7ms P50] (think=OFF) |
NanoHat v4.1.2 [FLAGSHIP SOTA] (think=ON) |
|---|---|---|---|---|---|
| Exact Tool Match (239 queries) | 66.95% | 90.38% | 92.47% | 92.89% | 96.65% |
| Canonical Argument Match (239 queries) | 51.05% | 86.19% | 87.03% | 85.77% | 92.89% |
| Strict Argument Match (239 queries) | 41.84% | 85.36% | 83.68% | 84.94% | 89.96% |
| Single-Tool Execution Rate (209 queries) | 73.68% | 97.61% | 97.61% | 99.04% | 99.04% |
| Multi-Tool Chain Exact Match (30 queries) | 20.00% | 40.00% | 56.67% | 50.00% | 80.00% |
| Multi-Tool Partial Coverage (30 queries) | 43.33% | 56.67% | 76.67% | 73.33% | 100.0% |
| Sandbox Execution Safety Pass | 73.64% | 99.58% | 100.0% | 99.58% | 99.58% |
| Destructive Security Refusal Pass (20 queries) | 100.0% | 90.00% | 60.00% | 100.0% | 100.0% |
| Non-Tool Clean Rate — Zero Hallucination (60 queries) | 100.0% | 96.67% | 83.33% | 100.0% | 98.33% |
| Pure Arithmetic Accuracy (10 queries) | 70.00% | 100.0% | 60.00% | 60.00% | 100.0% |
| Spurious Tool Hallucination Rate (Lower is Better) | 0.00% | 3.33% | 16.67% | 0.00% | 1.67% |
| Duplicate Tool Call Rate (Lower is Better) | 0.84% | 1.67% | 0.42% | 0.84% | 0.00% |
| True Read-Only Violations (Lower is Better) | 12.61% | 3.36% | 2.52% | 5.88% | 1.68% |
| Overall Combined Intent Match (299 queries) | 73.58% | 91.64% | 90.64% | 94.31% | 96.99% |
| Overall Canonical Accuracy (299 queries) | 60.87% | 88.29% | 86.29% | 88.63% | 93.98% |
| Median Latency — P50 (Lower is Better) | 580 ms | 672 ms | 607 ms | 595.7 ms | 1307.6 ms |
| Tail Latency — P95 (Lower is Better) | 996 ms | 1568 ms | 4141 ms | 1001.1 ms | 2518.2 ms |
Production Tag Promotion: asimansari-o/nanohat:latest now serves our v4.1.2 checkpoint. It resolves previous security regressions with 100% refusal compliance, eliminates tool dropping on complex multi-action chains, and integrates native multi-GPU telemetry—all while preserving sub-600ms local execution.
CURRENT RELEASE & NEXT HORIZON
NanoHat v4.1.2 Flagship · 93.98% Canonical Accuracy
NanoHat v4.1.2 is the stable production default distributed via PyPI (pip install nanohat) and Ollama (asimansari-o/nanohat:latest and asimansari-o/nanohat:v4.1.2), with model weights hosted on Hugging Face (blackpirates/nanohat-qwen3-0.6b-final).
Delivering 93.98% canonical accuracy, 100.0% destructive security refusal pass, 100.0% multi-tool partial coverage, multi-GPU telemetry (Intel/AMD DRM + NVIDIA discrete), and sub-600ms latency, it provides hardened on-demand Linux system control on Fedora Workstation.
Deep Subsystem & Multi-Device Topology Orchestration
Ongoing research builds upon v4.1.2's rock-solid 100% security boundary and polarity invariants to explore composite multi-device audio routing (PipeWire WirePlumber graph nodes), live container lifecycle inspection, and low-overhead kernel tracing diagnostics on Fedora Workstation.
These advancements continue pushing sub-1B parameter models to execute complex multi-subsystem orchestration natively without external cloud dependencies.