swarmxq-model-orchestrator

Governs model routing, eviction, and RAM pressure management for the SwarmXQ multi-agent platform.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-model-orchestrator-sabiscore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarmxq-model-orchestrator
Source: https://github.com/sabiscore/swarmxq/tree/main/.ai/skills/swarmxq-model-orchestrator
Command: npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-model-orchestrator-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing multiple local LLMs on CPU-only hardware risks out-of-memory crashes and concurrent inference conflicts. This Skill enforces the SwarmXQ platform's SINGLE-7B LOCK, canonical tag resolution, and RAM pressure gating so model orchestration code stays safe and consistent. ## Core Features & Use Cases - SINGLE-7B Lock Enforcement: Ensures only one 7B-class model is inference-active at any time by requiring evictIncompatible() before every 7B load. - Canonical Tag Resolution: Routes all legacy aliases (phi4-fast, deepseek-reasoner, qwen-worker) through resolveCanonicalTag() so deprecated tags never enter the model registry. - RAM Pressure Gating: Implements readPressure() and getRamSnapshot() with protected thresholds (RAM_CRITICAL_MB = 800) and graceful 8 GB degradation paths. - Use Case: When modifying model-orchestrator.ts or video-runtime-config.ts, use this Skill to verify that every acquireModel() call resolves canonical tags, evicts incompatible models first, and emits structured telemetry. ## Quick Start Ask the AI to review your changes to model-orchestrator.ts for SINGLE-7B lock violations and missing evictIncompatible() calls before any 7B model load.

Frequently Asked Questions about swarmxq-model-orchestrator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely load a 7B model in the SwarmXQ platform?

Call resolveCanonicalTag() on the operator's canonical tag, then call ModelOrchestrator.evictIncompatible(tag) before ollamaPull(). This guarantees only one 7B-class model is inference-active at any time, satisfying the SINGLE-7B LOCK.

What is the SINGLE-7B lock in model orchestration?

The SINGLE-7B LOCK permits only one 7B-class model to be inference-active simultaneously because CPU-only hardware has exactly one inference thread. On 16 GB hosts a second model like Pilot may stay RAM-resident but idle, never actively inferencing.

How does RAM pressure gating work with Ollama models?

getRamSnapshot() reads MemAvailable from /proc/meminfo, and readPressure() classifies it as normal, high, or critical. High pressure triggers a backoff delay of 1000-30000 ms; at or below 800 MB (RAM_CRITICAL_MB) the system fails immediately with PRESSURE_CRITICAL.

Can two 7B models run concurrently on a 16 GB host?

No. Even though OLLAMA_MAX_LOADED_MODELS=2 allows Pilot (~3 GB) and one 7B model (~5 GB) to be RAM-resident together, only one may actively inference. Two concurrent 7B inferences violate the SINGLE-7B contract regardless of available RAM.

Why must legacy model aliases never appear in production code?

Legacy tags like phi4-fast, deepseek-reasoner, and qwen-worker must pass through resolveCanonicalTag(), which maps them to canonical tags and throws on unknown values. Hard-coded aliases bypass validation and desynchronize the TypeScript and Python operator maps.

What happens to model orchestration on an 8 GB host?

shouldAutoEnableLowRamMode() returns true below the full-pipeline threshold, switching stages to the lite model instruct-phi4-lite-q4km-prod, setting maxLoadedModels to 1, disabling Pilot keep-alive, and reducing frames and resolution. Degradation must be logged at warn level.