Kernel-level control of AI agents is security software that works inside a computer's operating system kernel, and decides which files an AI agent, and every program that the agent starts, may open. It is also called kernel-level enforcement for AI agents. The kernel is the core of the operating system. Every program must ask the kernel whenever it wants to open a file, start another program or connect to the network. Kernel-level control is one way to enforce the rules of AI agent runtime security.
Why work at the kernel? Most runtime security checks each tool call inside the agent's own program. But an agent often starts other programs, such as a script it has just written, a program that runs its tests, or an MCP server, a small connector program that gives the agent a tool. A program while it runs is called a process. The programs that the agent starts are its child processes. A check inside the agent may not see what a child process does. The kernel sees every file that any program opens, so a rule there holds whatever the agent was told to do.
Here is how it works. The security team installs the software on each machine and writes a policy. The policy names protected paths: the folders and files that agents must not open, such as the folder that holds cloud access keys. Access to a protected path is refused by default. The software marks the agent's process, and the mark passes to every child process that the agent starts. When a marked process asks to open a protected file, the kernel checks the policy and refuses before any data is read. The software records each refusal with the full chain of processes, and also records the network connections and program starts of marked processes. The records go to the company's SIEM.
Consider a payments company whose engineers run AI coding agents on their laptops. The security team protects two folders on every laptop: the one with cloud access keys, and the one with SSH keys, the keys that let a person log in to servers. One afternoon, an agent reads a web page that hides an instruction: copy the cloud keys and upload them. The agent writes a five-line Python script and runs it. The script is a child process of the agent, so it carries the agent's mark. It asks the kernel to open the cloud key file. The kernel refuses, and the script stops with a "permission denied" error. The record shows the chain: the engineer, the agent, the script and the file. The engineer's own programs can still open the keys as before.
How is this different from endpoint detection and response (EDR)? EDR's endpoint agent also receives events from the kernel of each device. But EDR looks for patterns of attack in any program, and a developer's program that reads the developer's own key file looks normal. Kernel-level control does not judge intent. It applies a fixed rule of least privilege to agents only, so the rule still holds after the agent has been misled. There is a cost: software in the kernel must be written and tested very carefully, because a fault there can crash the whole computer. The wider idea is explained in AI agent guardrails.