From Policies to Contracts: Why AI Governance Must Be Deterministic
Policy-as-code is not enough for agentic systems. Contracts turn governance into enforceable, testable, audit-ready guarantees.
From Policies to Contracts: Why AI Governance Must Be Deterministic
AI governance often starts with policies: statements like “agents must not access sensitive data” or “model usage must be approved.” Policies are necessary—but in modern agentic systems they are not sufficient.
When an agent can plan, call tools, retry, branch, and adapt at runtime, governance has to do more than describe intent. Governance must constrain behavior.
That is where contracts come in.
A governance contract is an explicit, machine-checkable specification of what is allowed—backed by enforcement points that make violations impossible (or at least provably detected and blocked). Contracts turn governance from “best-effort guardrails” into deterministic controls.
This post explains:
- Why policies alone fail in execution-time systems
- What makes a governance control deterministic
- How contracts become enforceable, testable, and auditable
- A practical contract-first approach you can apply today
1) The policy trap: clear intent, unclear enforcement
Policies are typically written as:
- Human-readable statements
- Wiki pages
- PDF standards
- “Policy-as-code” rules that run in some pipelines
That works when systems are mostly static.
Agentic AI systems are not static.
At runtime, an agent can:
- Choose a different tool than expected
- Call a tool with unanticipated parameters
- Switch models based on availability
- Retry until a limit is hit (or not hit)
- Pull in data through side channels (logs, caches, memory)
A policy like “do not exfiltrate secrets” does not specify:
- Which identities are allowed to call which tools
- What constitutes sensitive data in the system
- How to detect policy breaches at execution time
- What the system should do when uncertainty exists
In practice, policies become “guidelines” unless they are backed by deterministic enforcement.
2) Deterministic governance: what it really means
In TealTiger terms, deterministic governance means:
- Same inputs → same decision
- Given the same request context, the governance layer makes the same allow/deny decision.
- Controls execute before actions
- Governance checks happen prior to tool calls, model calls, data access, and side-effects.
- Violations are prevented (fail-closed)
- The system blocks actions that violate contracts instead of “logging and hoping.”
- Evidence is generated as a first-class output
- Every decision produces structured evidence: what was checked, why it passed/failed, and what was executed.
Determinism does not mean the model output is deterministic.
It means governance decisions are deterministic—even when models and agents are probabilistic.
3) Contracts: policies with teeth
A contract is a policy that has been:
- Formalized (clear inputs, clear outputs)
- Bound to enforcement points (pre-action checks)
- Testable (unit tests, golden corpora)
- Auditable (structured evidence)
You can think of contracts as “policy-as-controls.”
3.1 Contract anatomy
A useful governance contract typically includes:
- Subject: who/what is acting (user, service, agent identity)
- Scope: what the action is about (task, ticket, workflow, purpose)
- Resources: which tools, models, datasets, endpoints are in play
- Constraints: budgets, rate limits, allowed destinations, risk tier
- Decision: allow / deny / require-approval
- Evidence: what was evaluated, and the final decision record
3.2 Example: a simple contract
“An agent may call
send_emailonly when (a) the ticket is in an approved workflow state, (b) recipient domains are allow-listed, (c) the content classifier returns ‘non-sensitive’, and (d) daily budget remains below threshold.”
Notice how this contract is:
- Specific about tool
- Specific about workflow state
- Specific about allowed destinations
- Specific about content risk
- Specific about budget
That is enforceable.
A policy like “don’t send sensitive emails” is not.
4) Why agentic AI amplifies governance gaps
With agentic systems, governance gaps show up in predictable failure modes.
4.1 Boundary drift
The agent expands scope over time:
- “Let me check one more source”
- “Let me try another tool”
- “Let me call the admin endpoint”
Without contracts, these scope expansions are difficult to stop.
4.2 Retry escalation
The agent repeats actions until it succeeds:
- More tool calls
- Higher spend
- More data access
Contracts must define retry and budget boundaries.
4.3 Hidden side effects
A tool call is not “just a call.”
It can:
- Write records
- Trigger workflows
- Send messages
- Modify access
Governance must execute before side effects.
5) Contract-first governance: an implementation pattern
Here’s a practical pattern you can adopt, even if your architecture is evolving.
Step 1 — Identify your enforcement choke points
Pick the smallest set of points that cover most risk:
- Model invocation
- Tool invocation
- Data access
- External network egress
- Memory read/write
If you only enforce in one place, start with tool invocation.
Step 2 — Define contract schemas (not prose)
Represent contracts as structured schemas.
At minimum:
- Identity
- Task / purpose
- Tool/model allow-lists
- Data sensitivity and destinations
- Budget and rate limits
- Required approvals
Step 3 — Convert “policy text” into contract clauses
Treat policies as inputs.
Output contracts as clauses such as:
allowed_tools = {...}allowed_models = {...}max_cost_per_task = ...allowed_domains = {...}deny_if_sensitive = true
Step 4 — Add pre-action evaluation
Before executing an action, evaluate the relevant contract:
- If compliant → proceed
- If non-compliant → block
- If uncertain → block or require approval (depending on risk tier)
Step 5 — Generate evidence by default
Every decision should emit an evidence record.
A governance system without evidence is not governance—it is folklore.
6) Testing governance: golden corpora for contracts
Contracts become powerful when you can prove they work.
A lightweight approach:
- Create a set of representative prompts/tasks (“golden corpus”)
- Define expected decisions (allow/deny/approve)
- Run the corpus in CI
This makes governance:
- Regression-testable
- Reviewable
- Safe to evolve
And it creates an audit trail of when and why controls changed.
7) What to contract first (a practical prioritization)
If you are starting out, focus on contracts that reduce risk quickly.
- Identity-bound execution
- No anonymous agents. Every action has an accountable identity.
- Tool allow-lists with scoped parameters
- Which tools are allowed, and in what modes.
- Destination controls (egress)
- Where data can go (domains, endpoints, buckets).
- Budget and rate contracts
- Prevent cost explosions and recursive retries.
- Evidence contracts
- Ensure every action produces traceable proof.
8) Key takeaways
- Policies describe intent; contracts constrain behavior.
- Agentic AI requires execution-time enforcement, not just documentation.
- Deterministic governance means repeatable decisions, fail-closed controls, and evidence by default.
- Contract-first design turns governance into a system you can test, audit, and operate.
Continue in the docs
Want the contract truth and implementation details? Go to the TealTiger documentation.