On this page

Pattern: Runtime Guardrail

Input and output guardrails on the live request path that enforce the system's Policy Card on every call and emit a decision event for each one.

Layer 04 · Runtime Controls & Observability In the chapter 05 catalogue

Summary: Place input and output guardrails on the model or agent’s runtime path that enforce its Policy Card on every live request and emit a decision to telemetry and to the circuit breaker. The guardrail is where a policy written in layer 01 and a threshold tested in layer 03 become an action taken on a real call, not a claim about one.

Runtime Guardrail An architecture diagram generated by Archify. Policy card · same rule as CI · Layer 01 Govern-as-Code Policy card same rule as CI Request · prompt, context · Architecture component Request prompt, context Input guardrail · allow / block · Layer 04 Runtime Controls & Observability Input guardrail allow / block Model or agent · acts on the call · Layer 04 Runtime Controls & Observability Model or agent acts on the call Output guardrail · allow / block / redact · Layer 04 Runtime Controls & Observability Output guardrail allow / block / redact Response · or tool call · Architecture component Response or tool call Assurance store · decision events · Layer 05 Assurance & Continuous Compliance Assurance store decision events Circuit breaker · on a defined breach · Layer 04 Runtime Controls & Observability Circuit breaker on a defined breach allow allow enforce enforce event event breach Layer 01 Govern-as-Code Layer 04 Runtime Controls & Observability Layer 05 Assurance & Continuous Compliance Legend Backend Database Security External
Runtime GuardrailInput and output guardrails on the model or agent path enforce the same policy card that CI evaluated and emit a decision event on every call to the assurance store and, on a breach, to the circuit breaker. A guardrail without events is a filter, not a control. Generated from the Body of Knowledge.Open interactive diagram (opens in a new tab)

Objectives

Enforce policy at the point of action, on inputs and outputs no eval anticipated, and make each enforcement a structured event the assurance and incident layers can consume.

Target users

AI governance engineer, ML engineer, security engineer, platform team.

Impacted stakeholders

Users, model owners, affected persons, incident responders, auditors.

Relevant principles

Give every control teeth; instrument the build to produce its own proof.

Context

An agent or model in production, acting on live inputs, whose Policy Card and eval thresholds exist but have no runtime enforcement point, so a rule proven in CI is unguarded the moment the system meets an input no test covered.

Problem

Policies and evals are point-in-time; the system then meets prompt injection, unsafe outputs and tool calls no one reviewed. A guardrail that only logs is observability mistaken for control: the system watches itself fail in high resolution. Without an enforcement point that can block and emit, the runtime is the gap between a tested control and an uncontrolled action.

Solution

Put a guardrail on both sides of the model/agent path. The input guardrail screens prompts and retrieved context for injection and policy-violating requests before they reach the model; the output guardrail screens generations and tool calls for unsafe content, data leakage and out-of-scope actions before they take effect. Enforce the same Policy Card evaluated in CI1, so the runtime decision and the pipeline decision share one rule. On every call emit a structured event, {agent, direction (input/output), rule_id, decision (allow/block/redact), timestamp}, to the assurance store (Continuous Assurance Telemetry) and, on a defined breach, signal the circuit breaker (Kill Switch / Circuit Breaker). Guardrail frameworks realise this as a category; the OWASP Agent Control Standard names the runtime-control surface2. This is distinct from the kill switch: the guardrail decides one call at a time and stays in the request path; the breaker withdraws the agent’s autonomy wholesale when the guardrail’s signals cross a threshold.

Singapore’s framework for agentic AI puts the same control at run time: “Runtime controls address this by monitoring and intervening during execution, such as rate limits to prevent excessive tool use or input validation” (IMDA, section 2.3.1, p. 34)5.

Consequences

The tested control holds on live traffic and every enforcement leaves evidence; the guardrail is also the sensor the breaker and the incident pipeline read. The cost is per-call latency, false positives to tune, and keeping the runtime rule in sync with the Policy Card and eval thresholds.

Policy Card; Kill Switch / Circuit Breaker; Agent Identity & Scoped Credentials; Continuous Assurance Telemetry; Human-in-the-loop Gate; Eval Gate in CI.

Maps to: EU AI Act Art. 14, Art. 15 · ISO/IEC 42001 · NIST AI RMF (Manage) · OWASP Agentic ASI02/ASI03 · Layer 04 Runtime Controls & Observability.

Threat IDs follow the OWASP Top 10 for Agentic Applications 2026 3 and function labels the NIST AI RMF4. Mappings are illustrative, not a claim of conformity.

Sources

  1. [1] Policy Cards: machine-readable, deployment-layer governance artefacts for AI agents, linked to enforcement and audit pipelines (arXiv 2510.24383). 2025-10. https://arxiv.org/abs/2510.24383 (verified: primary)
  2. [2] OWASP GenAI Security Project unveils the Agent Control Standard (ACS) and 2026 Top 10 for LLM Applications. OWASP GenAI Security Project. 2026-09-01. https://genai.owasp.org/2026/09/01/owasp-genai-security-project-unveils-2026-top-10-for-llm-applications-new-agent-control-standard-and-sponsors-as-community-tops-30000-members/ (verified: primary)
  3. [3] Top 10 for Agentic Applications 2026 (ASI IDs). OWASP GenAI Security Project. 2025-12-09. https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/ (verified: primary)
  4. [4] AI Risk Management Framework (AI RMF 1.0; Govern, Map, Measure, Manage). NIST. 2023-01-26. https://www.nist.gov/itl/ai-risk-management-framework (verified: primary)
  5. [5] Model AI Governance Framework for Agentic AI, v1.5 (section 2.3.1, p. 34: runtime controls that monitor and intervene during execution; published 2026-05-20, updated 2026-06-05). IMDA. 2026-06-05. https://www.imda.gov.sg/-/media/imda/files/about/emerging-tech-and-research/artificial-intelligence/mgf-for-agentic-ai.pdf (verified: primary)
Edit this page on GitHub
Cite this pattern

García Aibar, J. (2026). Pattern: Runtime Guardrail. In AI Governance Engineering: The Thesis & Body of Knowledge (v0.5.0), chapter 05, Patterns. https://doi.org/10.5281/zenodo.22956197. https://aigovernanceengineer.com/patterns/runtime-guardrail. CC BY 4.0

BibTeX

@misc{aige2026bok,
  author  = {Jorge García Aibar},
  title   = {{AI Governance Engineering: The Thesis \& Body of Knowledge}},
  chapter = {05. Patterns: Runtime Guardrail},
  year    = {2026},
  version = {0.5.0},
  doi     = {10.5281/zenodo.22956197},
  url     = {https://aigovernanceengineer.com/patterns/runtime-guardrail},
  note    = {Version 0.5.0}
}
Share on LinkedIn
Around Runtime GuardrailThe patterns Runtime Guardrail is listed with, and the obligations, open controls and incident cases that name it.Names this patternRelated patternColour: stack layer of the related pattern01 Govern-as-Code03 Evals04 Runtime Controls05 AssuranceRuntime GuardrailRelated patterns (6)Agent Identity & Scoped Credentials · Related patternAgent Identity & Scoped…Continuous Assurance Telemetry · Related patternContinuous Assurance TelemetryEval Gate in CI · Related patternEval Gate in CIHuman-in-the-loop Gate · Related patternHuman-in-the-loop GateKill Switch / Circuit Breaker · Related patternKill Switch / Circuit BreakerPolicy Card · Related patternPolicy CardObligations (5)EU AI Act Art. 14: human oversight · Names this patternEU AI Act Art. 14EU AI Act Art. 15: accuracy, robustness and cybersecurity · Names this patternEU AI Act Art. 15EU AI Act Art. 15(4): feedback loops in systems that continue to learn · Names this patternEU AI Act Art. 15(4)NIST AI RMF MANAGE · Names this patternNIST AI RMF MANAGEOWASP Top 10 for Agentic Applications 2026 · Names this patternOWASP AgenticControls (9)AIGE-CTL-AGENT-035 Agents that watch agents are governed agents · Names this patternAgents that watch agents are…AIGE-CTL-AGENT-016 Code runs only in a sandbox · Names this patternCode runs only in a sandboxAIGE-CTL-AGENT-008 Execution budgets · Names this patternExecution budgetsAIGE-CTL-AGENT-023 Memory write gate and rollback · Names this patternMemory write gate and rollbackAIGE-CTL-EVAL-002 Network Egress Control · Names this patternNetwork Egress ControlAIGE-CTL-AGENT-017 Output and egress filter · Names this patternOutput and egress filter+3 more+3 more: AIGE-CTL-AGENT-007 Runtime guardrail on every tool call, AIGE-CTL-AGENT-005 Tool allow-list, deny by default, AIGE-CTL-EVAL-004 Tool and Action MediationCases (10)Agents in a cyber range with open internet took unsanctioned actions against real people · Names this patternAISI cyber range incidentSource code pasted into a public chatbot (reported) · Names this patternChatbot data leak (reported)Claude models reached real systems from a misconfigured third-party cyber evaluation · Names this patternClaude cyber evaluation…An agent in training reached a public chatbot through the sandbox DNS resolver · Names this patternDNS channel in a training runThe Garante's ChatGPT order: launch before a lawful basis · Names this patternGarante ChatGPT orderAn internally deployed model published a researcher's GitHub token in a public repository · Names this patternGitHub token exposed…+4 more+4 more: Moffatt v. Air Canada: the chatbot's answer is the company's answer, NYC MyCity: a government chatbot that advised breaking the law, OpenAI agents and Hugging Face: an evaluation environment that was not isolated, Agents in training shared a file through a public file-hosting serviceSource: the pattern catalogue, theobligation register, the opencontrols and the cases
Around Runtime GuardrailThe patterns Runtime Guardrail is listed with, and the obligations, open controls and incident cases that name it.Names this patternRelated patternColour: stack layer of the related pattern01 Govern-as-Code03 Evals04 Runtime Controls05 AssuranceRelated patterns (6)Agent Identity & Scoped Credentials · Related patternAgent Identity & Scoped…Continuous Assurance Telemetry · Related patternContinuous Assurance…Eval Gate in CI · Related patternEval Gate in CIHuman-in-the-loop Gate · Related patternHuman-in-the-loop GateKill Switch / Circuit Breaker · Related patternKill Switch / Circuit BreakerPolicy Card · Related patternPolicy CardCases (10)Agents in a cyber range with open internet took unsanctioned actions against real people · Names this patternAISI cyber range incidentSource code pasted into a public chatbot (reported) · Names this patternChatbot data leak (reported)Claude models reached real systems from a misconfigured third-party cyber evaluation · Names this patternClaude cyber evaluation…An agent in training reached a public chatbot through the sandbox DNS resolver · Names this patternDNS channel in a training…The Garante's ChatGPT order: launch before a lawful basis · Names this patternGarante ChatGPT orderAn internally deployed model published a researcher's GitHub token in a public repository · Names this patternGitHub token exposed…+4 more+4 more: Moffatt v. Air Canada: the chatbot's answer is the company's answer, NYC MyCity: a government chatbot that advised breaking the law, OpenAI agents and Hugging Face: an evaluation environment that was not isolated, Agents in training shared a file through a public file-hosting serviceObligations (5)EU AI Act Art. 14: human oversight · Names this patternEU AI Act Art. 14EU AI Act Art. 15: accuracy, robustness and cybersecurity · Names this patternEU AI Act Art. 15EU AI Act Art. 15(4): feedback loops in systems that continue to learn · Names this patternEU AI Act Art. 15(4)NIST AI RMF MANAGE · Names this patternNIST AI RMF MANAGEOWASP Top 10 for Agentic Applications 2026 · Names this patternOWASP AgenticControls (9)AIGE-CTL-AGENT-035 Agents that watch agents are governed agents · Names this patternAgents that watch agents…AIGE-CTL-AGENT-016 Code runs only in a sandbox · Names this patternCode runs only in a sandboxAIGE-CTL-AGENT-008 Execution budgets · Names this patternExecution budgetsAIGE-CTL-AGENT-023 Memory write gate and rollback · Names this patternMemory write gate…AIGE-CTL-EVAL-002 Network Egress Control · Names this patternNetwork Egress ControlAIGE-CTL-AGENT-017 Output and egress filter · Names this patternOutput and egress filter+3 more+3 more: AIGE-CTL-AGENT-007 Runtime guardrail on every tool call, AIGE-CTL-AGENT-005 Tool allow-list, deny by default, AIGE-CTL-EVAL-004 Tool and Action MediationRuntime GuardrailSource: the pattern catalogue, the obligation register, the open controls and thecases
Around Runtime Guardrail The patterns listed with this one, in their layer colour, and the obligations, open controls and incident cases that name it. Follow a node to see why the pattern is worth building, and what to build with it.
Data table
What Runtime Guardrail connects to
FamilyItemRelation
Related patternsAgent Identity & Scoped CredentialsRelated pattern
Related patternsContinuous Assurance TelemetryRelated pattern
Related patternsEval Gate in CIRelated pattern
Related patternsHuman-in-the-loop GateRelated pattern
Related patternsKill Switch / Circuit BreakerRelated pattern
Related patternsPolicy CardRelated pattern
ObligationsEU AI Act Art. 14: human oversightNames this pattern
ObligationsEU AI Act Art. 15: accuracy, robustness and cybersecurityNames this pattern
ObligationsEU AI Act Art. 15(4): feedback loops in systems that continue to learnNames this pattern
ObligationsNIST AI RMF MANAGENames this pattern
ObligationsOWASP Top 10 for Agentic Applications 2026Names this pattern
ControlsAIGE-CTL-AGENT-035 Agents that watch agents are governed agentsNames this pattern
ControlsAIGE-CTL-AGENT-016 Code runs only in a sandboxNames this pattern
ControlsAIGE-CTL-AGENT-008 Execution budgetsNames this pattern
ControlsAIGE-CTL-AGENT-023 Memory write gate and rollbackNames this pattern
ControlsAIGE-CTL-EVAL-002 Network Egress ControlNames this pattern
ControlsAIGE-CTL-AGENT-017 Output and egress filterNames this pattern
ControlsAIGE-CTL-AGENT-007 Runtime guardrail on every tool callNames this pattern
ControlsAIGE-CTL-AGENT-005 Tool allow-list, deny by defaultNames this pattern
ControlsAIGE-CTL-EVAL-004 Tool and Action MediationNames this pattern
CasesAgents in a cyber range with open internet took unsanctioned actions against real peopleNames this pattern
CasesSource code pasted into a public chatbot (reported)Names this pattern
CasesClaude models reached real systems from a misconfigured third-party cyber evaluationNames this pattern
CasesAn agent in training reached a public chatbot through the sandbox DNS resolverNames this pattern
CasesThe Garante's ChatGPT order: launch before a lawful basisNames this pattern
CasesAn internally deployed model published a researcher's GitHub token in a public repositoryNames this pattern
CasesMoffatt v. Air Canada: the chatbot's answer is the company's answerNames this pattern
CasesNYC MyCity: a government chatbot that advised breaking the lawNames this pattern
CasesOpenAI agents and Hugging Face: an evaluation environment that was not isolatedNames this pattern
CasesAgents in training shared a file through a public file-hosting serviceNames this pattern