Reference architecture
An AI agent in a regulated environment
A model that reads company data will be fooled by what it reads. In the scheduled AWS run of 26 November 2026, the model this reference ships acted on 6 of 24 instructions planted in its data. Emails delivered outside the company: 0. Records deleted: 0. The decision in front of whoever signs off is not which model to trust. It is what the agent can reach when it is fooled, and what proves that every week.
I built this as a reference, not a product: it runs on kind in CI every day and on three clouds every week, and it does not run in production anywhere. Every number below names the run it came from, read on 1 and 2 December 2026.
- AWS, EKS 123 of 123 checks passed, scheduled run 45811111287, 26 Nov 2026
- Google Cloud, GKE 101 of 101 checks passed, scheduled run 46000020626, 27 Nov 2026
- Azure, AKS 106 of 106 checks passed, scheduled run 46754022960, 1 Dec 2026
Three lines, in a buyer's terms
The agent is one line of three. Oxy stands in front of the model providers, and the evidence packs turn each scheduled run into signed findings an auditor can check without me. Each is held to the same three questions: which risk it closes, what a run costs, and which regulatory date it is built for.
| Line | The risk it closes | What a run costs | The date it is built for |
|---|---|---|---|
| The agent and its boundary | An agent fooled by what it reads sends data out, deletes records, or uses rights the person never had. | About $1.68 for one scheduled run on each of three clouds, 24 to 27 November. | EU AI Act, Articles 12, 14 and 15 for a high-risk system: 2 December 2027 under Annex III. CRA, Annex I: 11 December 2027. |
| Oxy, the gateway to model providers | Spend nobody capped, a secret in a prompt, a stop that does not stop, an audit with holes. | $0 in model spend: one proof job of 12 min 39 s on a runner GitHub does not bill for a public repository. | EU AI Act, Article 12 logs and the Article 14(4)(e) stop: 2 December 2027. CRA, Annex I, Part I, points (d), (e) and (l): 11 December 2027. |
| Evidence packs | A control claimed on a slide that no run can show. | No cloud of its own: about 32 minutes of an unbilled runner a day, reading the flagship's signed records. | CRA, Annex VII, point 6, test reports in the technical documentation: 11 December 2027. EU AI Act, Article 11: 2 December 2027. |
A date is when a duty applies to whoever places such a system on the EU market. It is not a claim that this reference meets the duty, and no assessor has looked at any of the three. The dates and their sources are in regulatory dates.
What is built
One agent, its tools, one boundary, and the checks that try to break it. The model runs inside the cluster from an image signed with the operator's key. Everything the cluster runs crosses into it as one signed file, and the registry inside holds exactly what that file carried, by digest. The agent reaches its tools only through an MCP server that holds every call to the rights of the person it acts for. Every model request goes through one gateway that knows who is calling, and the records service takes only a credential that Vault issues for 60 seconds.
On the clouds the boundary is the provider's own network with nothing open:
- AWS, EKS: a VPC with no internet gateway and no NAT, AWS's services through endpoints, a DNS firewall that refuses every name outside AWS.
- Google Cloud, GKE: a network made without its internet route, and a Cloud DNS response policy that refuses every name outside Google's APIs.
- Azure, AKS: a network isolated cluster with outbound type none, and a DNS resolver policy that refuses every name but the registry's and the network's own.
Each run builds the cluster from nothing, tries every way out from a pod and from the node, runs the agent through its tasks, then destroys everything and looks for what is left. A refusal only counts beside a control that must succeed. A dead network cannot pass for a closed one.
What the agent can reach, and what holds it
Nothing in this design relies on the model behaving. Each row is a check in the scheduled AWS run of 26 November, run 45811111287, unless it names another; the full threat model maps them to the OWASP Top 10 for LLM Applications 2025 and for Agentic Applications 2026.
| The agent can | It cannot | What holds it | Shown in the run |
|---|---|---|---|
| Read customer records and company documents. | Read anything the person it acts for may not read. | The MCP server checks the agent's token and the person's on every call, and lets through only what both may do, down to the person's own customers. A customer outside them is answered as one that does not exist. ADR 15 | 12 of 12 tasks handled within the person's rights; 3 calls refused as another person's customer. |
| Email colleagues inside the company. | Deliver anything outside it. | The tool's schema holds the recipient to the company's domain, and the MCP server checks every call before anything upstream sees it. ADR 13 | Emails delivered outside: 0, a gate for every model. The 8B model on the GPU tried once and was refused. |
| Call the model. | Reach a model server around the gateway, or spend as someone else. | One gateway checks a service account token for its own audience and keeps a quota per caller: 100 requests and 100,000 tokens a minute for the agent. ADR 11 | 204 model requests asked by the agent, 204 answered by the gateway, every token counted. With the gateway's pod killed, the model server still could not be reached around it. |
| Run what the signed bundle carried. | Run weights nobody signed, a model without an AI-BOM or under a licence the site does not allow, or an image the bundle never carried. | Kyverno verifies the signature and the AI-BOM at admission with no network. While Kyverno is away, the API server's own guard refuses every model. ADR 17 | With Kyverno at zero replicas the signed model was refused too, an outage and not a hole, while the model already served kept answering. |
| Read a record with a credential. | Hold a credential that outlives a minute, or delete a record. | Vault issues a 60-second credential to the MCP server's service account alone. No role issues the delete scope. ADR 24 | Identity disabled: a new credential refused after a median 1.2 s, a copied one refused after a median 60.0 s. A delete with a valid credential: 403. Records deleted: 0. |
| Nothing outside the boundary. | Open TCP to the internet or resolve an outside name, from a pod or from the node. | The cloud's own network: no route out, and a resolver that refuses every outside name. ADR 18 | 1.1.1.1:443, 8.8.8.8:53, 151.101.0.81:443, example.com and a public resolver refused, beside controls that reach the registry inside on 443. |
The model on CPU is Granite-4.0-1B; on the GPU, in the same run, Granite 4.1 at 8B parameters on an NVIDIA A10G. Both acted on 6 of 24 planted instructions, every one of them hidden in a quarterly report. The threat model lists every threat with its control and its check.
What it does not hold
A security review will find these, so they are written down first, each with what would close it.
- The model is fooled. The boundary decides what being fooled can reach; it does not stop the model from trying.
- Email inside the company goes where the model decides. In the same run the 1B model sent 19 emails to colleagues nobody asked for, the 8B model 22. No person approves a send today. A recipient list per task, or a named approver at the MCP server, would close it.
- The model gateway knows the agent, not the person it acts for, so the quota is the agent's.
- The audit is pod output: no retention and no tamper evidence until it is shipped to an append-only store outside the cluster.
- Signatures are checked by key, with no transparency log, and in CI the keys are made per run. At a real site the key lives in the site's HSM or KMS.
- One registry, and one replica of most services outside the node-loss drill. A reference for controls, not for availability.
The full list, with the control each gap touches and what would close it, is the flagship's page of the gaps a CISO will look for.
Controls, and where the signed evidence is
Every scheduled cloud run that passes becomes an evidence pack: the run's own results, signed by the repository that ran the cloud, turned into OSCAL assessment results, validated with compliance-trestle and signed again. A control counts only when the run shows a violation it refused and, beside it, something that had to work.
| NIST SP 800-53 | Tried in the run, and refused | Asked of |
|---|---|---|
| SC-7 Boundary Protection | A pod and the node each try three outside addresses, a public name and a public resolver | AWS, Google Cloud, Azure |
| SC-7(5) Deny by Default | The same attempts, beside each allowed exception answering | AWS, Google Cloud, Azure |
| AC-4 Information Flow Enforcement | The model server reached directly with the gateway's pod killed | AWS, Google Cloud, Azure |
| SI-7 Integrity | The signed bundle with one byte changed; a model named by tag | AWS, Google Cloud, Azure |
| SR-4 Provenance | A signed model with no AI-BOM | AWS, Google Cloud, Azure |
| SR-11 Component Authenticity | Weights nobody signed, weights another key signed, an image the bundle never carried | AWS, Google Cloud, Azure |
| AC-6 Least Privilege | Vault asked to log in as the agent and as another service account; a delete with a valid credential | AWS, Google Cloud, Azure |
| IA-9 Service Identification | The records service asked with no credential, a random key, the cluster's token, an expired one | AWS, Google Cloud, Azure |
The latest packs: AWS 45811111287, 8 of 8 controls satisfied; Google Cloud 46000020626, 8 of 8; Azure 46754022960, 8 of 8, the first Azure pack with all eight. The index of every scheduled run lists the failed ones too, and on 2 December it showed packs in a row: AWS 3, Google Cloud 4, Azure 5, each built by the mapping of its day.
Checking a pack trusts nothing of mine. The record of the run is signed for one exact identity, the flagship's own workflow on main, and its sha256 must match the results file:
cosign verify-blob evidence/run/record.json \
--bundle evidence/run/record.json.sigstore.json \
--certificate-identity https://github.com/heyvaldemar/kubernetes-air-gapped-ai-agent/.github/workflows/cloud-results.yml@refs/heads/main \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
sha256sum evidence/run/e2e-results-aws.zip What an auditor gets
- For every scheduled run that passed, on AWS, Google Cloud and Azure: OSCAL assessment results with a finding for each control its mapping asks of that run; by mapping 1.3.0, eight on every cloud. They are validated with compliance-trestle and signed keyless by the pack's own workflow. The three packs of v1.3.0, released 2 December, have eight findings each.
- The run's record, signed by the flagship's workflow on main, and the results file it names by sha256.
- A check that trusts nothing of mine. scripts/stranger.sh verifies a whole release with an empty environment and no token, and refuses a pack with one byte appended. The release of v1.3.0 ran it on itself (run 46775207292).
What it does not cover
- A pack shows what one scheduled run did. It does not say that any system meets a framework, and no assessor has given an opinion on it.
- AC-6 and IA-9 are shown for the records credential alone. The agent's own two tokens, the Kubernetes API token refused at the gateway, the MCP server's check of the agent's token and the rights of the person it acts for are tried in the flagship's daily runs on kind, not on a cloud.
- On Azure the Vault checks rest on the step of the flagship's AKS workflow that runs them and on its ADR 23, at the run's commit. Its ADR 24 names AWS and Google Cloud.
- The Azure packs of 17 and 24 November on the branch packs were built by mapping 1.2.0 and keep two findings each. A kept pack is never rebuilt, and each names its mapping.
- In the release's own run the stranger's script is handed the release's file names and does not ask GitHub for each run's record; the step before it already has. Run by hand with no names, it asks for both.
- AU-2 and CM-7 wait for a violation shown in a scheduled run. SOC 2 is not included: AICPA's own mapping cannot be fetched and pinned by a build.
- The flagship signs a run's record after the run, from GitHub's record of it. The cloud job does not sign its own results.
The flagship's compliance page maps the same checks to the NIST AI RMF and its Generative AI Profile, ISO/IEC 42001 Annex A and the EU AI Act, on the same terms: evidence for a control, never a verdict on a system.
Oxy: the gateway in front of the models
The boundary above closes the network around one agent. Oxy stands in front of the model providers themselves, hosted or self-hosted, and decides before a request leaves: whose budget it spends, which secret it carries, whether its session was stopped, and which row records it. Oxy has two co-authors, named in its README; my part is its security model and the proofs. Each control is measured in CI against a fake provider that records what reaches it, and each proof is shown the bug it exists to catch.
| The risk | Measured in CI | What does not hold yet |
|---|---|---|
| Spend nobody capped | 541 requests, 100 at a time, against a $0.05 budget: the provider served 35, exactly what the budget buys. Overspend $0. After Redis lost the spend counter, 0 of 20 more were served. | A budget is the project's total, not a month's. Only the project's cap is enforced, not an agent's. If Redis loses the counter, at most the last minute's spend can be spent again. |
| A secret in a prompt | 11 secret types sent: 0 reached the provider. A clean request in the same run did. | Detection is by pattern: API keys, tokens, private keys, card numbers. An email address alone passes. |
| A stop that does not stop | 291 requests started after the kill returned: 0 reached the provider, the first refused 146 ms after the call. Another tenant's kill attempt answered 404. With Redis paused for 8.2 s, 0 of 8 guarded requests got through. | Best effort, with no SLA. Approving a single MCP tool call before it runs is not wired. |
| An audit with holes | 1,162 requests with a valid key, 1,162 rows, refusals and the 9 requests the provider failed included. A key revoked in the dashboard kept all 4 of its rows. | A retention window is stored per organization; deletion by it is not wired yet. |
Every number in the table comes from CI run 46967155704 of 2 December, the run the v1.1.4 README cites, on the code of 1.1.4: all thirteen proofs held, and all twenty-two planted bugs were caught, each by the proof written for it. CI on main at the release commit, run 46972062029, held them again with 22 of 22 plants caught. Over the 30 days in status.json, 53 of 56 runs on main passed. A proof that never saw its bug proves nothing.
- A self-hosted model, the same rules: 12 requests for a vLLM model against a $0.02 budget, 3 served, exactly what it buys; 11 of 11 secret types refused with 451; 5 of 5 requests after a kill refused. No provider key exists anywhere in that proof.
- One tenant as another: 25 requests carrying another tenant's agent and session ids, 25 refused with 403, none reached the provider. A key revoked a moment after use: 10 of 10 next requests refused.
- Each organization's own provider key: before v1.1.0, every organization's request left with the first organization's provider key; each call has built its own provider since. Until v1.1.2, the Gemini adapter handed its key to Google's SDK through a setting of the whole process, so concurrent Gemini requests of two organizations could cross. It now sends each request's key in that request's header. In the proof, 80 Gemini requests of two organizations, 40 in flight at a time, all left with the sender's own key. With the old setting planted back, 25 of the 80 crossed.
- A provider's failure, audited and refunded: until v1.1.4, a request the provider answered with an error, a dropped connection or silence left no audit row and kept its budget reservation, so a project's budget ran out early; nothing was overspent. In the new proof, 9 such requests left 9 rows with the status error, and the budget then bought all 34 requests it buys. With the old handling planted back, they left 0 rows and the budget bought 25 of the 34.
A proof run costs no model spend, because the provider is a recording fake. The job took 12 minutes 39 seconds on a standard GitHub-hosted runner, which GitHub does not bill for a public repository. Oxy and the flagship have not been run together yet: Oxy speaks the OpenAI API on both sides, and that is all this page claims about the fit.
What a run costs
Each cloud run prints its own cost table after the destroy and the residue check, which found nothing of the run and nothing of any earlier one. The prices are on-demand list prices for the hours the run held each resource.
| Cloud | Scheduled run | Time | Cost | Where it went |
|---|---|---|---|---|
| AWS, EKS | 45811111287, 26 Nov | 1.67 h | about $1.20 | control plane $0.17, one m7i.xlarge $0.34, six endpoints $0.20, an NVIDIA A10G node (g5.xlarge) for 0.49 h $0.50 |
| Google Cloud, GKE | 46000020626, 27 Nov | 0.71 h | about $0.20 | cluster management $0.07, one c3d-standard-4 $0.13 |
| Azure, AKS | 45411463107, 24 Nov | 0.87 h | about $0.28 | one Standard_D4as_v7 $0.16, the Premium registry by the hour $0.06; Azure Cost Management billed CA$0.32 for the run |
The three runs of that week came to about $1.68 at list prices. A week of proof on three clouds costs less than two dollars.
- A task inside, on CPU: about $0.000255, 20.6 vCPU-seconds of Granite-4.0-1B at on-demand list price (run 45811111287). On the A10G, the 8B model: about $0.000476 a task.
- A task connected, through one exit: about $0.000362 for Claude Haiku 5.5 and $0.005646 for Claude Sonnet 5.5, their tokens at Anthropic's list price, and neither acted on any of the 24 planted instructions (run 46154990162, 28 November). The prompts and the records the agent reads go to the model's provider. No API key exists: each run trades its GitHub identity for a token that lives ten minutes, from a workspace whose monthly limit refuses anything past $10.
- Serving at volume: in kubernetes-llm-inference-gateway, four vLLM replicas of Qwen2.5-1.5B-Instruct sharing one NVIDIA L4, 16 conversations at a time, a million output tokens cost $1.03 through the llm-d router against $1.29 through a round-robin Service, on the g6.xlarge alone (scheduled run 42472122098, 8 November, about $0.67 for the run). The scheduled run of 29 November found no GPU in any zone, so that run is not called weekly until two pass in a row again.
Regulatory dates
Read in the Official Journal on EUR-Lex on 2 December 2026. The AI Act's high-risk duties have moved once already, and a date on this page changes only with the act that moves it.
| Act | What applies | From | Source |
|---|---|---|---|
| EU AI Act | Chapter III, Sections 1 to 3, the duties for high-risk systems, Articles 11 to 15 among them | 2 December 2027 under Annex III; 2 August 2028 under Annex I. Moved from 2 August 2026 by Regulation (EU) 2026/1744, published 24 July 2026. | 2026/1744, Article 1, point (40) |
| Cyber Resilience Act | Article 14, reporting actively exploited vulnerabilities and severe incidents | 11 September 2026, applying since then. None of the three lines files that report for you. | 2024/2847, Article 71 |
| Cyber Resilience Act | Everything else except Chapter IV, which has applied to notified bodies since 11 June 2026: Annex I's essential requirements and Annex VII's technical documentation among it | 11 December 2027. Unchanged by the amendments listed at EUR-Lex on 2 December 2026. | 2024/2847, Article 71 |
The articles each line points to are in Regulation (EU) 2024/1689: Article 12 asks a high-risk system to record events automatically over its lifetime, and Article 14(4)(e) asks that a person can interrupt it through a stop button or a similar procedure. Annex I, Part I of the Cyber Resilience Act asks for protection from unauthorised access (point d), confidentiality of processed data (point e) and the recording of relevant internal activity (point l). The duty falls on whoever ships the system, not on the reference it was built from.
Measured next
One line of work is being measured now. Its numbers go here when the record that carries them is published, and not before.
- Runtime isolation for the agent Numbers pending
The agent here runs under the restricted Pod Security profile, not in a sandboxed runtime. gVisor, Kata Containers and runc are measured against the same planted instructions in agent-security-benchmark.
agent-security-benchmark
Five questions for any agent, this one included
- When the model is fooled, what can it reach, and where is this week's proof?
- Whose rights does the agent use: its own, or those of the person who asked?
- What leaves the network, to whom, and what shows that nothing else does?
- Where is the credential to the model, and how long does a stolen one work?
- Which check behind each claim has been seen to fail?
Repositories, runs and packs
- kubernetes-air-gapped-ai-agent: the agent, the boundary, the evals, and the one-page brief. Releases carry a keyless signature, SLSA provenance and the evidence of the run each was cut from (v1.10.0, 22 November 2026).
- cloud-results: every finished cloud run, failed ones too, its record signed.
- cloud-evidence-pack: the OSCAL packs, their index, and v1.3.0, the release that asks all eight controls of Azure too.
- oxy-llm-gateway: budgets, DLP, a kill switch and an audit row for every request, with its proofs in status.json.
- kubernetes-llm-inference-gateway: routing by cache in front of vLLM, a cost per million tokens on a real GPU.
- The evidence page and the decisions, read from the fleet daily.
The model will be fooled. Sign off on what it can reach.