Skill: james-martinez/lemonade-server-manager (version 1.0.7)

--- name: lemonade-server-manager description: Manage Lemonade Servers natively. Use when checking system info, health status, listing available models, pulling or loading new models, completing LLM chats, or generating stable-diffusion images on a local or remote AI NPU/GPU cluster. metadata: {"homepage":"https://github.com/james-martinez/lemonade-server-manager","clawdbot":{"emoji":"🍋","requires":{"anyBins":["curl"]},"os":["linux","darwin","win32"]}} env: - name: LEMONADE_API_KEY description: Optional API key for authenticating with Lemonade servers. required: false --- # Lemonade Server Management Interact with and manage local or remote Lemonade AI Server hardware directly via standard native network requests (`curl`). ## When to Use - Checking local GPU/NPU health and currently loaded VRAM resources - Listing available, downloaded text/image models on a Lemonade cluster - Pulling, loading, or unloading multimodal models - Generating text from LLMs (chat completions) - Generating stable-diffusion image responses ## Setup Instructions 1. Every endpoint requires a base `server_url`. If one is not specified by the user, assume `http://localhost:8000`. 2. Use the `LEMONADE_API_KEY` environment variable to authenticate. 3. This skill stays focused on making HTTP requests to a base `server_url` (default `http://localhost:8000`) and using an optional `LEMONADE_API_KEY`. It does not instruct reading arbitrary host files or other env vars. 4. **Operational note:** The skill will transmit prompts and model requests to whichever `server_url` is used. If a remote URL is supplied, the agent will send user content and model commands there (expected for this skill, but worth the user's attention). ## API Operations ### System Info Get hardware capabilities and device enumeration limits. **Returns:** JSON object with hardware capabilities. ```bash # Example Request curl -X GET "http://localhost:8000/api/v1/system-info" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" ``` ### Health Check Verify status and monitor currently loaded models to prevent VRAM overflow. **Returns:** JSON object containing server status and currently loaded models. ```bash # Example Request curl -X GET "http://localhost:8000/api/v1/health" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" ``` ### List Models Get an array of downloaded models available to load into memory. **Returns:** JSON list of all downloaded and available models. ```bash # Example Request curl -X GET "http://localhost:8000/api/v1/models" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" ``` ### Pull Model Download and install a new model string to the target machine. **Returns:** JSON stream or object confirming download status. ```bash # Example Request curl -X POST "http://localhost:8000/api/v1/pull" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"model": "llama3"}' ``` ### Load Model Load a model into VRAM/NPU to prepare for prompt responses. **Returns:** JSON object confirming model loaded into memory. ```bash # Example Request curl -X POST "http://localhost:8000/api/v1/load" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"model": "llama3"}' ``` ### Unload Model Force unload a model to free up memory before loading a larger variant. **Returns:** JSON object confirming model unloaded. ```bash # Example Request curl -X POST "http://localhost:8000/api/v1/unload" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{"model": "llama3"}' ``` ### Chat Completion Send a standard chat request to the LLM backend. **Returns:** JSON object containing standard chat completion response. ```bash # Example Request curl -X POST "http://localhost:8000/api/v1/chat/completions" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "model": "llama3", "messages": [ {"role": "user", "content": "Hello, world!"} ] }' ``` ### Generate Image Submit a stable-diffusion prompt for image generation. **Returns:** JSON object containing base64 generated image data. ```bash # Example Request curl -X POST "http://localhost:8000/api/v1/images/generations" \ -H "Authorization: Bearer ${LEMONADE_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "model": "sdxl", "prompt": "A majestic lion standing on a cliff, digital art" }' ``` ## Tips - The `flm`, `ryzenai-llm`, and `whispercpp` backends are mutually exclusive on an NPU. Always use the `/api/v1/unload` endpoint on conflicting LLMs before attempting to load a Whisper model on an NPU. - Check `/api/v1/health` first to assess available hardware VRAM before pulling or loading a multi-gigabyte LLM to avoid out-of-memory errors on the host. - Provide clear feedback to the user if an API request fails due to resource constraints and suggest unloading inactive background models.

path: README.md
content: # Lemonade Server Manager for OpenClaw NullClaw, and the "Claw" family

This skill enables your OpenClaw or NullClaw AI agent to securely orchestrate, manage, and interact with local and remote Lemonade Server instances. It acts as a comprehensive declarative bridge for model lifecycle management, hardware monitoring, and multimodal inference.

## Core Features

- **Multi-Server Orchestration**: Dynamically route requests to different local or remote Lemonade Servers using the agent's built in tools.
- **Zero Command Injection**: All HTTP logic is abstracted into purely declarative markdown documentation in `SKILL.md`, instructing the agent to utilize standard native tools (`curl`) rather than executing malicious prompt injections.
- **Hardware Awareness**: Allows the agent to query system info, monitor NPU/GPU constraints, and intelligently load/unload models to free up VRAM.
- **Multimodal Ready**: Full support for text completion, chat workflows, and stable-diffusion image generation.

## Installation

You can install this skill globally via ClawHub or manually clone it into your workspace.

### Option 1: ClawHub (Recommended)
```bash
clawhub install lemonade-server-manager
```

### Option 2: Manual Git Setup
Navigate to your workspace and clone the repository:
```bash
cd ~/.openclaw/workspace/skills/
git clone https://github.com/james-martinez/lemonade-server-manager.git
cd lemonade-server-manager
```

## Authentication Configuration

This skill supports environment-based authentication for interacting with Lemonade Servers.

### API Key (Environment Variable)
To interact with a local or remote server securely, provide your API key via the following environment variable on your host OS:
```bash
export LEMONADE_API_KEY="your-api-key-here"
```

## Available API Endpoints

The agent has access to the following categorized endpoints, executing them natively via standard tools (e.g., `curl`):

| Endpoint Name | Description | Lemonade Endpoint |
| :--- | :--- | :--- |
| `System Info` | Retrieves hardware and device enumeration. | `/api/v1/system-info` |
| `Health Check` | Checks server status and loaded models. | `/api/v1/health` |
| `List Models` | Lists downloaded and available models. | `/api/v1/models` |
| `Pull Model` | Downloads a specified model to the server. | `/api/v1/pull` |
| `Load Model` | Loads a model into GPU/NPU memory. | `/api/v1/load` |
| `Unload Model` | Unloads a model to free up system VRAM. | `/api/v1/unload` |
| `Chat Completion` | Executes standard LLM chat tasks. | `/api/v1/chat/completions` |
| `Generate Image` | Creates images using stable-diffusion. | `/api/v1/images/generations` |

## Usage Examples

Once installed, ask your OpenClaw or NullClaw agent to perform server tasks:
- *"What models are currently loaded on my local Lemonade server?"*
- *"Check the system health on http://192.168.1.50:8000. If there's enough VRAM, download and load the Llama 3 model."*
- *"Unload the active LLM to free up the NPU."*


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)