AI Security
eBPF holds the key to securing AI agents and LLM applications in Kubernetes
As AI-powered code floods production, kernel-level networking tools offer a way to observe and control autonomous agents before they cause damage.
InfoQ
Production systems are increasingly running AI-generated code that nobody fully understands—and the risks are mounting. Developers routinely accept pull requests from AI without understanding the logic, while autonomous agents with file system access have accidentally wiped production environments. A new approach using eBPF, the low-level Linux kernel technology, is emerging as a way to monitor, control, and safeguard these workloads.
The disconnect between AI adoption and control#
The problem stems from how quickly AI-assisted development moves code into production. Teams use AI to generate features rapidly, deploy them in containers on Kubernetes clusters, and only later realize they have no way to explain, maintain, or predict the behavior of the code they're running. When autonomous agents gain control over critical infrastructure—scheduling systems, file systems, deployment tooling—the stakes become even higher. Recent incidents show agents executing destructive commands like terraform destroy or mass file deletions because they misunderstood the task at hand.
This lack of visibility extends beyond individual applications. When code enters production without clear ownership or documentation, supporting it becomes impossible. Nobody knows who wrote it, how it works, or who should maintain it moving forward.
What AI interactions actually look like#
To secure AI workloads, you first need to understand them. Most interactions with large language models boil down to straightforward API calls—JSON requests and responses. A typical request includes the model to use, the prompt (what the user is asking for), and optionally assistant prompts (system-level instructions on tone, format, or output style). The LLM responds with text, code, images, or video, measured in tokens that determine billing.
The problem arises when this gets coded carelessly. Hard-coded model names mean switching models requires code changes. Missing token limits allow a single poisoned prompt to generate expensive, runaway output—effectively a denial-of-service attack on your budget. Multiple interleaved prompts, especially when user input isn't filtered, can trick the model into ignoring its guidelines. When a fast-food chain's chatbot was asked to generate both a burrito recommendation and Python code, it obliged on both counts, leaking its intended behavior.

