Architectural Overview

ASRO follows a multi-agent architecture where specialized agents collaborate to monitor, analyze, plan, and execute resource optimizations. The system is designed around three core principles: safety through controlled execution, transparency through comprehensive auditing, and scalability through event-driven communication.

System Context Diagram

This diagram shows ASRO's position within the HPC environment and its interactions with external systems.

graph TB Users[Research Users] Admins[System Administrators] Slurm[Slurm Workload Manager] Prometheus[Prometheus Metrics] ELK[ELK Stack] Nodes[Compute Nodes] Users -->|Submit Jobs| Slurm Admins -->|Approve Actions| ASRO ASRO[ASRO System] ASRO -->|Query Metrics| Prometheus ASRO -->|Query Logs| ELK ASRO -->|Read Job Data| Slurm ASRO -->|Control Jobs| Slurm ASRO -->|Run Checks| Nodes Prometheus -->|Collect| Nodes ELK -->|Aggregate| Nodes Slurm -->|Schedule| Nodes ASRO -->|Notify| Users ASRO -->|Report| Admins style ASRO fill:#4a90e2,stroke:#2e5c8a,stroke-width:3px,color:#fff style Slurm fill:#e8f4f8,stroke:#4a90e2 style Prometheus fill:#e8f4f8,stroke:#4a90e2 style ELK fill:#e8f4f8,stroke:#4a90e2 style Nodes fill:#e8f4f8,stroke:#4a90e2

Component Architecture

The system consists of five primary agents and supporting infrastructure components. Each agent has specific responsibilities and communicates through well-defined interfaces.

graph TB subgraph "ASRO System" Monitor[C-1: Monitor Agent] Profiler[C-2: Profiler Agent] Planner[C-3: Planner Agent] Executor[C-4: Executor Agent] Audit[C-5: Audit Agent] subgraph "Communication Layer" Kafka[C-6: Event Backbone
Apache Kafka] gRPC[C-7: RPC Service
gRPC with mTLS] end subgraph "Data Layer" TimeDB[C-8: Time-Series DB
Prometheus/VictoriaMetrics] AuditDB[C-9: Audit Store
PostgreSQL] ProfileDB[C-10: Profile Store
Redis + PostgreSQL] end subgraph "Integration Layer" MCP[C-11: Tool Gateway
Model Context Protocol] Dashboard[C-12: Web Interface
React Dashboard] Simulator[C-13: Job Simulator] end end Monitor -->|Events| Kafka Profiler -->|Events| Kafka Planner -->|Events| Kafka Executor -->|Events| Kafka Audit -->|Events| Kafka Kafka -->|Subscribe| Monitor Kafka -->|Subscribe| Profiler Kafka -->|Subscribe| Planner Kafka -->|Subscribe| Executor Kafka -->|Subscribe| Audit Monitor <-->|RPC| gRPC Profiler <-->|RPC| gRPC Planner <-->|RPC| gRPC Executor <-->|RPC| gRPC Audit <-->|RPC| gRPC Monitor -->|Write| TimeDB Profiler -->|Read| TimeDB Profiler -->|Write| ProfileDB Planner -->|Read| ProfileDB Executor -->|Write| AuditDB Audit -->|Write/Read| AuditDB Planner -->|Safe Calls| MCP Executor -->|Safe Calls| MCP Planner -->|Simulate| Simulator Dashboard -->|Query| gRPC Dashboard -->|Display| Audit style Monitor fill:#66c2a5 style Profiler fill:#fc8d62 style Planner fill:#8da0cb style Executor fill:#e78ac3 style Audit fill:#a6d854 style Kafka fill:#ffd92f style gRPC fill:#ffd92f style MCP fill:#b3b3b3 style Dashboard fill:#b3b3b3

Component Descriptions

C-1

Monitor Agent

Purpose: Continuously collect and process resource utilization metrics from the HPC cluster.

Key Responsibilities:

  • Query Prometheus for GPU, CPU, memory, and network metrics
  • Execute system-level checks using nvidia-smi and htop on compute nodes
  • Validate GPU-to-job bindings against Slurm allocations
  • Detect anomalies in real-time resource usage
  • Publish monitoring events to the event backbone

Interfaces: Prometheus API, Slurm REST API, SSH/System Commands, Event Bus

C-2

Profiler Agent

Purpose: Build and maintain historical resource usage profiles for jobs, users, and workload types.

Key Responsibilities:

  • Aggregate historical data from Slurm accounting and telemetry systems
  • Compute statistical profiles including mean, percentiles, and variance for resource usage
  • Identify usage patterns and trends over time
  • Predict expected resource needs for known job types
  • Update profiles incrementally as new data arrives

Interfaces: Slurm sacct, Time-Series DB, Profile Store, Event Bus

C-3

Planner Agent

Purpose: Generate ranked optimization recommendations based on current metrics and historical profiles.

Key Responsibilities:

  • Receive anomaly events from Monitor and query relevant profiles
  • Use LLM-based reasoning to generate candidate optimization actions
  • Simulate proposed changes using the Job Simulator
  • Compute risk scores and expected benefits for each recommendation
  • Rank recommendations by impact and send to Audit for approval
  • Access external tools safely through MCP

Interfaces: Profile Store, Job Simulator, MCP Tool Gateway, Event Bus, gRPC

C-4

Executor Agent

Purpose: Safely apply approved optimization actions to the Slurm cluster with rollback capabilities.

Key Responsibilities:

  • Execute approved actions through Slurm control interfaces
  • Support dry-run mode for testing without actual changes
  • Implement canary deployments for high-risk changes
  • Monitor post-execution metrics to detect regressions
  • Automatically rollback changes if outcomes are negative
  • Coordinate with checkpointing systems for job restarts
  • Log all execution steps to the audit database

Interfaces: Slurm slurmrestd, Slurm scontrol, MCP Tool Gateway, Audit Store, Event Bus

C-5

Audit and Human-in-Loop Agent

Purpose: Manage approval workflows, maintain audit trails, and provide transparency to administrators.

Key Responsibilities:

  • Receive recommendations from Planner and determine approval requirements
  • Present proposals through the web interface with clear explanations
  • Enforce policy constraints and risk thresholds
  • Collect and validate human approvals or rejections
  • Maintain immutable audit logs of all decisions and actions
  • Generate reports and summaries for administrators

Interfaces: Web Dashboard, Audit Store, Event Bus, gRPC

C-6

Event Backbone (Apache Kafka)

Purpose: Provide durable, ordered event streaming for agent-to-agent communication.

Key Responsibilities:

  • Accept published events from all agents
  • Maintain event ordering within topics
  • Store events durably for replay and recovery
  • Enable multiple subscribers for each event type

Topics: monitoring.events, profiling.updates, planning.recommendations, execution.results, audit.logs

C-7

RPC Service (gRPC with mTLS)

Purpose: Enable synchronous request-response communication between agents and external clients.

Key Responsibilities:

  • Handle direct queries between agents requiring immediate responses
  • Authenticate all connections using mutual TLS certificates
  • Provide low-latency communication for time-sensitive operations
  • Support the web dashboard's queries for real-time data

APIs: GetMetrics, QueryProfile, RequestApproval, ExecuteAction, GetAuditLog

C-8

Time-Series Database

Purpose: Store and query time-stamped resource utilization metrics efficiently.

Technology: Prometheus or VictoriaMetrics

Data Stored: GPU utilization, CPU usage, memory consumption, network I/O, job states

C-9

Audit Store

Purpose: Persist immutable audit logs of all system decisions and actions.

Technology: PostgreSQL with append-only tables and cryptographic checksums

Data Stored: Detected issues, generated recommendations, approval decisions, execution steps, outcomes, rollbacks

C-10

Profile Store

Purpose: Store and quickly retrieve resource usage profiles for jobs and users.

Technology: Redis for hot profiles, PostgreSQL for long-term storage

Data Stored: Per-job statistics, per-user patterns, workload type profiles, prediction models

C-11

Tool Gateway (Model Context Protocol)

Purpose: Provide safe, auditable access to external tools and system commands for LLM-based agents.

Key Responsibilities:

  • Expose whitelisted tools and commands to Planner and Executor
  • Validate all tool invocations against security policies
  • Log all tool calls with parameters and results
  • Prevent unauthorized or dangerous operations

Exposed Tools: Slurm commands, nvidia-smi, job simulator, cluster topology queries

C-12

Web Interface

Purpose: Provide administrators with visibility into ASRO operations and enable approval workflows.

Technology: React-based single-page application

Features: Real-time dashboard, pending approvals, historical reports, policy configuration, user notifications

C-13

Job Simulator

Purpose: Simulate the impact of proposed changes before execution.

Key Responsibilities:

  • Model cluster state including queued and running jobs
  • Apply proposed changes to the simulation
  • Predict metrics like queue time, utilization, and throughput
  • Provide confidence scores for predictions

Interaction Sequence: Optimization Flow

This sequence diagram illustrates how the agents collaborate to detect an issue, generate a recommendation, obtain approval, and execute the fix.

sequenceDiagram participant M as Monitor Agent participant K as Kafka participant Prof as Profiler Agent participant Plan as Planner Agent participant Sim as Simulator participant A as Audit Agent participant Admin as Administrator participant E as Executor Agent participant S as Slurm M->>M: Detect GPU underutilization M->>K: Publish anomaly event K->>Prof: Notify of anomaly Prof->>Prof: Query historical profile Prof->>K: Publish profile data K->>Plan: Forward anomaly + profile Plan->>Plan: Generate recommendations Plan->>Sim: Simulate proposed change Sim-->>Plan: Predicted impact Plan->>Plan: Compute risk score Plan->>K: Publish recommendation K->>A: Forward recommendation A->>A: Check risk threshold A->>Admin: Request approval (high risk) Admin->>A: Approve action A->>K: Publish approval K->>E: Forward approved action E->>E: Execute dry-run E->>S: Apply resource change S-->>E: Confirmation E->>M: Monitor post-change metrics M-->>E: Metrics improved E->>K: Publish success event K->>A: Forward for audit log A->>A: Record complete action

Deployment Architecture

ASRO components are containerized and deployed across multiple nodes for resilience and scalability.

graph TB subgraph "Control Plane Node" Dashboard[Web Dashboard] Audit[Audit Agent] Plan[Planner Agent] end subgraph "Agent Nodes (N replicas)" Mon1[Monitor Agent 1] Mon2[Monitor Agent 2] Exec1[Executor Agent 1] Prof[Profiler Agent] end subgraph "Infrastructure Services" Kafka[Kafka Cluster
3 brokers] Redis[Redis Cluster] Postgres[PostgreSQL
with replication] Prometheus[Prometheus] end subgraph "HPC Cluster" SlurmCtrl[Slurm Controller] Compute[Compute Nodes] end Dashboard --> Audit Dashboard --> Plan Audit --> Kafka Plan --> Kafka Mon1 --> Kafka Mon2 --> Kafka Exec1 --> Kafka Prof --> Kafka Kafka --> Redis Kafka --> Postgres Audit --> Postgres Prof --> Redis Mon1 --> Prometheus Exec1 --> SlurmCtrl Mon1 --> SlurmCtrl Mon1 --> Compute Plan --> SlurmCtrl style Dashboard fill:#b3b3b3 style Kafka fill:#ffd92f style Redis fill:#e8f4f8 style Postgres fill:#e8f4f8 style SlurmCtrl fill:#e8f4f8

Technology Stack

Agent Implementation

Python 3.11+ with LangChain for LLM integration

Communication

Apache Kafka for events, gRPC with Protocol Buffers for RPC

Data Storage

PostgreSQL for structured data, Redis for caching, Prometheus for metrics

Web Interface

React 18 with Material-UI, WebSocket for real-time updates

Tool Integration

Model Context Protocol (MCP) for safe tool access

Security

TLS 1.3, mutual TLS authentication, RBAC with JWT tokens

Deployment

Docker containers orchestrated by Kubernetes

Monitoring

Grafana dashboards, Prometheus alerts, structured logging with ELK