Somesh Zanwar.

Work / 04

Data Quality-Aware Agent Governance

An agent is authorised to query a dataset. That morning three dbt tests failed on it. Who tells the policy engine?

Summary

A prototype that makes agent authorisation and data trustworthiness one decision. A request passes an identity check, an agent policy check built on Microsoft's Agent Governance Toolkit, and a data quality check, and the outcome goes to a single audit log.

2026 · Public repo, live demo, upstreamed to AGT

PythonMicrosoft Agent Governance ToolkitYAML policypytest
How it flowsOne request or record, start to finish
  1. Requestagent, action, dataset
  2. Layer 0: identityis this agent registered?
  3. Layer 1: agent policyAGT PolicyEngine: is it allowed to act?
  4. Layer 2: data qualityfreshness, quality score, failed tests
  5. Decision + audittyped GovernanceDecision, one JSON audit trail
What I built
  • A three-layer check where any failure blocks the request and records why, with no fallback.
  • Five demo scenarios covering all three failure modes and two clean passes. In one, a registered, authorised agent is still blocked because the dataset was last validated 26 hours ago against a 12-hour threshold and two tests failed.
  • Blocked decisions that name the data owner, so the requester knows who to contact.
  • Tests for each layer, a reproducible demo output and an architecture note.
DecisionsWhat I chose, what I passed on, why
Instantiating the policy engine once at module load
over: Per request

Creating it registers the custom rules. Doing that on every call would be reloading a ruleset on every transaction.

A typed GovernanceDecision for every outcome
over: Different return shapes per layer

The contract stays explicit whichever layer stopped the request.

Real vs simulatedWhat this does and does not show
This is a prototype. The data quality registry is simulated in Python and the agent identity store is a hard-coded dict. A production version would read dbt results or a data catalog and use a real identity provider. The pattern was contributed upstream to AGT as an example and an adapter. It did not change AGT's core policy engine.
Next
  • Read dbt artifacts directly, which the AGT adapter in PR #2278 starts to do.