Skip to content
Kleinia

Agent for OS

The operating system, now scheduled by agents.

Kleinia brings the adaptability of agents to resource scheduling. It understands not just the workload but what you and the system need, and switches scheduling policies as needs change.

Why

Fixed policies cannot keep up with changing workloads.

A conventional operating system fixes its scheduling policies at build time, so one policy has to serve interactive work, builds, local inference and background sync alike, and can only compromise between them. ACOS proposed making agents part of the operating system: agents understand the task and its environment, then make decisions for the system. Kleinia applies this first to resource scheduling.

In Kleinia, scheduling is no longer a fixed default: the resource agent understands what you are doing and picks the best policy for the task at hand, and the policies themselves can be extended, evolve on their own and be shared across the community.

Adaptive scheduling

The resource agent reads the character of each workload, picks the best CPU, I/O and page cache policies for it, and switches them in real time as the load changes.

Policies that follow the load
LAPS recognizes the current workload in real time and switches between policies, instead of betting on one scheduler.
Intelligence decoupled from real time
Agents recognize the workload and decide when to switch; only deterministic policies run in the kernel, so performance never costs safety or overhead.
Resources in concert
CPU, I/O and page cache follow one policy, so a gain in one never becomes a bottleneck in another.

8.91%

average performance gain over EEVDF, the Linux default scheduler

91.7%

lower response latency at most, in latency-sensitive tasks

An extensible scheduling substrate

Scheduling policies for every resource run in the kernel as pluggable modules. A compiled policy passes the kernel’s safety check before it is loaded.

Switch at runtime
Policies load and change at runtime, without rebuilding the kernel or rebooting.
Checked first
Every policy is verified by the kernel before it loads, so it cannot loop forever or touch memory it should not.
Safe fallback
If a policy misbehaves, the system falls back to the default and work carries on.

Self-evolving

When a workload it has never seen turns up, Kleinia analyses it, measures candidate policies and updates its scheduling model in the background, so next time it is ready. The foreground is never disturbed; you will hardly notice it happening.

In the background
Analysis and measurement run asynchronously, so your apps carry on as usual.
Measured, not guessed
Language models only analyse and orchestrate; measurements on this machine decide which policy is better.
Better the more you use it
The more workloads the system sees, the more complete its model, and the better it fits how you work.

Shared experience

What one device learns about scheduling can be shared with others in the community. A new machine does not have to work things out from scratch: with the community’s experience it adapts to all kinds of workloads quickly.

A fast start
With the community’s experience, a new device needs only a few measurements to find good policies for common workloads.
Growing together
Every device’s experience enriches the community, and everyone’s understanding of workloads grows with it.
Only scheduling experience
What is shared is limited to workload characteristics and scheduling results, never your files or personal data.

Research

arXiv 2025

LAPS

Beyond the Monolithic Scheduler: Lightweight Adaptive Policy Switcher for Process Scheduling Optimization

LAPS, our lightweight adaptive policy switcher, recognizes the current workload and switches process scheduling to the best-suited policy at runtime.

Read the paper ↗Code ↗

SOSP 2025

cache_ext

cache_ext: Customizing the Page Cache with eBPF

cache_ext (SOSP 2025) lets page cache policies be written in eBPF and loaded at runtime; Kleinia uses it for the page cache.

Read the paper ↗Code ↗

Next

These capabilities were proposed in ACOS and will arrive in Kleinia over later releases.

Memory agent
Compresses, migrates and reserves memory before pressure builds.
Storage agent
Keeps hot and cold data where each belongs, with backups taken care of.
Diagnosis and repair
Reads the logs, fixes the failing service and explains what it did.
Manage the system in plain language
Updates, settings and troubleshooting, handed to the system agents in a sentence.
The other halfOS for AgentA system built for agents.→