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.
Component Architecture
The system consists of five primary agents and supporting infrastructure components. Each agent has specific responsibilities and communicates through well-defined interfaces.
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
Deployment Architecture
ASRO components are containerized and deployed across multiple nodes for resilience and scalability.
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