This sample demonstrates how to use Ironbees with GPU-Stack for local GPU-powered LLM inference.
GPU-Stack is an open-source GPU cluster manager for running AI models locally. This sample shows how to integrate Ironbees with GPU-Stack's OpenAI-compatible API.
-
GPU-Stack Server: Install and run GPU-Stack on your local machine or cluster
- Installation: https://docs.gpustack.ai/latest/installation/
- Quick start:
curl -sfL https://get.gpustack.ai | sh -
-
Deploy a Model: Deploy an LLM model on GPU-Stack
# Example: Deploy Llama 3.2 gpustack model deploy llama3.2 -
Get API Key: Generate an API key from GPU-Stack dashboard
- Default endpoint: http://localhost:8080
- Navigate to Settings → API Keys
-
Copy
.env.exampleto.env(or use the existing.env):cp .env.example .env
-
Edit
.envand set your GPU-Stack configuration:GPUSTACK_ENDPOINT=http://localhost:8080 GPUSTACK_API_KEY=your_api_key_here GPUSTACK_MODEL=llama3.2
# From the sample directory
dotnet run
# Or from the solution root
dotnet run --project samples/GpuStackSample/GpuStackSample.csproj- Agent Loading: Automatic discovery and loading of agents from filesystem
- Explicit Agent Selection: Direct agent invocation by name
- Automatic Agent Selection: Keyword-based routing to appropriate agents
- Streaming Responses: Real-time token streaming from GPU-Stack
- Agent Score Comparison: View confidence scores for all agents
┌─────────────────────────────────────────────────────┐
│ Ironbees Framework │
│ • FileSystemAgentLoader │
│ • KeywordAgentSelector │
│ • AgentOrchestrator │
├─────────────────────────────────────────────────────┤
│ GpuStackAdapter (OpenAI-Compatible) │
│ • Endpoint: /v1-openai │
│ • Authentication: Bearer token │
│ • Streaming: Server-Sent Events │
├─────────────────────────────────────────────────────┤
│ GPU-Stack Server │
│ • Local GPU inference │
│ • Model management │
│ • OpenAI-compatible API │
└─────────────────────────────────────────────────────┘
GPU-Stack supports a wide range of models through various backends:
- vLLM: Llama, Mistral, Qwen, Yi, etc.
- llama.cpp: GGUF models
- Ascend MindIE: Huawei Ascend NPU models
See https://docs.gpustack.ai/latest/user-guide/model-management/ for the full list.
❌ Unexpected error: The HTTP request failed...
- Verify GPU-Stack server is running:
curl http://localhost:8080/health - Check endpoint in
.envmatches your GPU-Stack server
❌ Unexpected error: 401 Unauthorized
- Verify API key is correct
- Generate new API key from GPU-Stack dashboard
❌ Unexpected error: Model 'xxx' not found
- List deployed models:
gpustack model list - Deploy the model:
gpustack model deploy <model-name> - Update
GPUSTACK_MODELin.env
- ✅ Local Inference: No cloud API costs, complete data privacy
- ✅ GPU Acceleration: Leverage local NVIDIA, AMD, or Ascend GPUs
- ✅ OpenAI Compatible: Drop-in replacement for OpenAI API
- ✅ Model Flexibility: Support for various model formats and backends
- ✅ Cluster Support: Scale across multiple GPU nodes
- GPU-Stack Documentation: https://docs.gpustack.ai/
- GPU-Stack GitHub: https://github.com/gpustack/gpustack
- Ironbees Documentation: https://github.com/iyulab/ironbees