---
title: "Contextual Policies in Omnigent: Using session state to better govern AI agents"
url: https://daily.dev/posts/contextual-policies-in-omnigent-using-session-state-to-better-govern-ai-agents-bhluqrzzz
source_url: https://www.databricks.com/blog/contextual-policies-omnigent-using-session-state-better-govern-ai-agents
type: article
source: "databricks"
published: 2026-07-07T16:33:04.312Z
updated: 2026-07-07T18:21:59.238Z
tags: ["security", "ai-agents", "prompt-injection"]
reading_time: 9
upvotes: 2
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Contextual Policies in Omnigent: Using session state to better govern AI agents

**[databricks](https://daily.dev/sources/databricks)** · 9 min read · 2 upvotes · 0 comments

## Summary

Omnigent, an open source meta-harness for AI agents from Databricks, introduces contextual policies that track session state to make governance decisions. Unlike simple allow/deny rules, these policies remember what an agent has done within a session — which documents it read, how much it spent, what the user originally asked — and use that accumulated context to decide whether the next action should proceed. Three built-in policies are included: a Google Drive policy that restricts writes to documents the agent created in the current session and implements Bell-LaPadula no-write-down rules for confidential files; a risk-scoring policy that raises a running score as sensitive actions accumulate and triggers human approval once a threshold is crossed; and a budget policy that pauses or blocks expensive model calls when per-session or per-user spending caps are hit. A fourth example, intent-based authorization, locks each session to only the tools relevant to the user's original prompt, implementing least-privilege automatically. Omnigent wraps existing agent harnesses including Claude Code, Codex, and custom OpenAI/Claude SDK agents, applying these policies uniformly across all of them.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.databricks.com/blog/contextual-policies-omnigent-using-session-state-better-govern-ai-agents>

## Similar posts on daily.dev

- [Permission isn't purpose: Intent-based authorization in Omnigent](https://daily.dev/posts/permission-isn-t-purpose-intent-based-authorization-in-omnigent-allg5fxld) · databricks · 0 upvotes · 0 comments
- [Introducing Omnigent: A Meta-Harness to Combine, Control and Share Your Agents](https://daily.dev/posts/introducing-omnigent-a-meta-harness-to-combine-control-and-share-your-agents-vfb6nvziy) · databricks · 9 upvotes · 1 comments

---

Tags: [#security](https://daily.dev/tags/security), [#ai-agents](https://daily.dev/tags/ai-agents), [#prompt-injection](https://daily.dev/tags/prompt-injection)

[View this post on daily.dev](https://daily.dev/posts/contextual-policies-in-omnigent-using-session-state-to-better-govern-ai-agents-bhluqrzzz)
