task-queue-by-model-source
Multi-queue task orchestration system. Tasks are routed to queues by model source, with support for task dependencies, context passing, and failure handling. Each model source has its own FIFO queue, executing one task at a time.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bg1avd/model-queueModel Queue Skill
A multi-queue task orchestration system where tasks are routed to queues based on their target model source. Supports task dependencies, context passing between tasks, and configurable failure handling.
Core Concepts
Model Source Mapping
Models are grouped by their underlying source (e.g., local Ollama, remote Ollama, cloud API). All tasks targeting models on the same source share a single queue.
Configuration in TOOLS.md:
MODEL_SOURCE_OLLAMA_LOCAL=ollama/llama3,ollama/qwen2.5,ollama/mistral
MODEL_SOURCE_OLLAMA_REMOTE=ollama-remote/qwen3.5:27b,ollama-remote/llama3:70b
MODEL_SOURCE_CLOUD_NVIDIA=nvidia/z-ai/glm5,nvidia/llama3
Queue Isolation
Each model source has its own queue file:
${MODEL_QUEUES_DIR}/ollama-local.json${MODEL_QUEUES_DIR}/ollama-remote.json
Queues are independent — a blocked task in one queue doesn't affect other queues.
Task Object Schema
{
"id": "T-001",
"queue": "ollama-local",
"model": "ollama/qwen2.5",
"description": "Analyze the sales data",
"goal": "Generate a summary of Q1 sales performance",
"status": "pending",
"priority": 0,
"depends_on": null,
"on_depends_fail": "block",
"context_input": null,
"result": null,
"result_status": null,
"result_summary": null,
"retries": 0,
"maxRetries": 3,
"subagent_session": null,
"added_at": "2026-03-04T16:51:00Z",
"started_at": null,
"completed_at": null
}
Task Statuses
| Status | Description |
|---|---|
pending | Ready to be dispatched (no dependencies or resolved) |
waiting | Has dependency, waiting for it to complete |
running | Currently executing via subagent |
done | Completed successfully |
failed | Failed after max retries |
blocked | Dependency failed, waiting for user action |
skipped | Skipped by user or due to dependency failure |
Two Operating Modes
| Mode | Trigger | Purpose |
|---|---|---|
| INTAKE | User message containing task intent | Parse message → route to queue → confirm → immediately run DISPATCHER |
| DISPATCHER | After INTAKE (primary) · Heartbeat/cron (backup) | Check queues → dispatch pending tasks → report completions |
A1 — Triggers
Model Source Configuration
REQUIRED: Configure model sources in TOOLS.md before first use.
Add to your TOOLS.md:
## Model Queue Configuration
MODEL_QUEUES_DIR=~/.openclaw/model-queues/
MODEL_QUEUE_MAX_RETRIES=3
MODEL_QUEUE_ARCHIVE_DAYS=7
# Model Source Mappings (REQUIRED)
# Format: MODEL_SOURCE_{NAME}=model1,model2,model3
MODEL_SOURCE_OLLAMA_LOCAL=ollama/llama3,ollama/qwen2.5,ollama/mistral
MODEL_SOURCE_OLLAMA_REMOTE=ollama-remote/qwen3.5:27b,ollama-remote/llama3:70b
MODEL_SOURCE_CLOUD_NVIDIA=nvidia/z-ai/glm5,nvidia/llama3
# Default model source when not specified (optional)
DEFAULT_MODEL_SOURCE=ollama-remote
How Model Source is Determined
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bg1avd-model-queue": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
Latex Verbatim Center
Skill by bg1avd
markdown-table-to-image
将 Markdown 表格转换为清晰图片。当用户说"表格看不清"、"生成图片"、"转成图片"时触发。
youtube-downloader-skimmer
下载 YouTube 视频并自动剪辑关键片段
QQBot Media Sender
一键发送图片/视频/文件到 QQ,支持批量发送和自动压缩
context-shrink
Auto-compress session memories when context usage exceeds 85%