跳到正文
TakoAPI
返回技能列表

agent-weave

由 gl813788-byte 提供

Productivity & Tasks
478下载量由 clawskills.sh 提供
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Master-Worker Agent Cluster for parallel task execution.

描述

该技能的功能

agent-weave is a Node.js library for building master-worker agent clusters with parallel task execution. It provides a Loom factory, Master orchestrator, and Worker nodes that communicate through a secure parent-child channel. Supports MapReduce-style workflows via a built-in Tapestry engine.

Handles the boilerplate of inter-agent communication and worker lifecycle so you don't have to wire up message passing and task dispatch manually.

何时使用

  • Splitting a large dataset across 10 parallel worker agents
  • Running concurrent web scraping jobs with a single coordinator
  • Distributing image processing tasks to dynamically scaled workers
  • Implementing a map-reduce pipeline for log aggregation
  • Orchestrating multi-step agent workflows with dependency ordering

示例工作流

输入

User asks: process an array of 1000 numbers in parallel using 5 workers

智能体
  1. 1

    Import Loom from agent-weave and instantiate it

  2. 2

    Call loom.createMaster('my-cluster') to create a master node

  3. 3

    Call loom.spawnWorkers(master.id, 5, handler) to create 5 workers with a processing function

  4. 4

    Call master.dispatch(dataArray) to distribute tasks across workers

  5. 5

    Collect and return the aggregated results array

输出

Array of 1000 processed results, each handled by one of the 5 parallel workers

安装

clawhub install gl813788-byte/agent-weave

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接