← manishpande.in Contents
Reference architecture · 2026 The Agentic Platform by Manish Pande
© 2026 Manish Pande Mumbai, India Set in Space Grotesk · Source Serif 4 · JetBrains Mono
TRUST · Governance & Compliance Chapter 17

Policy, Governance & Compliance

Guardrails stop bad actions in the moment; governance is the systematic, auditable framework that defines what is allowed, proves it was enforced, and satisfies the regulators who now take a direct interest in autonomous systems. For any platform touching regulated data or consequential decisions, this is not optional polish — it is a precondition for being allowed to operate.

17.1 Policy as code

Authorization rules scattered through application logic are impossible to audit, test, or change with confidence. The discipline is to externalize them into a dedicated policy engine and express them as code. The Open Policy Agent (OPA) is the de-facto standard: policies are written in a declarative language (Rego), versioned in git, tested in CI, and evaluated at runtime by asking the engine a yes/no question — "may this agent, acting for this user, call this tool on this resource?" Decoupling policy from code means rules become a reviewable, centrally governed asset that every component — gateway, tool layer, orchestrator — can consult uniformly. This is the enforcement substrate for least privilege (Ch. 15) and action-gating (Ch. 16).

Policy supply chain Rego policiesversioned in git CI · test + build policy bundle Runtime decision requestsub · act · resource PEPgateway / tool allow → act · deny enforced decision OPA · PDPevaluate Rego query ⇄ decision load policy audit logdecision recorded decision logged
Fig 17.1 · Policy-as-code enforcement. Rules live in git as Rego, are tested and built in CI into a policy bundle, and loaded by the OPA policy decision point (PDP). At runtime every request hits a policy enforcement point (PEP) — the gateway or tool layer — which asks the PDP "is this allowed?", receives a decision plus any obligations, enforces it, and records the decision to the audit log. One engine, consulted uniformly by every component.

17.2 The audit trail

Governance requires that every consequential decision be reconstructable after the fact: who (which user, which agent identity), did what (which action, with what arguments), when, under which policy decision, and with what result. The durable execution history (Ch. 4) and observability traces (Ch. 18) already capture much of this; governance demands it be complete, tamper-evident, and retained per policy. An immutable audit log is what lets you answer an incident, satisfy an auditor, and honor a data-subject request.

Sources durable history · Ch.4 traces · Ch.17 policy decisions · Fig 15.1 append-only audit loghash-chainedtamper-evident immutable / WORMregion-pinned(residency + retention) write-once Consumers SIEM incident auditor / DSAR personal-data storesmemory · vectors · graph · caches · backups DSAR → targeted erasure incl. derived copies
Fig 17.2 · The audit and compliance data path. Decisions and actions from durable history, traces, and the policy engine land in an append-only, hash-chained log — tamper-evident by construction — then in immutable, region-pinned (WORM) storage that satisfies retention and residency. Consumers read it for alerting, incident reconstruction, and auditor/data-subject requests. A DSAR triggers erasure that must reach every derived copy — embeddings, graph nodes, caches, backups — not only the primary store.
First principle · If it wasn't logged, it didn't happen — provably

Treat the audit trail as a first-class output of every action, not a debugging byproduct. An autonomous system you cannot explain after the fact is one you cannot be trusted to run. Decisions, their inputs, the governing policy, and their effects must all be durably and immutably recorded.

17.3 The regulatory surface

Agentic systems intersect several regimes at once. They process personal data (privacy law), they make automated decisions about people (AI-specific law), and they are deployed by organizations that must demonstrate controls (assurance standards). The platform must be built so these obligations can be met by construction.

Table 17.1 — Regulatory frameworks and what they demand of the architecture
FrameworkScopeKey architectural obligation
GDPR (EU)Personal-data protectionLawful basis, data minimization, and right to erasure — incl. deleting derived/embedded copies (Ch. 10); Art. 22 limits on solely-automated decisions with legal/significant effect (human-in-the-loop, Ch. 5)
DPDP Act (India)Digital personal dataConsent management, purpose limitation, data-principal rights, and data-residency considerations — drives where memory and logs physically live
EU AI ActRisk-tiered AI regulationRisk classification, transparency, human oversight, logging, and documentation for higher-risk uses — phasing in by obligation
ISO/IEC 42001AI management systemA governance framework for responsible AI: roles, risk management, lifecycle controls — certifiable
SOC 2Service-org trust controlsDemonstrable security/availability/confidentiality controls — audit trails, access control, change management

The throughline is that compliance is an architectural property, not a document written at the end. Right-to-erasure means your memory and retrieval layers (Ch. 10, 11) must support targeted, provable deletion — including embeddings and graph nodes derived from the deleted data. Automated-decision limits mean high-stakes actions route through human approval (Ch. 5). Data residency means region-aware placement of stores and logs. Auditability means the trail of §17.2 exists. Build these in from the start; bolting them on later is, in practice, a rewrite.

Hazard · The residency and erasure trap

Two compliance failures are especially common and expensive. Residency: replicating user data or logs into a region the law forbids (a single mis-placed VPC or analytics pipeline can breach DPDP/GDPR). Erasure: honoring deletion in the primary store while stale copies persist in embeddings, caches, backups, and derived graphs. Map every place personal data flows — context, memory, vectors, logs, traces — and ensure each is both region-correct and erasable.

· · ·