The final layers determine whether the platform can be trusted after launch. They preserve data authority, create operational evidence, manage agent and model lifecycle, detect misuse, measure quality, and provide a controlled path through failure.
4C.1 Layer 10 — Data and knowledge operations
The data layer supports operational reads, analytical queries, knowledge retrieval, workflow state, memory, and evaluation. These stores have different authority and retention requirements. A vector index, conversation memory, warehouse, and ERP record should not be governed as though they were equivalent.
Data categories
| Category | Authority | Primary control |
|---|---|---|
| Operational record | Authoritative current state | Transaction integrity, access, concurrency, audit |
| Analytical copy | Derived and potentially delayed | Freshness, lineage, semantic model |
| Knowledge content | Approved or advisory document | Version, effective date, owner, ACL |
| Vector / search index | Derived retrieval structure | Source linkage, ACL preservation, deletion |
| Conversation memory | User-provided and model-derived | Purpose, tenant, user scope, expiry |
| Workflow state | Operational process record | Durability, replay, retention, legal evidence |
| Evaluation dataset | Curated test and incident evidence | Privacy, representativeness, version control |
Data minimization
The platform should not copy every enterprise dataset into a new AI repository. Copy only what the use case requires, preserve access attributes, define retention, and remove derived content when the source is deleted or access changes. Broad replication increases breach impact and creates a shadow system of record.
Freshness and consistency
Every context item should include retrieval time and source version. Freshness policy depends on the task: hours may be acceptable for trend analysis, while seconds may be required for entitlement or transaction decisions. When sources disagree, the system should apply explicit precedence or create a reconciliation task rather than allowing the model to choose the most plausible answer.
{
"record_id": "account:AC-1092",
"source_system": "crm-core",
"authority": "system_of_record",
"schema_version": "5.3",
"retrieved_at": "2026-07-23T17:18:00Z",
"classification": "confidential",
"tenant": "enterprise-eu",
"access_attributes": ["account-team","region:eu"],
"freshness_policy": "max_age:300s",
"lineage": ["crm.account","canonical.customer"]
}4C.2 Layer 11 — Observability, audit, and cost
Enterprise AI observability connects the user request to the final business outcome. It must span gateway, identity, retrieval, model calls, agent decisions, policy results, capability invocation, connector behavior, approval, and verification.
Link request, context, model, agent, tool, policy, approval, and target-system result.
Track latency, errors, queue depth, cost, token usage, tool failure, and recovery time.
Monitor groundedness, unauthorized attempts, manual correction, business outcome, and drift.
Telemetry domains
| Domain | Examples | Owner |
|---|---|---|
| Platform | Availability, latency, saturation, queue depth | SRE / Platform |
| Model | Deployment, tokens, context, refusals, fallback | AI Engineering / FinOps |
| Retrieval | Queries, sources, ranking, freshness, ACL filtering | Data / Knowledge |
| Agent | Plan, steps, loops, handoffs, termination | AI Engineering |
| Security | Injection signals, denied tools, DLP, egress | SOC / Security |
| Governance | Owner, version, policy, approval, lifecycle | Risk / Compliance |
| Business | Cycle time, quality, avoided work, correction, impact | Capability owner |
Structured tracing
trace_id: tr_01J8...
spans:
- name: gateway.request
attributes:
tenant: enterprise-eu
task_class: incident_remediation
- name: retrieval.query
attributes:
sources: [cmdb, monitoring, runbooks]
permission_filter: applied
- name: model.reason
attributes:
deployment: reasoning-enterprise
tokens_in: 18342
- name: policy.evaluate
attributes:
decision: allow_with_approval
policy_version: prod-change-v4
- name: connector.execute
attributes:
operation_id: op_44192
status: verifiedPrompt and tool content should not be copied indiscriminately into logs. Use structured fields, redaction, encryption, restricted access, and separate evidence storage when full content is required for audit. Observability must not become an uncontrolled secondary data lake.
Cost observability
Track cost by tenant, use case, model, workflow, agent, and business outcome. Token cost alone is incomplete. Include retrieval, compute, connector, storage, evaluation, human review, and failure-recovery cost. A lower-cost model that increases corrections or escalation may have worse total economics.
4C.3 Layer 12 — Governance and lifecycle
Governance defines who may create, approve, deploy, modify, monitor, and retire agents, models, prompts, policies, capabilities, and knowledge sources. It should be integrated with delivery pipelines rather than maintained only as documentation.
Governed assets
| Asset | Required metadata | Lifecycle event |
|---|---|---|
| Agent | Owner, sponsor, version, tools, model, data scope, evaluation | Register, approve, deploy, suspend, retire |
| Capability | Owner, schema, policy, risk, approval, compensation | Publish, version, deprecate, revoke |
| Model deployment | Provider, region, task classes, data classes, safety profile | Approve, canary, replace, disable |
| Prompt / configuration | Version, owner, purpose, tests, linked agent | Review, release, rollback |
| Knowledge source | Owner, authority, ACL, classification, freshness | Index, refresh, suspend, delete |
| Policy | Owner, version, test suite, effective date | Approve, deploy, supersede, emergency revoke |
A central registry improves discoverability and accountability, but governance should not create a bottleneck for every low-risk change. Use risk tiers. A read-only internal assistant and an autonomous financial agent should not require identical approval paths.
Release gates
- Owner and sponsor are active.
- Threat model and data classification are current.
- Agent and capability versions are immutable and traceable.
- Evaluation thresholds are met for normal and adversarial cases.
- Policy, connector, and rollback changes are included in the release review.
- Canary, monitoring, and rollback criteria are defined.
4C.4 Cross-layer security
Security is not one layer because threats cross the entire stack. An indirect prompt injection begins in retrieved content, influences a model, selects a capability, and attempts to exfiltrate data through a connector. Controls must interrupt the chain at several points.
Threat-control matrix
| Threat | Primary controls |
|---|---|
| Prompt injection | Content classification, context isolation, tool restrictions, policy enforcement |
| Sensitive data disclosure | ACL-aware retrieval, DLP, field filtering, model routing, egress controls |
| Excessive agency | Narrow capabilities, scoped identity, approval, limits, termination rules |
| Insecure output handling | Schema validation, escaping, domain checks, safe execution interfaces |
| Credential compromise | Workload identity, short-lived tokens, vault, rotation, revocation |
| Cross-tenant leakage | Tenant claims, isolated stores, policy, cache separation, tests |
| Supply-chain compromise | Signed artifacts, dependency review, controlled registries, SBOM |
4C.5 Continuous evaluation and assurance
Evaluation should cover system behavior, not only answer quality. It should test source selection, access filtering, tool choice, parameter validation, policy behavior, approval, retry, verification, refusal, and business outcome.
Golden cases, edge cases, adversarial prompts, connector simulations, policy tests, recovery drills.
Sampling, human review, drift, incident signals, corrections, business KPIs, shadow evaluation.
Evaluation dimensions
| Dimension | Example metric |
|---|---|
| Task quality | Correct completion rate |
| Grounding | Claims supported by approved evidence |
| Authorization | Unauthorized capability attempts blocked |
| Tool safety | Valid parameters and correct target selection |
| Operational reliability | Verified completion without duplicate side effects |
| Human burden | Approval and correction time |
| Business outcome | Cycle time, quality, cost, customer impact |
4C.6 Failure recovery and continuity
Recovery design must cover model outage, data-source outage, policy failure, connector timeout, duplicate event, corrupted index, expired approval, region failure, and security incident. The system should have an explicit degraded mode for each task class.
| Dependency failure | Safe behavior |
|---|---|
| Model unavailable | Use approved fallback or pause; never silently weaken policy |
| Knowledge source unavailable | Disclose missing evidence; use cache only within freshness policy |
| Policy engine unavailable | Fail closed for protected actions |
| Connector state unknown | Reconcile by operation ID before retry |
| Workflow store unavailable | Stop new side effects; recover durable state first |
| Security incident | Suspend agents, revoke credentials, block capabilities, preserve evidence |
Rollback hierarchy
- Configuration rollback: restore previous agent, prompt, policy, or model route.
- Workflow rollback: stop new instances and resume from a safe checkpoint.
- Business compensation: reverse or reconcile enterprise side effects.
- Access rollback: revoke agent, connector, or model permissions.
- Knowledge rollback: remove corrupted or unauthorized indexed content.
Recovery principle: never ask the model to infer whether a transaction probably committed.
Use durable operation identifiers, target-system readback, event history, and reconciliation services.
4C.7 Operating model and responsibilities
A production platform requires clear ownership across business, AI engineering, platform, security, data, and risk. The agent owner is responsible for the use case and behavior; the capability owner is responsible for the business action; the platform team operates shared infrastructure; security owns threat response; data owners govern authority and access.
| Role | Primary accountability |
|---|---|
| Business capability owner | Outcome, acceptable automation, approval, operational process |
| Agent owner / sponsor | Purpose, lifecycle, tools, model policy, evaluation |
| Platform / SRE | Availability, scaling, observability, recovery, cost platform |
| Security / IAM | Identity, policy, threat controls, incident response |
| Data owner | Authority, quality, access, retention, lineage |
| Risk / compliance | Obligations, prohibited uses, evidence, human oversight |
4C.8 Architecture Decision Records
Important integration decisions should be recorded because framework defaults change and organizational assumptions are easily forgotten. ADRs should state context, decision, alternatives, controls, consequences, owner, and review date.
# ADR-021: Separate workflow state from agent memory
Status: Accepted
Context:
Long-running procurement tasks require approvals, deadlines, retries,
and compensation. Agent conversation memory is not durable or auditable enough.
Decision:
Store workflow state in the enterprise workflow service. Agent memory may
contain temporary reasoning context but cannot determine committed process state.
Controls:
- Every side effect references workflow_id and operation_id
- Approval is stored as a workflow event
- Agent restart cannot repeat completed operations
- Recovery uses workflow history, not generated summaries
Consequences:
Additional integration effort is required, but replay, audit, recovery,
and model portability improve.4C.9 Production readiness checklist
4C.10 Summary
Chapter 4D completes the enterprise AI integration stack. The data layer preserves authority and lifecycle. Observability connects request to outcome. Governance manages assets and accountability. Security applies controls across every boundary. Evaluation measures behavior continuously. Recovery ensures that failures remain containable and reversible.
Core conclusion: production readiness is an organizational capability expressed through architecture.
An enterprise AI system becomes trustworthy when it can be governed before action, observed during action, and recovered after failure.
Reference foundations
- Microsoft Azure Architecture Center — agent architecture, enterprise chat, integration, resilience, and orchestration patterns.
- Microsoft Entra Agent ID — identity, owners, sponsors, lifecycle, and access governance for agents.
- OWASP GenAI Security Project — prompt injection, excessive agency, disclosure, and output-handling risks.
- NIST AI Risk Management Framework and Generative AI Profile — lifecycle governance and risk management.
- OpenTelemetry — distributed traces, metrics, and logs.
- Open Policy Agent — deterministic policy-as-code patterns.