Design Principles
Performance First
Every layer of the stack is chosen for throughput and low latency. No runtime garbage collection, no interpreter overhead, no REST serialization tax.
- Rust + Tokio — zero-cost abstractions with fully async I/O across all six services, no GC pauses
- gRPC / Protocol Buffers — 9 proto files, binary serialization over HTTP/2 with multiplexed streams, replacing JSON/REST overhead
- Redis priority queues — sub-millisecond job dispatch with three priority tiers and in-memory status caching
- QDMI-aware routing — scored backend selection (fidelity 50%, topology 40%, queue 10%) minimizes wait time and maximizes result quality
- Connection pooling — SQLx async pool to PostgreSQL, persistent gRPC channels between services
6+2
Rust + Python services
35
Binary gRPC methods
3
Priority queue tiers
Security by Design
Enterprise data is encrypted and anonymized at the platform boundary — no plaintext ever reaches an external quantum backend. Every operation is auditable, every mapping is reversible, every trail is signed.
- AES-256-GCM — all data encrypted at rest and in transit through the Vault service, military-grade symmetric encryption
- GDPR anonymization — configurable rules (strip, remap, hash, preserve) ensure no PII reaches external quantum hardware
- SHA-256 signed audit trails — every Vault operation is logged with a cryptographic signature for tamper-proof compliance
- Post-quantum ready — ML-KEM-768 (NIST FIPS 203) key encapsulation prepared for the post-quantum transition
- Zero-trust roadmap — mTLS between all services, JWT token validation at the gateway, role-based access control
256
Bit AES encryption
768
ML-KEM dimension
100%
Operations audited
Hybrid Intelligence
Rust for infrastructure plumbing, Python for AI/ML and connector SDKs. A clean boundary lets each language excel where it belongs — with automatic fallback to Rust heuristics when AI services are unavailable.
- Why Python? — Connector SDKs don’t exist in Rust (CIMpy, PyRFC, BLPAPI, MCP SDK); ML experimentation is 5–10x slower in Rust
- Clean boundary — Rust Garm Engine → HTTP → Python Garm AI, with automatic fallback to Rust rule-based heuristics
- Three-layer classifier — Rules (always available) → ONNX satellite (<5ms) → LLM via Mistral (~200ms)
- Connector edge — 8 Python agents bridge enterprise platforms (AspenTech, Energy Grid, Schrödinger, SAP, BattleSuite, 3DEXP, Bloomberg, Celonis) to Garm
8+8
Core + connector services
3
Classifier layers
24B
Mistral parameters
System Overview
Connector Edge
AspenTechCOM
Energy GridCIM
SchrödingerREST
SAPOData
BattleSuiteSDK
3DEXPREST
BloombergBLPAPI
CelonisMCP
Client Layer
API Gateway
:8080
Envoy proxy — gRPC-Web transcoding, CORS, routing to all services
Core Services
Garm Engine
:4001
AI problem analysis & quantum suitability scoring
Vault
:4002
AES-256-GCM encryption, GDPR anonymization
Broker
:4003
QDMI-aware job routing & execution lifecycle
AI Layer
Garm AI
:4010
FastAPI — ML classification, ONNX scoring, RAG
Garm MCP
:4020
FastMCP — 11 MCP tools for AI agents
vLLM
:8000
Mistral Small 3.2 — LLM inference server
Supporting Services
Contract
:4004
SLA generation, usage metering, compliance
Registry
:4005
QDMI device registry, capability matching, heartbeats
Aleta Pricing
:4006
Market-based pricing via benchmark indexing
Infrastructure & External
PostgreSQL
:5432
18 tables, JSONB for QDMI properties
Redis
:6379
Priority job queues, status caching
Arvak
gRPC
External quantum compilation & backend execution
Service Details
Garm Engine
AI Decision Orchestrator (Rust)
:4001
Orchestrates AI-powered problem classification via HTTP delegation to Garm AI. Three-layer fallback: rule-based heuristics (always available) → ONNX satellite model (<5ms) → Mistral LLM (~200ms). Covers 18 problem types, scores quantum suitability, recommends algorithms, and estimates qubit requirements.
- 4 gRPC methods
- HTTP→AI delegation
- Graceful fallback
- 18 problem types
- Quantum scoring
Vault
Data Protection Service
:4002
GDPR-compliant data anonymization with configurable rules (strip, remap, preserve, hash). AES-256-GCM encryption with SHA-256 signed audit logs. Encrypted bidirectional mappings allow full deanonymization of results.
- 5 gRPC methods
- AES-256-GCM
- GDPR compliance
- Signed audit trail
- ML-KEM-768 (planned)
Broker
Job Routing Service
:4003
Orchestrates the full job lifecycle from submission to results. QDMI-aware backend selection scores candidates by topology fit (40%), gate fidelity (50%), and queue penalty (10%). Manages priority queues via Redis and integrates with all other services.
- 6 gRPC methods
- QDMI selection
- Redis job queues
- Arvak integration
- Full lifecycle
Contract
SLA Management
:4004
Template-based SLA generation with configurable quality guarantees (fidelity, turnaround time, error rates). Meters QPU time, shots, and cost in Aleta units. Tracks violations and enforces penalty clauses.
- 5 gRPC methods
- SLA templates
- Usage metering
- Compliance verification
- Penalty enforcement
Registry
Device Registry
:4005
QDMI-compliant backend registry storing full device characteristics: qubit count, topology graphs, native gate sets, T1/T2 coherence times, gate and readout fidelities. Heartbeat monitoring tracks real-time availability.
- 7 gRPC methods
- QDMI properties
- Topology graphs
- Heartbeat monitoring
- Capability queries
Aleta Pricing
Market Pricing
:4006
Market-based quantum resource pricing via the Aleta Index — an aggregate €/Aleta rate derived from 5 reference benchmarks (VQE H₂O, QAOA MaxCut, Grover, QML Iris, Heisenberg). Recalculated weekly for transparent cross-ecosystem pricing.
- 5 gRPC methods
- 5 reference benchmarks
- Aleta index
- Cost breakdown
- Historical pricing
Garm AI
AI/ML Classification (Python)
:4010
Python FastAPI service for ML-powered problem classification. Uses Mistral Small 3.2 (24B) via vLLM for deep analysis, ONNX satellite models for fast scoring (<5ms), and Jina v3 embeddings for RAG-based context retrieval. Structured JSON output with Pydantic validation.
- 3 HTTP endpoints
- Mistral 24B
- ONNX satellites
- RAG pipeline
- Pydantic
Garm MCP
AI Agent Interface (Python)
:4020
Model Context Protocol server built on FastMCP. Exposes 11 tools, 4 resources, and 4 prompt templates for AI agents (Claude, Cursor). Bridges to Garm Engine, Broker, Registry, and Contract via gRPC. Supports stdio and SSE transport.
- 11 MCP tools
- 4 resources
- gRPC→4 services
- Claude / Cursor
- stdio + SSE
Technology Stack
Language
Rust + Python
Rust for infrastructure (Tonic, SQLx, Axum) — zero-cost abstractions, no GC. Python for AI/ML + connectors (FastAPI, vLLM, ONNX Runtime). Each language where it excels.
Communication
gRPC
Binary Protocol Buffers over HTTP/2 — 10x smaller payloads than JSON/REST. 35 typed RPC methods across 9 proto files, multiplexed streams.
Gateway
Envoy 1.28
gRPC-Web transcoding for browser clients. CORS, routing, and future JWT auth.
Database
PostgreSQL 15
18 tables across 6 migrations. JSONB for QDMI device properties. SQLx for type-safe queries.
Queue
Redis 7
In-memory priority dispatch (high/normal/low). Sub-millisecond job status lookups and result caching.
Cryptography
ring + SHA-256
AES-256-GCM + HMAC signing + SHA-256 audit chains. Post-quantum ready with ML-KEM-768 key encapsulation (NIST FIPS 203).
Containers
Docker
Multi-stage builds per service. Docker Compose for local orchestration. Kubernetes planned.
Observability
tracing
Structured logging with tracing-subscriber. Health check endpoints on all services (port +100).
Compiler
Arvak
External quantum compilation. 19 Rust crates, 9 backends, QASM3 & Arvak IR support.
AI / LLM
Mistral Small 3.2
24B parameters, Apache 2.0 license, vLLM serving. ONNX satellite models for fast scoring. Jina v3 embeddings (EU-origin) for RAG.
Agent Protocol
MCP
Model Context Protocol. 11 tools for AI agents (Claude, Cursor). stdio + SSE transport via FastMCP.
Connectors
8 Python Agents
AspenTech (COM), Energy Grid (CIM/CGMES), Schrödinger (REST), SAP (OData), BattleSuite (Tactical Core), 3DEXP (REST), Bloomberg (BLPAPI), Celonis (MCP).
API Surface — 35 gRPC + 3 HTTP + 11 MCP
| Service | Package | Methods | Key Operations |
|---|---|---|---|
| Garm Engine | garm | 4 | AnalyzeProblem, DecomposeProblem, RecommendBackend, GetDecision |
| Vault | vault | 5 | Anonymize, Deanonymize, GetAuditTrail, Encrypt, Decrypt |
| Broker | broker | 6 | SubmitJob, GetJobStatus, GetJobResults, CancelJob, ListBackends, RouteJob |
| Contract | contract | 5 | GenerateSla, GetContract, RecordUsage, GetUsageReport, VerifySlaCompliance |
| Registry | registry | 7 | ListBackends, GetBackend, RegisterBackend, UpdateBackend, ReportHeartbeat, QueryByCapabilities |
| Aleta Pricing | aleta | 5 | CalculateJobCost, GetAletaIndex, RunBenchmark, GetHistoricalPricing, GetBenchmarkResults |
| Garm AI | garm_ai + HTTP | 3+3 | gRPC: Classify, Score, CheckHealth — HTTP: POST /classify, POST /score, POST /rag/query |
| Garm MCP | MCP | 11 | analyze, decompose, recommend, submit, status, results, cancel, list, get, cost, index |