AI Agent Runtime: Why the Kernel Bet Is Smaller Than It Looks
This article examines the argument that AI agents need an operating system rewritten from the kernel up, and separates the parts that genuinely require kernel-level enforcement from those that do not. It breaks down the four capability gaps agents face—identity, permission, budget, and memory—explains why only policy and budget enforcement must live in the kernel, and why putting inference inside the kernel is a design mistake. It also covers the driver and ecosystem walls that constrain adoption order, the real opportunity in large-scale multi-agent governance, and a minimal implementation checklist for engineers.
1. The Starting Point: The Foundation Agents Run On Was Built for Humans
Over the past two years, the capability boundary of agents has expanded rapidly from “can talk” to “can act”: they read files, call APIs, write code, and run long multi-step tasks. But the runtime environment they depend on is almost entirely inherited from a set of assumptions designed for a human operator—someone sitting at a terminal, with a complete account identity, expressing intent one command at a time, bearing their own mistakes, and restraining their own resource consumption.
All four assumptions break down in an agent scenario. An agent has no natural identity; its intent is generated in batches; its errors can amplify at hundreds of times per second; and its resource consumption is driven by an objective function rather than a wallet. This has produced a new proposition: since the foundation does not fit, rewrite the operating system from the kernel layer so agents can control the computer directly. A startup team with a background from a quantitative trading firm has publicly claimed this as a world-first approach, and has attracted researchers with operating system backgrounds to join.
The value of this direction needs to be unpacked. The conclusion up front: agents do need a runtime of their own, but the part that genuinely must enter the kernel is very small; the more an operating system is designed for AI, the less AI should be inside the kernel.
2. The Four Things Agents Actually Lack: Identity, Permission, Budget, Memory
Turning the slogan “agents need a new foundation” into engineering lands on four capability gaps.
Identity: An agent is not a user, and it should not be a shared service account either. It needs credentials that can be issued, rotated, revoked, and attributed to a specific task instance. Without an independent identity, the audit log records only that “some application did something,” and incident review cannot trace back to a specific decision chain.
Permission: What an agent needs is not “can it read this directory,” but “in this step of this task, can it perform this class of operation on this set of resources.” This is a capability-token problem with scope, expiry, and context—not a static ACL problem.
Budget: This is the most easily overlooked item, and the most fatal. A human operator’s resource consumption has a natural physiological ceiling; an agent’s does not. A planner stuck in a loop can burn through compute and external API quota equivalent to dozens of full manual scans within minutes. Budget must be a first-class citizen: measurable, deductible, and capable of hard interruption.
Memory: An agent needs state storage that persists across sessions, is retrievable, and supports selective forgetting. This involves tiered caching, vector retrieval, and separate storage of structured facts and raw traces. It is essentially a storage and retrieval problem, not a kernel problem.
Of these four gaps, part of the first three and most of the fourth can be solved in a runtime layer above the operating system. The only thing that truly cannot be bypassed in user space is this: when the agent is itself the initiator, the executor, and the constrained party, who enforces the constraints.
3. Why Only “Enforcement of Permission and Budget” Must Enter the Kernel
User-space constraints have a structural flaw: the enforcer and the constrained party are processes within the same trust domain. An agent can invoke system calls, fork child processes, load local libraries, and execute arbitrary code through an interpreter. Any “access forbidden” or “call limit” written at the application layer sits inside its capability radius—it can be bypassed, forgotten, or invalidated by an abnormal exit.
The value of kernel space is not that it is “smarter,” but that it “cannot be modified by the constrained party.” This compresses the design goal into one very narrow semantic:
The kernel does exactly one thing:for every resource access by any subject (including the agent itselfand its derived processes), perform one policy decision and one budget charge;if the decision fails or the budget is exhausted, the operation is deniedbefore it reaches the device driver.
Three hard design constraints follow from this.
First, the kernel must contain no inference. Once a policy decision depends on model output, the decision becomes probabilistic, susceptible to prompt injection, and non-reproducible. The kernel must perform only deterministic, formalizable matching and arithmetic.
Second, policy and budget must be bound to the process tree, not to a session or an application. The typical agent behavior is to spawn child processes and call external interpreters; if the quota hangs on the parent process, a single fork completes the escape.
Third, failure must default to deny and must not be cached. Any “optimization” of policy decisions—for example, caching allow results per subject—reopens a bypass window.
The minimal kernel hook in pseudocode:
/* Illustrative: the single entry point for all resource access, logically in kernel space */int agent_gate(struct subject *s, struct resource *r, enum op op) {if (!policy_match(s->token, r, op)) return DENY; /* default deny */if (budget_try_charge(s->cgroup, cost(r, op)) < 0)return DENY; /* hard budget interruption */return ALLOW;}
Note that there is no “intelligence” in this code. All of its complexity lies in correctness and non-bypassability, not in flexibility. Flexibility should be pushed to the policy generation side: an upper-layer system issues tokens dynamically based on task semantics, and the kernel only validates and charges.
4. The Overrated Part: The Kernel Is Not the Main Battlefield
Cramming identity, memory, scheduling, and orchestration into the kernel all at once is the most common technical temptation for projects like this, and the largest source of risk. There are three reasons.
First, the change cost and failure radius of the kernel are extremely asymmetric. A user-space crash affects one process; a kernel defect affects an entire machine or even an entire cluster, and is hard to canary and hard to roll back.
Second, agent capabilities iterate on a cycle measured in weeks, while kernel stability cycles are measured in years. Putting fast-evolving policy semantics into the slowest layer locks the whole system to its most conservative component.
Third, and most critically: the more AI there is in the kernel, the more reason AI has to modify the very rules that constrain it. A component with planning capability, if it holds write access to the policy chain, reduces the permission system to a suggestion.
A more reasonable layering is therefore:
| Layer | Responsibility | Contains intelligence |
|---|---|---|
| Application/task layer | Goal decomposition, tool selection, result validation | Yes |
| Runtime layer | Identity issuance, token scoping, memory access, orchestration and retry | A little, auditable |
| Policy generation layer | Produces permission and budget parameters from task semantics | Yes, output must be verifiable |
| Kernel/isolation layer | Policy validation, budget charging, resource isolation, audit persistence | No, purely deterministic |
5. Two Walls: Drivers and Ecosystem Decide the Adoption Order
The failure of a new kernel usually does not happen at the technical layer, but at two walls.
The driver wall: The value of agents depends heavily on peripherals and accelerators. Any new kernel that cannot reuse the existing driver model effectively requires rewriting support for every device class, which is engineering-infeasible. The viable path is to keep binary compatibility with existing driver interfaces and make the new semantics a pluggable interception layer over existing system call paths, achieving “zero driver changes” on compatibility first.
The ecosystem wall: Applications, runtime libraries, and monitoring and logging toolchains all assume an existing system call contract. Changing the contract shifts migration cost onto every upper layer. The adoption order is therefore almost locked by these two walls: establish a foothold on servers and dedicated devices first—these environments have relatively converged application combinations, can be delivered as a whole, and have the most rigid requirements for isolation and quota. The desktop and general-purpose terminals are the least appropriate priority.
6. The Bigger Opening: The Organizational Problem of Hundreds and Thousands of Agents
If the opportunity window at the kernel layer is actually narrow, where is the real gap? It lies in the organizational problem that appears after multi-agent scaling, which is closer to “scheduling and governance in distributed systems” than to an “operating system kernel.”
The list of problems to solve includes: how tasks are decomposed and handed off between agents; how concurrent writes to the same resource avoid mutual contamination; how to isolate one agent’s failure without dragging down the whole system; how a global budget is hierarchically allocated and reclaimed across teams, tasks, and individuals; and how to reconstruct a complete decision chain spanning multiple agents in an audit. The answers to these problems already have substantial reusable experience in mature paradigms such as container orchestration, message queues, leases and quotas, and distributed tracing. What is missing is a layer of abstraction aimed at agent semantics.
When landing on the cloud, the corresponding general capability categories are clear: container platforms carry isolation and elasticity; object storage and message queues carry state and task distribution; logging services and monitoring and alerting carry audit and budget visualization; and key management capabilities carry identity and token rotation. Baidu AI Cloud provides exactly these building blocks in such general categories, and specific selection should be evaluated against your own isolation strength and audit requirements.
7. A Minimal Viable Checklist for Implementers
- Establish a subject model first: one identity per task instance, with short-lived, revocable, attributable credentials.
- Make budget a first-class resource: define the unit of measure, the charging granularity, and the behavior on exhaustion (deny, not degrade).
- Attach constraints to the process tree and resource labels, not to applications or sessions.
- Keep the kernel/isolation layer at zero inference; policy is generated above and validated below, and only verifiable structured parameters pass between the two sides.
- Default deny, do not cache failures, persist the full audit log, and make it non-writable by the constrained subject.
- Validate on server and dedicated device form factors first, keeping compatibility with existing drivers and the system call contract.
- Leave orchestration, memory, and retry in the runtime layer, and solve scaling problems with mature distributed paradigms rather than a new kernel.
8. Conclusion: Where to Place the Bet
“Rewriting the foundation from the kernel for agents” is a proposition with a correct direction but an exaggerated boundary. The semantics that truly must be pushed down are narrow enough to fit in a few dozen lines of code, and they precisely require the kernel to stay minimal and free of intelligence; the real engineering difficulty lies in driver compatibility, ecosystem migration, and multi-agent governance. Betting on a “smarter kernel” will likely lose both stability and ecosystem at once; betting on “non-bypassable constraints plus a composable agent runtime” is the choice with a better risk-reward ratio.
