Towards Agentic OS: An LLM Agent Framework for Linux Schedulers
Abstract
Operating system schedulers suffer from a fundamental semantic gap, where kernelpolicies fail to understand application-specific needs, leading to suboptimal perfor-mance. We introduce SchedCP, the first framework that enables fully autonomousLarge Language Model (LLM) agents to safely and efficiently optimize Linuxschedulers without human involvement. Our core insight is that the challenge isnot merely to apply a better LLM, but to architect a decoupled control plane thatseparates the AI’s role of semantic reasoning ("what to optimize") from the sys-tem’s role of execution ("how to observe and act"). Implemented as Model ContextProtocol(MCP) server, SchedCP provides a stable interface with three key services:a Workload Analysis Engine, an evolving Scheduler Policy Repository, and anExecution Verifier that validates all AI-generated code and configure before deploy-ment with static and dynamic analysis. We demonstrate this architecture’s powerwith sched-agent, a multi-agent system that autonomously analyzes workloads,synthesizes custom eBPF scheduling policies, and deploys them via the sched_extinfrastructure. Our evaluation shows that SchedCP achieves up to 1.79x perfor-mance improvement and 13x cost reduction compared to naive agentic approaches,all while maintaining high success rate. The code will be open-sourced.