AI Agents¶
This section describes the available AI coding agents and how to use them in the HPC environment.
Available agents¶
| Agent | Model provider | Execution environment | Model access |
|---|---|---|---|
| Claude Code | Anthropic | Singularity container on login node | Direct connection to Anthropic API |
| Qwen Code | Self-hosted | Singularity container on login node | vLLM server running on a GPU node |
Both agents can assist with coding, file management, troubleshooting, and automation. They can also interact with SLURM, allowing them to submit and monitor computational jobs.
Model serving¶
Qwen Code requires a running language model server. Models are served using vLLM inside a SLURM allocation on a GPU node.
See Serving LLMs with vLLM for instructions on starting and managing model servers.
Claude Code does not require a local model server. It connects directly to the Anthropic API.
Running agents¶
On Perun/Devana¶
Both agents can be launched from the Perun/Devana login node using their respective Singularity containers.
- Claude Code – uses the Anthropic API.
- Qwen Code – connects to a self-hosted vLLM server running on a GPU node.
Qwen Code requires an active vLLM server before it can be started. Its launcher handles the connection to the appropriate server.
From a local workstation¶
Qwen Code can also run on a local workstation while using a model served on Perun/Devana.
This setup uses a two-hop SSH tunnel:
- The workstation connects to a Perun login node.
- The login node forwards the connection to the GPU compute node.
- Qwen Code communicates with the vLLM API through the tunnel.
See Connecting Qwen Code to external vLLM for configuration and usage instructions.
Resource management and security¶
AI agents can execute commands, modify files, and interact with the cluster environment. Keep the following points in mind:
- Run computationally intensive workloads through SLURM rather than directly on login nodes.
- Use SLURM allocations for GPU-intensive model inference.
- Review commands and file modifications before allowing an agent to execute them.
- Protect API keys and other credentials.
- Ensure that model servers are running only for as long as they are needed.