ISO/IEC 5338 Architecture Definition: Where Should Policy Enforcement Sit in an AI System?
Policy enforcement should sit where every model call, agent action and tool call must pass through it, and where it can record what was allowed and what happened. Enforcement in application code, at the perimeter or at a gateway each leaves coverage or bypass gaps. Enforcement in the execution path closes more of them. Whichever placement you choose, record it as an architecture decision with alternatives, criteria and verifiable requirements.
Writing architecture requirements for enforcement and evidence
Placement is an architecture definition decision
ISO/IEC 5338:2023 provides life cycle processes that support the definition, control, management, execution and improvement of an AI system across its life cycle stages. It is a process standard. It does not give you a product to buy or a pattern to copy, so the work of deciding where policy is enforced stays with the architect.
That makes the architecture definition activity the right place to settle the question. In an AI system, policy has to apply across models, agents, tools and MCP servers. If enforcement is left to application code, to a pre-deployment review or to documentation alone, it can be bypassed or applied unevenly. The architect is then unable to show what the system was allowed to do and what it did.
Architects who already work with the general systems and software life cycle standards, ISO/IEC/IEEE 15288 and 12207, will recognise the discipline: stakeholder concerns become requirements, requirements drive candidate architectures, and the chosen architecture is recorded with its rationale. The AI-specific addition here is that the system's behaviour at runtime, through model and tool interactions, needs its own enforceable and evidenced control point.
Criteria for comparing placements
Compare candidates against the same criteria so the decision can be traced. The following are analytical criteria, not requirements taken from any standard.
Coverage of interactions and tool calls: does the control see every prompt, response, agent action, tool call and MCP server call, or only some paths?
Bypass resistance: can a developer, an agent or a misconfigured service reach a model or tool without passing the control?
Consistency across models: is the same policy applied the same way regardless of which model or tool is behind the call?
Evidence generation: does the control itself record what was permitted, redacted, blocked or escalated, or does evidence have to be reconstructed from other systems?
Latency and operational cost to the request path: what does the control add to each interaction, and how does it fail when it is unavailable?
The weight of each criterion depends on your risk profile. A system that only drafts internal text may tolerate weaker bypass resistance than one whose agents can call tools that change records.
Four placement options compared
This comparison is general analysis. Actual results depend on how each option is built and deployed, so validate them against your own architecture.
- Application code: Policy checks written into each application. Close to business context, but coverage depends on every team implementing the checks. Consistency across models is hard to maintain, and any path that skips the code is uncontrolled. Evidence is produced per application, in differing formats.
- Network perimeter: Controls at the network boundary. Useful for broad egress rules and for restricting which destinations can be reached. Limited visibility into the content of an interaction or the meaning of a tool call, so fine-grained actions such as redaction or approval are difficult.
- Gateway: A central entry point for model traffic. Provides one place to apply policy and to record requests for traffic routed through it. Coverage is limited to calls that actually use the gateway, and agent-to-tool or MCP server calls may fall outside it unless they are routed there too.
- Execution path: Enforcement placed where models, agents, tools and MCP servers are invoked, so calls must pass it to proceed. Offers the strongest coverage and bypass resistance of the four when deployed on all routes, and can apply one policy across models. It adds a component to the request path, so latency and failure behaviour need specification and testing.
Verification and regulatory traceability
A requirement is only useful if you can verify it. For bypass resistance, write tests that try to reach models and tools without passing the enforcement point, from each network zone and runtime where workloads run. For consistency, run the same policy cases across the models and tools in scope and compare decisions. For evidence, sample records and confirm that an auditor could determine what was permitted and what occurred. Defining measurable criteria this way follows the broader idea in NIST AI 100-5 that test, evaluation, verification and validation standards define metrics, which in turn allow you to define what counts as effective risk mitigation.
Recital 71 of the EU AI Act states that comprehensible information on how high-risk systems were developed and how they perform throughout their lifetime is essential for traceability, compliance verification, and operational and post-market monitoring, and that this requires records and technical documentation. Per-interaction evidence from the enforcement point is one way to meet that expectation at runtime.
As of November 2026, the Commission's Digital Omnibus on AI, proposed on 19 November 2025, would set fixed dates of 2 December 2027 for stand-alone high-risk AI systems and 2 August 2028 for high-risk systems embedded in products. It is a proposal and does not replace earlier dates unless adopted. Architecture requirements should not depend on those dates. Specify enforcement and evidence now, and adjust the plan if the legislation changes.
No placement makes a system compliant by itself, and this guide makes no claim of ISO/IEC 5338 certification or conformance. The controls described apply to individual interactions and tool calls. They do not provide transaction-level governance, dataset or model provenance, or end-to-end tracing of agentic workflows.
Where Trussed fits
Trussed is one implementation of the execution path option. It enforces policy in the execution path across models, agents, tools and MCP servers, with the actions allow, redact, block, rate limit and escalate for human approval. Enforcement happens at runtime, not through review after the fact, and the same enforcement produces audit-ready evidence mapped to frameworks including the EU AI Act and NIST. It can be deployed self-managed in the customer cloud, with configurable retention and data residency.
The scope is individual interactions and tool calls. Use the criteria and requirements in this guide to evaluate any option, including this one, against your own risk profile, your latency budget and the routes through which your workloads reach models and tools.
Enforcement placement as an architecture decision
Candidate placements
Application code, perimeter, gateway, execution path.
Evaluation criteria
Coverage, bypass resistance, consistency, evidence, latency.
Requirements
Verifiable statements for actions and per-interaction records.
Verification
Tests that try to reach models and tools without passing enforcement.
Review your enforcement placement options
Talk through coverage, bypass resistance and evidence requirements for your AI architecture with a Trussed expert.
Talk to an Expert