Veles — Field Reference · AIS-2026

AI Architecture & Security Blueprint

For the founder or CTO who owns the AI security decision: what "done right" actually looks like, what it costs to get wrong, and why most companies end up paying someone to build it rather than losing a quarter to it.

DocumentVELES-AIS-2026
Revision1.0
IssuedJul 2026
DistributionPublic
Reading time~14 min
Sections00 – 10

If you own the budget, not the codebase

The deal that stalls in security review. Enterprise buyers now ask for your AI architecture before they sign — get this wrong and the deal doesn't die loudly, it just goes quiet.

The fine that shows up eighteen months later. Recordkeeping and access-control gaps don't surface at launch. They surface in an audit, after the cost of fixing them has compounded.

The quarter your best engineer spends learning this instead of shipping. Everything below is buildable in-house. It's also a genuine specialty — most teams pay for it exactly once they've priced out doing it themselves.

This document is the standard we hold every client to. Read it end to end, hand it to your engineers, or skip straight to having us implement it.

Book a 15-minute call → No pitch deck. We'll tell you honestly if it's a fit.

What good architecture actually buys you

3wk → 3d Deployment time [14] What proper fabric + automation buys you, proven at supercomputer scale.
25% → 45% AI-authored code [16] Share of shipped code after fine-tuning an agent on your own repos.
$1,300 Per-repo specialization [17] What it costs to adapt a coding agent to one unfamiliar codebase.
14–80× Faster, zero malformed output [12] Structured generation your downstream systems can trust without checks.
$0.00025 Per-transaction settlement [21] Vs. 2.9% + $0.30 on cards — what makes agent-to-agent commerce viable.

§ 00 — Foreword

Why this document exists

Most "AI security" content is vendor marketing wearing a lab coat, or a checklist lifted from a compliance blog and re-skinned with a stock photo of a padlock. This is neither. It's the reference architecture we actually reach for when we build AI systems for organizations that can't afford to get this wrong — regulated finance, defense-adjacent contractors, anyone whose general counsel reads the trade press.

Every figure below is sourced to a primary document — a standards body, a vendor's own engineering blog, an SEC release, a peer-reviewed paper — not an aggregator's listicle. Where something is still unproven, we say so. Agent-to-agent payments, for instance, are real and moving fast, but they are not yet a production default, and we've labeled them accordingly.

§ 01 — Diagnosis

The barrier was never the model

For two years, the industry conversation about enterprise AI adoption centered on capability — was the model smart enough, fast enough, cheap enough. That conversation is over. Capability stopped being the constraint sometime in 2025. What replaced it is trust, and the data is specific about where that trust breaks down.

McKinsey's State of AI Trust in 2026 found that nearly two-thirds of respondents cite security and risk concerns as the top barrier to fully scaling agentic AI — ahead of regulatory uncertainty, ahead of talent, ahead of cost.[1] Within that group, 74% flagged inaccuracy and 72% flagged cybersecurity as highly relevant risks to their organization.[1] Gartner's newsroom named agentic AI's expanding attack surface the #1 cybersecurity trend for 2026, pointing specifically to "unmanaged AI agent proliferation, unsecured code, and potential regulatory compliance violations."[2]

"Nearly two-thirds of respondents cite security and risk concerns as the top barrier to fully scaling agentic AI."— McKinsey, State of AI Trust in 2026

Gartner's forward numbers are worth sitting with, and worth reading as forecasts, not measurements: by 2028, a quarter of enterprise generative-AI applications are projected to suffer five or more minor security incidents a year, up from 9% in 2025; by 2029, 15% are projected to have at least one major incident annually, up from 3% in 2025.[3] A separate Gartner market guide on "guardian agents" puts a finer point on where those incidents originate: through 2028, at least 80% of unauthorized AI agent transactions are projected to trace back to internal policy violations around information oversharing — not external attackers.[4]

That last statistic is the one that should reshape how you think about this problem. The threat model for agentic AI is mostly internal, mostly about scope and permissions, and mostly solvable with architecture rather than a new SKU. The rest of this document is that architecture.

§ 02 — Infrastructure

Build the fabric for east-west, not north-south

Why this is on your desk, not just your engineers': get the network topology wrong and everything you build on top of it — latency, cost, the ability to scale without a re-architecture — inherits the mistake. This section is what to check before you approve a vendor's diagram, not a tutorial.

Every legacy network was designed around a simple assumption: most traffic goes to the internet. Core-aggregation-access topologies optimized for that north-south flow. AI training and inference invert it completely — the dominant traffic is GPU-to-GPU gradient sync, GPU-to-storage checkpointing, server-to-server east-west flow that barely touches the internet at all. A three-tier legacy design can't equalize latency for that pattern, which is exactly why it's been displaced by Clos / spine-leaf fabric across every serious AI buildout.[5]

The mechanics: leaf switches connect directly to compute nodes; spine switches connect to every leaf, so any two nodes are always the same number of hops apart. IBM's HPC reference architecture is blunt about why this specific topology won: "the fat-tree topology is the most common one for InfiniBand … [it] provides a fully non-blocking network if the uplinks have the same throughput as the links to the nodes."[5] NVIDIA's DGX SuperPOD reference architecture implements exactly this — a three-tier fat-tree over Quantum-2 InfiniBand at 400 Gb/s per port, sized for full bisection bandwidth.[6]

Spine-leaf network fabric with an NVLink scale-up domain SPINE 1 SPINE 2 SPINE 3 LEAF A LEAF B LEAF C LEAF D NVLINK DOMAIN — GB200 NVL72 · 900 GB/S GPU NODES — INTRA-RACK, NVLINK ("EAST-WEST", COMPUTE FABRIC) ↑ NORTH-SOUTH (THIN)
FIG. 1 — Spine-leaf fabric with an NVLink scale-up domain. Every leaf reaches every spine in one hop for non-blocking east-west bandwidth; NVLink handles the tighter intra-rack GPU domain, InfiniBand or Spectrum-X Ethernet handles scale-out between racks.

Inside a rack, NVLink does the tightest-coupled work: NVIDIA's GB200 NVL72 puts 72 GPUs in a single NVLink domain at 900 GB/s, and NVIDIA's own documentation labels this GPU compute fabric "east-west," reserving "north-south" for the converged fabric that talks to the rest of the network.[7] Get this topology wrong and every other layer in this document inherits the latency problem — orchestration, retrieval, and inference all sit on top of it.

§ 03 — Orchestration

Orchestration you can put in front of an auditor

Why this is on your desk, not just your engineers': this is the layer that determines whether "the AI made a mistake" is an acceptable answer to your board, or a liability. An agent that can call tools and an agent you can audit are two different engineering problems, and most agent frameworks only solve the first one. The stack below solves both by separating four concerns that are usually tangled together: reasoning, durability, access control, and output shape.

LangGraph handles the reasoning graph — a low-level orchestration layer built for long-running, stateful agents, with durable execution, streaming, and human-in-the-loop checkpoints baked in. Its distinguishing feature is the ability to mix deterministic steps with LLM-driven agentic steps inside a single graph, rather than forcing everything through a model call.[8] It's in production at Klarna, Replit, and Elastic.[8]

Temporal sits underneath as the durable execution engine — the part that survives a crash mid-workflow. Temporal now ships an official LangGraph plugin, and the framing its own engineers use is exactly right: LangGraph is the brain, Temporal is the muscle. Tool calls become retryable activities; the reasoning loop becomes a workflow that survives a process restart without losing state.[9]

Orchestration pipeline: LangGraph, Temporal, MCP gateway, XGrammar AGENT GRAPH LangGraph CRASH-SURVIVING WORKFLOW BOUNDARY (TEMPORAL) RETRYABLE ACTIVITY Temporal MCP GATEWAY RBAC / CBAC tool allow-list XGRAMMAR constrained decoding DOWN- STREAM SYSTEMS
FIG. 2 — Every tool call leaves the durable workflow through an MCP gateway that enforces access control, and every model response returning to a downstream system is shape-constrained by XGrammar before it's trusted.

Tool access is enforced at an MCP gateway, not by convention. Red Hat's OpenShift AI 3 ships MCP support with role-based access control and OAuth, and its gateway enforces policy and RBAC rules on every call rather than trusting the agent to self-limit.[10] The field is already moving past static RBAC toward context- and attribute-based access control — CBAC/ABAC — plus tool-level allow-lists, a shift documented by Aembit, Cerbos, and a recent arXiv survey of MCP security patterns.[11] Build for that direction now; retrofitting access control after an incident is a much worse project.

Finally, every model output that a downstream system will act on is passed through XGrammar, a constrained-decoding engine out of CMU, NVIDIA, SJTU, and UC Berkeley.[12] It pairs a pushdown automaton with an adaptive token-mask cache to guarantee structurally valid JSON, regex, or grammar output with near-zero overhead — up to 14× faster than naive constrained decoding on JSON schemas, 80× faster on full context-free grammars.[12] It's now the default structured-generation backend in vLLM, SGLang, TensorRT-LLM, and MLC-LLM. In practice: your agent cannot emit a malformed instruction to a system that executes trades, writes to a database, or files a ticket. It's not a possibility you handle with error-checking downstream — it's structurally excluded upstream.

§ 04 — Deployment model

Keep inference inside your own perimeter

"Sovereign AI" gets used two ways, and both matter here. At the national-policy level — NVIDIA's own framing, echoed in EU, UAE, and Australian frameworks — it means treating where AI processing happens like a data-residency question, not just where data is stored.[13] At the architecture level, it's narrower and more actionable: build, deploy, and govern AI with real control over your data, infrastructure, and models, instead of routing every inference call through a third party's API and hoping their terms of service age well.

The drivers are concrete, not ideological: data residency obligations under GDPR, sector rules in BFSI and healthcare (HIPAA), defense contract requirements, and the simple desire to keep proprietary code and data from ever crossing a boundary you don't control. The serving stack that makes this practical today is vLLM and TensorRT-LLM for inference, with models running inside your VPC and retrieval enforced through the same RBAC layer covered in §03 — not a separate, weaker permission system bolted on for the AI use case.

Verified — not marketing copy

This isn't a hypothetical. §05 below is a real supercomputing deployment running exactly this pattern, at a scale most enterprises will never need but that proves the architecture holds under load.

§ 05 — Case reference

Proof at scale: NCHC Nano4

Taiwan's National Center for High-Performance Computing, working with ASUS, built a dual-architecture cluster combining NVIDIA HGX H200 (locally named "晶創26," Nano4) with a GB200 NVL72 system. Nano4 debuted provisionally at #29 on the November 2025 TOP500 list at SC25. On the official June 2026 TOP500 list, after formal entry into operation on June 1, 2026, it settled at #33 — 81.55–81.6 PFLOPS Rmax across 256,960 cores, drawing 2.214 MW.[14]

Two operational numbers matter more than the ranking. First, PUE 1.18, achieved through direct liquid cooling — a power-usage-effectiveness figure that puts it near the efficiency ceiling for air-adjacent facilities. Second, ASUS's own deployment automation reduced the buildout timeline from three weeks to three days, a figure ASUS has confirmed verbatim in its own press materials.[14] Both numbers are the direct product of the fabric and automation discipline described in §02 — they aren't a separate achievement, they're what that architecture looks like at supercomputer scale.

If you've seen enough

Everything from here on — code agents, model licensing, recordkeeping, agent payments — is depth for your technical team. If the first five sections already told you what you needed to know, book a call and we'll take it from here.

§ 06 — Code intelligence

Code agents that actually learn your codebase

Worth being precise here, because the product landscape gets misrepresented constantly, including in earlier drafts of this document. Sourcegraph Cody is a retrieval system, not a fine-tuned one. Sourcegraph's own engineering blog is explicit: "Today, we use RAG to power Cody's responses … for code retrieval specifically, we find RAG to be the more appropriate tool for the job."[15] Cody combines BM25-style code search with local IDE context — no per-customer fine-tuning is documented anywhere in Sourcegraph's own materials. Sourcegraph discontinued Cody Free and Pro in July 2025 and now points users toward Amp, spun off as a separate company that December; Cody Enterprise remains, and remains retrieval-based.

If you specifically want fine-tuning on your own repositories, two products actually do it. Tabnine's "Trainbox" retrains a universal model on a customer's selected private repos.[16] Refact.ai fine-tunes on internal codebases directly and reports the share of AI-written code in its customers rising from 25% to 45% after fine-tuning.[16]

The more interesting data point is how cheap per-repo specialization has become. Ai2's SERA — the first release in its "Open Coding Agents" line, published January 27, 2026 — resolves 54.2% of SWE-bench Verified with SERA-32B, trained on a cluster of just two NVIDIA Hopper GPUs using a technique Ai2 calls Soft-Verified Generation.[17] Total cost for data generation and training: $2,000, or 40 GPU-days. Ai2's own number for adapting it to a single unfamiliar repository is roughly 8,000 trajectories — about $1,300.[17] That figure is the one to remember: specializing a coding agent to your specific codebase is no longer a research-lab budget line, it's closer to a line item.

§ 07 — Model selection

The 2026 open-weight roster

The thesis behind sovereign deployment only holds if the open-weight models are actually competitive, and as of mid-2026 they are — matching or beating closed APIs on many coding and reasoning benchmarks while running entirely inside infrastructure you control. License terms vary more than capability does, so read the second column carefully.

ModelLicenseNotes
Qwen3 familyApache 2.01.7B–235B; MoE flagship Qwen3-235B-A22B. Qwen3.5 generation emerging.
Llama 4CustomScout / Maverick. Meta's license caps commercial use at 700M MAU.
DeepSeek V3 / V4OpenStrong general reasoning; widely deployed in private inference stacks.
GLM-5.xOpenParticularly strong on coding / SWE-bench-style tasks.
Gemma 3OpenSingle-GPU friendly — the 27B variant runs on one RTX 4090.
Mistral Small 3.xApache 2.0Clean commercial license, competitive at smaller parameter counts.
NVIDIA NemotronOpenExplicitly positioned for regulated, sovereign, auditable deployments — published weights, datasets, and training recipes.

If clean commercial licensing is a hard requirement — which it usually is, the moment legal gets involved — Qwen3, Gemma 3, and Mistral Small 3.x are the Apache-2.0 picks. Llama 4 is capable but carries Meta's custom license and its 700-million-monthly-active-user cap, which matters more than people expect once you're building something that might actually succeed.

§ 08 — Compliance

Recordkeeping that survives an audit

For regulated financial firms, the controlling rule for electronic records is SEC Rule 17a-4 (17 CFR § 240.17a-4) — the broker-dealer recordkeeping and retention rule, companion to Rule 17a-3, which governs what records must be created in the first place. Historically, it required electronic records to be kept exclusively in non-rewriteable, non-erasable WORM format. On October 12, 2022, the SEC adopted amendments, effective January 3, 2023, that kept WORM as an option and added an audit-trail alternative — a system that permits recreation of an original record if it's later modified or deleted.[18] Your electronic recordkeeping system needs to satisfy one of the two, not necessarily WORM specifically.

Retention periods, per §240.17a-4 and FINRA Rule 4511: daily blotters, general ledgers, and customer account ledgers — 6 years, with the first two years readily accessible. Most other records, including written agreements, bank records, bills, and communications — 3 years, first two accessible. Customer account records — 6 years after account closure. Articles of incorporation and minute books — life of the firm plus 3 years.

Context, not a rule

Since December 2021, the SEC's off-channel-communications initiative has produced charges against more than 100 firms and over $2 billion in penalties — FY2024 alone brought more than $600 million in civil penalties against more than 70 firms. It's the clearest signal available that "we'll figure out recordkeeping later" is not a viable posture for an AI agent that touches communications or trading workflows.

§ 09 — Emerging

Where agent-to-agent payments are heading

Card rails were never built for what agents need. Stripe's standard US rate — 2.9% + $0.30 — is dominated by that fixed $0.30 the moment payments get small: a $25 transaction carries an effective rate near 4.1%, and anything under roughly $10 can see an effective rate double the headline percentage.[19] Sub-cent, agent-initiated micro-transactions are simply uneconomical on that rail, and that gap is real, not theoretical.

x402 is the leading attempt to close it — an open protocol Coinbase launched in May 2025, built on the long-dormant HTTP 402 "Payment Required" status code, settling instantly per-request in USDC.[20] A V2 shipped within six months, and the x402 Foundation, co-founded with Cloudflare, now governs the spec. On high-throughput chains the settlement economics look genuinely different from card rails — Solana's own documentation cites roughly $0.00025 per transaction with about 400ms finality.[21] Ecosystem signals are accumulating fast: Amazon Bedrock AgentCore Payments entered preview on May 7, 2026 with native x402 support; Google's Agent Payments Protocol (AP2) incorporates x402 as well, with Cloudflare, Google, Vercel, and Coinbase all backing the standard.[22]

Projection — not a production default

These are 2025–26 standards, still early. Even Stripe's own stablecoin transfer product charges 1.5% — a useful reminder that "crypto rails via a legacy processor" still carries a markup, and that the economics only fully work when you're settling on-chain directly. Build toward this, don't build on top of it yet.

§ 10 — Closing

What to do with this

Everything above is the reference architecture, not a product pitch — you can take the fabric design, the LangGraph/Temporal/MCP/XGrammar stack, the model roster, and the compliance checklist and build all of it yourselves. Plenty of teams do exactly that, and should.

Here's the honest math for the teams that don't have a platform engineer to spare. It's a working estimate, not a sourced statistic — treat it as a napkin, not a citation.

Napkin math

Senior platform engineer, fully loaded~$85–110/hr
Typical time to production-ready, from zero6–10 weeks
Engineering cost, before it ships a feature~$20,000–$35,000
Veles — fixed-scope implementationfrom $3,000

The gap isn't really the dollars — it's the six to ten weeks your best engineer spends on infrastructure instead of the product you're actually trying to ship. That's the trade the note below is for.

Attached note — from Veles

Want this built, not just diagrammed?

We implement this exact architecture end-to-end — fabric, orchestration, access control, and the compliance paper trail — as a fixed-scope engagement for teams that need a production-ready, auditable AI system without the two-quarter learning curve.

AI Architecture & Security Blueprint, implemented — from $3,000

Book a 15-minute call → or reply to the welcome email with the word AUDIT

References

  1. McKinsey & Company — "State of AI Trust in 2026: Shifting to the Agentic Era." mckinsey.com
  2. Gartner — "Agentic AI Demands Cybersecurity Oversight," Gartner Newsroom, Feb 5, 2026.
  3. Gartner — Enterprise GenAI security incident forecast, Gartner Newsroom, Apr 9, 2026.
  4. Gartner — Market Guide for Guardian Agents.
  5. IBM — HPC Reference Architecture Redpaper, fat-tree / InfiniBand topology.
  6. NVIDIA — DGX SuperPOD Reference Architecture, Quantum-2 InfiniBand fabric.
  7. NVIDIA — GB200 NVL72 documentation, NVLink domain / east-west & north-south fabric labeling.
  8. LangChain — LangGraph documentation; production users Klarna, Replit, Elastic.
  9. Temporal — LangGraph plugin (Public Preview) announcement and engineering blog.
  10. Red Hat — OpenShift AI 3, MCP gateway with RBAC / OAuth.
  11. Aembit, Cerbos; arXiv survey of MCP security patterns (CBAC/ABAC trend).
  12. XGrammar — arXiv:2411.15100 (CMU, NVIDIA, SJTU, UC Berkeley).
  13. NVIDIA — Sovereign AI framing; EU, UAE, and Australia policy frameworks.
  14. ASUS — NCHC Nano4 press release, Nov 26–27, 2025; TOP500.org, June 2026 list.
  15. Sourcegraph — "How Cody Understands Your Codebase," engineering blog, Feb 15, 2024.
  16. Tabnine docs (Trainbox); Refact.ai engineering materials.
  17. Ai2 (Allen Institute for AI) — "Open Coding Agents" / SERA paper, Jan 27, 2026. allenai.org
  18. U.S. SEC — Rule 17a-4 (17 CFR § 240.17a-4); adopting release Oct 12, 2022; FY2024 enforcement results.
  19. Stripe — standard US pricing documentation.
  20. Coinbase — x402 protocol launch post, May 2025; x402 Foundation.
  21. Solana — official documentation, transaction cost & finality.
  22. AWS — Bedrock AgentCore Payments preview blog, May 7, 2026; Google — Agent Payments Protocol (AP2).