npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openclaw-harness/orchestrator

v0.1.0

Published

OpenClaw Harness Orchestrator - Multi-Agent coordination and task dispatching

Readme

@openclaw-harness/orchestrator

npm version License: MIT

English | 中文

多 Agent 协调和任务分发

特性

  • 🤖 Agent 管理 - 注册、管理和监控多个 Agent
  • 🎯 智能路由 - 能力匹配、负载均衡、成本优化
  • 🔄 Agent 交接 - Agent 之间的无缝上下文转移
  • 📢 广播 - 向多个 Agent 广播消息

安装

npm install @openclaw-harness/orchestrator

快速开始

import { HarnessOrchestratorPlugin } from '@openclaw-harness/orchestrator';

const plugin = new HarnessOrchestratorPlugin();

// 初始化
await plugin.init(openClawContext);

// 获取编排器服务
const orchestratorService = openClawContext.api.getService('harness:orchestrator');

// 注册 Agent
await orchestratorService.registerAgent({
  id: 'my-agent',
  name: '我的 Agent',
  capabilities: [{ name: 'text-generation', description: '生成文本' }]
});

// 分发任务
const result = await orchestratorService.dispatchTask({
  id: 'task-1',
  type: 'text-generation',
  description: '写一首诗',
  input: {},
  priority: 'medium'
});

路由策略

  • 能力匹配 - 根据任务类型选择具有相应能力的 Agent
  • 轮询 - 平均分配任务到所有可用 Agent
  • 负载均衡 - 选择负载最轻的 Agent
  • 成本优化 - 优先选择成本较低的 Agent
  • 性能优化 - 选择响应时间最短的 Agent

CLI 命令

# 列出所有 Agent
openclaw harness:agent:list

# 从 JSON 文件注册 Agent
openclaw harness:agent:register ./agent-config.json

# 注销 Agent
openclaw harness:agent:unregister <agent-id>

# 查看 Agent 状态
openclaw harness:agent:status <agent-id>

# 分发任务
openclaw harness:task:dispatch '{"id":"task-1","type":"text-generation","description":"写一首诗"}'

# Agent 交接
openclaw harness:agent:handoff <from-agent-id> <to-agent-id>

# 查看指标
openclaw harness:orchestrator:metrics

HTTP API

# 列出所有 Agent
curl http://localhost:3000/harness/agents

# 注册 Agent
curl -X POST http://localhost:3000/harness/agents \
  -H "Content-Type: application/json" \
  -d @agent-config.json

# 分发任务
curl -X POST http://localhost:3000/harness/tasks \
  -H "Content-Type: application/json" \
  -d '{"id":"task-1","type":"text-generation","description":"写一首诗","input":{},"priority":"medium"}'

# Agent 交接
curl -X POST http://localhost:3000/harness/handoff \
  -H "Content-Type: application/json" \
  -d '{"fromAgentId": "agent-1", "toAgentId": "agent-2"}'

Agent 配置示例

{
  "id": "tech-agent",
  "name": "技术支持 Agent",
  "description": "处理技术问题",
  "capabilities": [
    { "name": "technical-support", "description": "处理技术问题" },
    { "name": "debugging", "description": "调试代码问题" }
  ],
  "tools": ["search", "code-executor", "file-reader"],
  "model": "gpt-4"
}

协调模式

Supervisor 模式

一个主管 Agent 管理多个工作 Agent:

const coordination = orchestratorService.createCoordination({
  type: 'supervisor',
  config: {
    supervisorAgentId: 'supervisor',
    workerAgentIds: ['worker1', 'worker2'],
    delegationStrategy: 'auto'
  }
});

Pipeline 模式

多个 Agent 按顺序处理任务:

const coordination = orchestratorService.createCoordination({
  type: 'pipeline',
  config: {
    stages: [
      { id: 'stage1', agentId: 'agent1' },
      { id: 'stage2', agentId: 'agent2' }
    ],
    errorHandling: 'stop'
  }
});

文档

查看 完整文档 获取更多详情。

许可证

MIT © OpenClaw Harness Team