SysArt
Book a briefing
SysArt

AI governance and the EU AI Act

Compliance-as-Code for On-Premises AI: Embedding EU AI Act Governance into Deployment Pipelines

How to turn EU AI Act duties and AI policies into automated pipeline checks, collect audit evidence continuously and keep people in charge of judgement calls.

Last reviewed by SysArt AI Governance Team10 min readHow we review

In short

Compliance-as-code turns AI governance rules into versioned, tested checks that run automatically whenever a model, prompt, dataset or configuration changes. For EU AI Act high-risk systems it supports risk management, logging, documentation and post-market monitoring, with evidence recorded as the work happens. It does not replace legal assessment, accountable sign-off or human review.

Key takeaways

  • Compliance-as-code writes governance rules as versioned policies that run automatically at data intake, training, evaluation, release and runtime, and records every decision as evidence.
  • For high-risk systems the EU AI Act sets lifecycle duties: a continuous risk management system (Article 9), automatic logging (Article 12) and provider post-market monitoring (Article 72). Annex III obligations apply from 2 December 2027.
  • Automated checks can confirm that a control exists, is current and operates. Classification, residual-risk acceptance and substantial-modification decisions stay with accountable people.
  • Start with inventory, classification and documentation checks, then add release gates, runtime policies and scheduled drift detection, all writing to one evidence store.
  • Running the pipeline and evidence store on your own infrastructure keeps logs and test results under your control, but the legal obligations stay the same.
Engineer working at a computer terminal representing the integration of compliance automation into AI development workflows

Why do periodic compliance reviews fall short for AI systems?

Because AI systems change between reviews. Models are retrained or replaced, prompts and retrieval sources are edited, agents gain tools and access rights shift, so a system that passed a review in spring can be out of line by summer without anyone noticing.

The EU AI Act frames the main duties for high-risk AI systems as lifecycle duties, not one-off checks. Providers must run a risk management system that is a continuous iterative process, planned and run throughout the entire lifecycle, with regular systematic review and updating (Article 9). The system must technically allow the automatic recording of events over its lifetime (Article 12), and providers must actively and systematically collect, document and analyse data on its performance after release (Article 72). Deployers must monitor operation, keep the logs under their control for at least six months and report serious incidents (Article 26).

These duties apply from 2 December 2027 for stand-alone high-risk systems in Annex III and from 2 August 2028 for AI in products covered by Annex I, the dates set by the Digital Omnibus on AI; our EU AI Act timeline lists the rest. Most organisations also run AI systems that are not high-risk but still fall under the GDPR, sector rules and their own policies.

Compliance-as-code closes the gap between reviews. It does not replace the legal assessment, the accountable decisions or the human review the Act requires. It makes routine checks repeatable and leaves a dated record that they ran.

What is compliance-as-code for AI?

Compliance-as-code means writing governance requirements as machine-readable policies, keeping them in version control and evaluating them automatically whenever an AI system changes. Each evaluation is recorded, so evidence accumulates as a by-product of normal work.

The idea comes from infrastructure-as-code: define the desired state, enforce it in the pipeline and keep the history. Applied to AI, it rests on three practices:

  • Policies are code. Each rule is written, reviewed through a pull request, tested and released like application code, with a reference to the requirement it implements, such as an AI Act article, a GDPR duty or an internal standard.
  • Evaluation is automatic and event-driven. Rules run when a dataset is registered, a model is promoted, a prompt or retrieval source changes or a deployment is requested, and on a schedule.
  • Every decision leaves evidence. The record shows which policy version checked which system version, when, with what input and with what result.

Automated compliance auditing and continuous compliance validation are two uses of the same machinery. The first assembles and checks evidence for auditors; the second watches production for drift. One policy set and one evidence store should serve both.

Where do compliance checks run in the AI lifecycle?

Checks belong wherever the system can change: data intake, training, evaluation, release, runtime and monitoring. Each gate either blocks the workflow or records a finding, depending on how severe the rule is.

  1. Data and training. Before a training or fine-tuning job starts, verify that each dataset is registered, its origin and preparation steps are documented, a legal basis is recorded for any personal data, and a data protection impact assessment is referenced where one is needed. For high-risk systems, Article 10 expects documented data governance, including examination for possible biases and identification of data gaps.
  2. Evaluation. Before promotion, run the agreed evaluation suite and compare the results with thresholds set in advance. Article 9 requires high-risk systems to be tested against prior defined metrics and probabilistic thresholds, at the latest before they are placed on the market or put into service.
  3. Release. Before deployment, confirm that the technical documentation describes the version being released, the risk classification is recorded, human oversight measures are configured, named approvers have signed off and monitoring is in place.
  4. Runtime. At the inference gateway, enforce routing by data classification, tool and permission limits for agents, rate limits by role, output filters and, where Article 50 applies, disclosure that people are dealing with an AI system.
  5. Monitoring. On a schedule and on events, compare the running system with its approved baseline: model version, configuration, access rights, logging status, and quality and drift metrics.

The Act gives release gates a useful rule for high-risk systems. A substantial modification triggers a new conformity assessment (Article 43), but a change that was foreseen or planned in the initial conformity assessment is not a substantial modification under the Act’s definition. Article 43 confirms this for pre-determined changes to systems that continue to learn, provided they are described in the technical documentation. A gate can therefore compare each change with the documented envelope of planned changes and send anything outside it to a person for a substantial-modification decision.

Which EU AI Act requirements can be encoded as policy checks?

Checks work best on conditions that can be verified: a record exists, is current and matches the deployed version, or a metric sits inside its threshold. The table maps provider requirements for high-risk systems to example checks and to the judgement that stays with people.

RequirementArticleExample automated checkStill needs human judgement
Risk management9Each system has a current risk assessment linked to its version; open actions have ownersWhether residual risk is acceptable
Data governance10Training, validation and test sets are registered with origin, preparation and bias examination resultsWhether the data is representative enough for the purpose
Technical documentation11, Annex IVEvery Annex IV section exists and refers to the deployed model versionWhether the content is accurate and complete
Record-keeping12, 19Logging is on, logs reach the store and are kept for at least six monthsWhich events matter for identifying risks
Information to deployers13Instructions for use state accuracy metrics, oversight measures and log mechanismsWhether a deployer can understand them
Human oversight14Approval, override and stop functions are configured and testedWhether oversight works in practice
Accuracy, robustness, cybersecurity15Evaluation and adversarial test results meet the declared levelsWhether the declared levels are appropriate
Post-market monitoring72Performance data is collected and analysed as the monitoring plan specifiesWhat the findings mean for risk

Deployers can encode their own duties under Article 26 the same way: use in line with the instructions for use, named and trained overseers, relevant input data, monitoring, log retention and, for Annex III systems that make or assist decisions about people, informing those people.

Some questions should never be settled by a policy engine: whether a system is high-risk under Article 6, whether a change is a substantial modification, whether an event is a serious incident, and whether your organisation has become the provider of a system it adapted. The engine can, however, confirm that each of these decisions was taken, recorded and approved by someone with the authority to make it. Our guide to high-risk AI systems explains the classification rules and requirements in detail.

What does a compliance-as-code architecture look like on-premises?

A working architecture has four parts: a policy repository, a policy engine, integrations with the AI platform and an evidence store. On-premises, all four can run inside the same boundary as the AI systems they govern.

Policy repository. Policies live in version control with tests and change review. Open Policy Agent, a graduated Cloud Native Computing Foundation project, is one option. It separates the policy decision from its enforcement, evaluates structured input such as a JSON description of a model release against rules written in its Rego language, and is used in CI/CD pipelines, Kubernetes and API gateways. Its opa test command runs policy unit tests and reports coverage. Test each rule against known-good and known-bad cases before it can block a release, because a rule that never fails proves nothing.

Policy engine and integrations. The engine receives events from the model registry, training orchestrator, deployment pipeline, inference gateway and monitoring system, and returns a decision with its reasons. Each rule is either blocking, so the workflow stops until it passes, or advisory, so a finding is raised and tracked.

Evidence store. Every evaluation writes an append-only record: policy version, system and model version, input, result, time and approver. Store it so that the teams whose work is checked cannot alter the records afterwards. Over time this store becomes the main source for audits and for the post-market monitoring that providers must document.

Independent validation. Run scheduled validation with its own read-only credentials and storage, so that a failure in the AI platform does not also switch off the checks meant to detect it. Send findings to the ticketing system, the security operations centre or the governance dashboard, so compliance events get the same attention as outages.

Layered rule sets. European enterprises rarely face one regime. A base layer applies to every AI system: inventory, ownership, logging and access control. Modules add the AI Act’s high-risk requirements, GDPR processing rules, DORA or sector rules. Map each system to the modules that apply, based on its intended purpose, data and your role, so low-risk tools are not slowed by controls that add nothing.

Keeping the pipeline, logs and evidence on your own infrastructure means test results and audit trails stay under your control, which simplifies data protection and sovereignty reviews. It does not change what the law requires. SysArt implements this on the client’s existing stack or on VDF.AI, an on-premises AI platform built by VDF AI AB, which grew out of SysArt’s work.

How do you handle compliance drift and exceptions?

Treat every failed check as a tracked event with an owner, a fix, a re-run and a record. The aim is a short, documented path from detection to correction rather than a quiet fix.

Suppose a team edits the prompt template of a customer-facing assistant, and a behavioural check finds that the assistant no longer tells users it is an AI system, a disclosure that Article 50(1) requires providers to design in unless it is obvious. The pipeline opens a ticket and notifies the system owner and the governance lead. The change is reverted, the check runs again and passes, and the sequence is stored as evidence that shows both the deviation and the correction. Our guide to Article 50 transparency obligations covers the disclosure rules.

Three rules keep this process sound:

  • Exceptions are explicit. A waiver names the rule, system, reason, approver and expiry date, and is itself evidence.
  • Remediation preserves evidence. Snapshot the model version, configuration and logs before any automatic rollback. If the event may be a serious incident, Article 73 sets reporting deadlines of no later than 15 days after awareness, shorter for a death, a widespread infringement or a serious disruption of critical infrastructure, and forbids investigations that alter the system in a way that could affect the evaluation of causes before the authorities are informed.
  • Policies change with the rules. When a regulation or internal standard changes, update the policy, run it against current systems and report the gaps. The repository history then shows which rules applied when.

How should you start with compliance-as-code?

Start with the checks that are simplest to automate and most useful in an audit, then add gates and runtime controls as confidence grows. Each step produces evidence on its own.

  1. Inventory and classification. Every AI system has an owner, an intended purpose, a recorded role (provider, deployer or both) and a classification decision. The EU AI Act risk checker gives a first indication for a single use case.
  2. Documentation completeness. Check that documentation for each high-risk system exists, follows Annex IV and refers to the deployed version.
  3. Evaluation and release gates. Add agreed test suites and thresholds before promotion, starting with accuracy and safety, then bias and robustness.
  4. Runtime policies. Enforce data-classification routing, agent tool limits and disclosure at the gateway.
  5. Continuous validation. Check every deployed system against the full policy set on a schedule and report drift.
  6. Evidence drills. Pick a system at random and ask the team to produce its classification, current documentation, latest evaluation results and oversight records. Gaps found in a drill are cheap to fix; gaps found during a regulatory inquiry are not.

The rules you encode should come from a governance framework, not the other way round. Our AI governance framework template sets out the policies, roles and controls worth encoding first.

This article describes engineering practice, not legal advice. Whether a system is high-risk and which duties apply depend on its intended purpose and your role, so confirm them with qualified counsel. SysArt’s AI governance service designs and implements these controls and the evidence behind them.

Featured image by ThisisEngineering on Unsplash.

Frequently asked questions

What is compliance-as-code for AI?

Compliance-as-code is the practice of writing governance requirements as machine-readable policies, keeping them in version control and evaluating them automatically in AI pipelines. A policy might block a release when the technical documentation does not match the model version, or when evaluation results miss an agreed threshold. Every evaluation is recorded, so the organisation builds a dated trail of which rule was applied to which system version, and with what result.

Does the EU AI Act require automated compliance checks?

No. The Act does not prescribe tools. It requires providers of high-risk systems to run a documented risk management system throughout the lifecycle, enable automatic logging, keep technical documentation up to date and monitor systems after release. Deployers must monitor operation and keep logs. Automated checks are one practical way to carry out and evidence these duties consistently, but passing them does not establish compliance on its own.

What is the difference between continuous compliance validation and an audit?

Continuous validation runs checks whenever something changes and on a schedule, so drift is found between reviews rather than months later. An audit is an independent, periodic examination of whether controls are well designed and operate as intended. Validation results are useful audit evidence, and the audit should test the checks themselves, but neither replaces the judgement of the people accountable for the system.

Which EU AI Act requirements can be automated?

Checks work best on verifiable conditions: the system is in the inventory with a recorded classification, documentation exists for the deployed version, logging is enabled and retained, evaluation results meet thresholds set in advance, and oversight controls are configured and tested. Whether a system is high-risk, whether residual risk is acceptable and whether a change is a substantial modification need a documented human decision.

Which tools are used for policy-as-code?

Open Policy Agent, a graduated Cloud Native Computing Foundation project, is one option. Its Rego policies evaluate structured input, such as a JSON description of a model release, and return a decision, and the opa test command runs policy unit tests with coverage reporting. Teams combine it with their CI/CD system, model registry and log platform. Versioned, tested policies and a single evidence store matter more than the choice of engine.

When do these EU AI Act obligations apply?

The risk management, logging, documentation and post-market monitoring duties for stand-alone high-risk systems listed in Annex III apply from 2 December 2027, and for AI in products covered by Annex I from 2 August 2028, the dates set by the Digital Omnibus on AI. Most other rules, including the Article 50 transparency duties, have applied since 2 August 2026.

Related insights

Plan your private AI with people who build it

Book a briefing. We look at your use case, data and constraints, and you leave with the deployment options and governance steps that fit.