agent-task-queue
Build and operate a multi-agent task queue in OpenClaw with priority queues, delayed/dead-letter queues, scheduling, retry/timeout control, dependency management, parallel execution, and execution tracking using the bundled TypeScript runtime.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/imgolye/agent-task-queueAgent Task Queue
Use this skill when a task needs queue-based orchestration for multiple agents or workers. The bundled runtime is in src/ and covers:
- Priority queue, delayed queue, and dead-letter queue behavior
- Scheduler polling with concurrency limits, retries, and timeouts
- Dependency validation, dependency gating, and result propagation
- Task logs and aggregate metrics
- Pluggable storage through in-memory, SQLite, or Redis backends
Workflow
- Import
TaskQueueandSchedulerfromsrc/index.ts. - Pick storage:
- Default
InMemoryStoragefor local execution or tests SQLiteStoragefor single-node persistenceRedisStoragefor distributed workers
- Default
- Register handlers with
scheduler.register(taskType, handler). - Enqueue tasks with
priority,runAt,dependencies,retryPolicy, andtimeoutMsas needed. - Drive execution via
scheduler.tick()orscheduler.start(). - Inspect
queue.logs(),queue.metrics(),queue.getSnapshot(), andqueue.get(taskId)for state and traceability.
Key Files
src/TaskQueue.ts: queue lifecycle, ready/dead-letter snapshots, logs, metricssrc/Scheduler.ts: polling loop, concurrency control, retries, timeout handlingsrc/DependencyManager.ts: DAG validation and dependency result propagationsrc/storage/: storage implementationstests/task-queue.test.ts: behavior coverageexamples/basic.ts: end-to-end usage
Implementation Notes
- Dependency tasks must already exist when a dependent task is enqueued.
- A task becomes runnable only after all dependencies are
completed. - Completed dependency results are stored and exposed to downstream handlers through
context.dependencies. - When retries are exhausted, the task is moved to
dead_letter. - Timeout cancellation uses
AbortSignal; long-running handlers should watchcontext.signal.
Validation
Run:
npm run check
If Redis or SQLite packages are unavailable in the environment, install dependencies first with npm install.
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-imgolye-agent-task-queue": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
xiaohongshu-viral-content
小红书爆款文案生成器。基于热门模板和数据驱动,生成高转化率的小红书内容。
daily-hot-push
每日推送中国热榜TOP10到飞书。从微博、知乎、百度、36氪筛选最重要的新闻,智能排除明星八卦和主观评论。
Doc Genius
Skill by imgolye
Crypto Scope
Skill by imgolye
agent-communication-hub
Provide agent-to-agent communication for OpenClaw skills with direct messaging, broadcast delivery, pub/sub events, session tracking, offline queues, and SQLite-backed persistence. Use when agents need reliable message exchange, event fan-out, subscription filtering, or communication history.