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.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agent-task-queue" with this command: npx skills add imgolye/agent-task-queue

Agent 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

  1. Import TaskQueue and Scheduler from src/index.ts.
  2. Pick storage:
    • Default InMemoryStorage for local execution or tests
    • SQLiteStorage for single-node persistence
    • RedisStorage for distributed workers
  3. Register handlers with scheduler.register(taskType, handler).
  4. Enqueue tasks with priority, runAt, dependencies, retryPolicy, and timeoutMs as needed.
  5. Drive execution via scheduler.tick() or scheduler.start().
  6. Inspect queue.logs(), queue.metrics(), queue.getSnapshot(), and queue.get(taskId) for state and traceability.

Key Files

  • src/TaskQueue.ts: queue lifecycle, ready/dead-letter snapshots, logs, metrics
  • src/Scheduler.ts: polling loop, concurrency control, retries, timeout handling
  • src/DependencyManager.ts: DAG validation and dependency result propagation
  • src/storage/: storage implementations
  • tests/task-queue.test.ts: behavior coverage
  • examples/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 watch context.signal.

Validation

Run:

npm run check

If Redis or SQLite packages are unavailable in the environment, install dependencies first with npm install.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Verified Agent Identity

Billions decentralized identity for agents. Link agents to human identities using Billions ERC-8004 and Attestation Registries. Verify and generate authentic...

Registry SourceRecently Updated
15.4K41obrezhniev
Automation

Agent

Digital agent for Billions Network enabling community engagement and decentralized task management, optimized for mobile use in Cirebon and surrounding areas.

Registry SourceRecently Updated
Automation

Xia Card

个人社交名片生成、管理和分享,以及智能花名册(通讯录管理器)。当用户提到名片、花名册、通讯录、联系人、虾名片、agent-card 时使用。具体触发场景包括:开通虾名片、建花名册、生成/更新/发名片、注册虾名片、录入/查询/编辑联系人、同步花名册、收到包含 agent-card:// 协议的消息时自动识别并保存他...

Registry SourceRecently Updated
Automation

挑选Skill

挑选Skill — 哪个AI Skill值得装?AI Skill生态的消费决策指南。覆盖58赛道、29000+ Skill,双轨评分(热度分给人类 + 质量分给Agent),提供搜索推荐、相似替代、工作流建议和13维质量分析。

Registry SourceRecently Updated
agent-task-queue | V50.AI