How to Layer AI Security Controls
Defense-in-depth for AI agents combines intent verification, contextual policies, runtime enforcement, and network boundaries to block both direct attacks and slow-burn data exfiltration.
DatabricksMatei Zaharia, David Nasi, Xiangrui Meng, Kecheng Cao, Tomu HirataExplainer
Omnigent, an open-source meta-harness for AI agents, introduces contextual policies to make agent controls safer and less disruptive than per-action allow, deny, or approval rules. Policies receive session events, maintain private state such as tools used, documents read, accumulated risk, initial intent, and model spend, then allow, deny, transform, or escalate the next action. Omnigent’s server intercepts tool calls from supported agents and applies these policies consistently, while examples include Google Drive restrictions based on documents created or marked confidential, risk thresholds that require approval for later email or file-sharing actions, and budget thresholds that pause or redirect work to a cheaper model. Intent-based authorization limits tools according to the user’s opening request, applying least privilege across supported harnesses and custom agents. The project is described as open source and alpha, with the server providing one interception layer for agents using different harnesses.
Existing agent frameworks mainly offer simple allow-list, deny, or per-action approval controls. The post identifies security and cost-management cases where an action’s safety depends on prior session activity, including prompt injection risk, cumulative exposure to sensitive material, excessive messaging, and model spend.
Omnigent policies observe agent events and retain policy-specific session state on the server. A policy handler receives prior state and the next event, then returns state updates and a decision to allow, deny, transform messages, or ask the user for permission. The same layer applies across supported and custom agent harnesses.
The Google Drive policy confines writes to documents created during the session by default and applies a no-write-down rule after the agent reads a confidential document.
The cost policy asks for approval after a soft spending threshold and blocks further calls to an expensive model at a hard cap until the agent switches to a cheaper one; a per-user daily cap can also be layered on top.
Intent-based authorization stores the user’s initial request and checks each tool call against it, allowing a session focused on Google Slides to block unrelated GitHub access.
Summaries are generated from the original by a language model. Check the original before relying on it.
See the idea
Defense-in-depth for AI agents combines intent verification, contextual policies, runtime enforcement, and network boundaries to block both direct attacks and slow-burn data exfiltration.
Keep reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
One useful email. Unsubscribe anytime.