Skip to main content

Reference Architecture

29 min read

Implementation guides for platform engineers deploying and operating the Agentic AI Platform. Choose the relevant area, then check its environment requirements and validation steps. Design decisions are covered in the platform architecture.

Documentation vs Reference Architecture

Table 1. Focus, audience, and deliverables of Documentation vs Reference Architecture

AspectDocumentationReference Architecture
FocusArchitecture concepts, design principles, technology comparisonProduction deployment procedures, manifests, verification
AudienceDecision makers, architectsPlatform engineers, DevOps
DeliverablesArchitecture documents, decision recordsDeployable YAML, scripts, checklists
Update CadenceOn design changesAs deployment/operations experience accumulates

Documents​

Prerequisites​

Prerequisites for deploying the Reference Architecture.

AWS Account and Permissions​

  • EKS cluster creation permissions (IAM, VPC, EC2, EKS)
  • GPU instance Spot quotas (p5en.48xlarge: 192+ vCPUs)
  • S3 bucket creation permissions
  • AMP/AMG creation permissions (for monitoring setup)
  • ECR registry creation permissions (for custom image builds)

Tools​

Check the tool versions and cluster compatibility specified by the deployment chapter. Record installed versions with the validation results.

Table 2. Tools used for deployment and their purpose

ToolPurpose
eksctl, aws CLICluster and AWS resource management
kubectl, helmKubernetes resource and chart management
Container build toolCustom image builds
s5cmdS3 model-file transfer used by the examples

Networking​

  • Public subnets: For NLB deployment (when coding tools need external access)
  • Private subnets: For GPU nodes, vLLM, Bifrost deployment
  • NAT Gateway: For S3, ECR, HuggingFace Hub access
  • VPC Endpoints (recommended): S3, ECR, AMP

Platform Architecture​

The diagram shows six runtime layers, three cross-cutting planes, the Knowledge Feature Store, and serving/fine-tuning paths. The six deployment areas below describe implementation stages, not matching runtime-layer numbers. The Qwen3-32B label on the large-model serving box in the diagram is an example of the large-model serving role (the largest dense model in the official Qwen3 list, which runs from 0.6B to 32B dense plus the 30B-A3B and 235B-A22B MoE models), not a recommendation. Choose the actual model and revision for your deployment environment.

Platform architecture
The original architecture diagram shows request processing and shared control areas. The iframe and the source link below load the file from the repository's main branch (static/Agentic AI Platform(...).drawio) directly, so it is not version-pinned and may diverge from the snapshot described in this article as main changes. What this article describes is a 2026-09 snapshot. Use the source link below to inspect detailed connections on a larger canvas.
Edit in draw.io

Open in draw.io — Opens without login for viewing and editing. Use File → Save As to save a copy.


Architecture Overview​

The diagram below shows the 6 areas of the Reference Architecture and the deployment sequence.

Figure 1. The six areas of the Reference Architecture and the deployment sequence

Expand the diagram to read labels and follow connections.
Diagram

Deployment Sequence​

The Reference Architecture is configured in the following order. Each phase depends on the outputs of the previous phase, so the order must be followed.

Phase 1: GPU Infrastructure Setup​

Configure the EKS cluster and GPU node groups. Covers differences between Auto Mode and Standard Mode, and considerations when installing GPU Operator.

Table 3. Phase 1 GPU infrastructure setup items and details

ItemDetails
EKS VersionA version supported by the selected deployment guide and add-ons
Node GroupMNG or NodePool selected for model memory, SLOs, and available capacity
GPU OperatorCheck pre-installed AMI components and avoid duplicate ownership
Monitoring AgentsDCGM Exporter, GFD, Node Status Exporter

Phase 2: Model Deployment​

Serve large open-source models with vLLM. Covers custom image building, S3 model caching, and considerations for multi-node deployment.

Table 4. Phase 2 model deployment items and details

ItemDetails
Serving EnginevLLM (custom image)
Model CacheS3 → s5cmd → node ephemeral storage (emptyDir). To back it with instance-store NVMe, configure the node to bootstrap/mount the NVMe and validate capacity (see note below)
ParallelismTensor Parallelism (single node recommended)
ValidationOpenAI-compatible API endpoint

emptyDir uses the node's default ephemeral storage (the root disk) and does not automatically select instance-store NVMe. To back the cache with NVMe, format and mount the instance-store NVMe during node bootstrap, configure kubelet's --root-dir (or the emptyDir path) to use that mount, and then validate the capacity against the model size. Without this, the model cache is bound by the root disk capacity.

Phase 3: Inference Gateway​

Configure the 2-Tier inference gateway based on kgateway + Bifrost/LiteLLM. Includes Complexity-based Cascade Routing, Semantic Caching, and Guardrails.

Table 5. Phase 3 inference gateway items and details

ItemDetails
L1 Gatewaykgateway (Gateway API, mTLS, rate limiting)
L2-A GatewayBifrost (CEL Rules conditional routing, failover) or LiteLLM (native complexity-based routing)
Load BalancerNLB (TCP/TLS)
Routing StrategyComplexity-based Cascade (SLM → LLM), Hybrid Routing, Fallback

Phase 4: Monitoring and Observability​

Configure the monitoring stack based on Prometheus + AMP + AMG + Langfuse.

Table 6. Phase 4 monitoring and observability items and details

ItemDetails
Metrics CollectionPrometheus → AMP (Pod Identity authentication)
DashboardsAMG Grafana (SigV4 ec2_iam_role)
LLM ObservabilityLangfuse (OTel traces, cost tracking)
GPU MetricsDCGM Exporter (GPU utilization, VRAM, temperature)

Phase 5: Pipelines​

Configure LoRA Fine-tuning and Cascade Routing pipelines.

Table 7. Phase 5 pipeline items and details

ItemDetails
Fine-tuningLoRA adapter training → S3 storage → vLLM hot-reload
Cascade RoutingSLM (8B) → LLM (744B) cost optimization
EvaluationRagas + custom benchmarks

Phase 6: Coding Tool Integration​

Connect AI coding tools such as Aider and Cline to self-hosted models.

Table 8. Phase 6 coding tool integration items and details

ItemDetails
Coding ToolsAider, Cline, Continue.dev
ProtocolOpenAI-compatible API
Connection PathCoding tool → NLB → kgateway → Bifrost/LiteLLM → vLLM
MonitoringBifrost/LiteLLM OTel → Langfuse (per-request tracing)

Core Design Principles​

The Reference Architecture follows these principles.

1. Single-Node First​

Multi-node distribution significantly increases complexity and failure potential. Prioritize selecting instances with sufficient VRAM (p5en, p6) to serve with Tensor Parallelism only on a single node.

2. Spot Instance Utilization​

Choose Spot according to interruption tolerance as well as price. Inference servers still need image and weight loading, engine initialization, and handling for in-flight requests; recovery is not instantaneous. Validate replacement capacity, ready replicas, drain/retry policy, and actual cold-start time. Review the real-time workload considerations in EKS Compute and Autoscaling.

3. Standard Toolchain​

Use standard tools from the CNCF and Kubernetes ecosystem wherever possible.

Table 9. Standard tools and alternatives by area

AreaStandard ToolAlternative
Node provisioningKarpenter / MNGAuto Mode NodePool
Model ServingvLLMSGLang, llm-d
AI GatewayBifrost / LiteLLMOpenClaw, Helicone
MetricsPrometheus + AMPCloudWatch
LLM ObservabilityLangfuseHelicone, LangSmith
Multi-node serving deploymentLeaderWorkerSet (LWS)KubeRay

The roles in the table are distinct. Karpenter and MNG provision nodes, which differs from the GPU Pod scheduling that places GPU Pods onto nodes. LeaderWorkerSet (LWS) is an API for inference serving deployment across multiple nodes (multi-host serving), not a distributed-training orchestration tool. The AI gateway alternative OpenClaw is an agent-assistant gateway that assumes a trusted operator/team boundary, so confirm its scope before treating it as a drop-in replacement for a general multi-provider inference-governance proxy.

4. Layered Cost Optimization​

Effects depend on traffic, cache-hit rate, quality criteria, and operating hours. Do not add percentage savings across techniques. Compare total cost per successful request and SLOs under the same conditions.

Figure 2. Cost optimization review sequence

Expand the diagram to read labels and follow connections.
Cost optimization review sequence
Review purchase options, routing, caching, operating hours, and model sharing, measuring cost and quality after each change.

Next Steps​

For concepts and architecture design, refer to the following documents:


Feedback

The verification environment of the examples and your actual production environment can differ. Record the reproduction conditions together with the verification results, and please open an issue for anything that needs correction.