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

@starlink-awaken/agentmesh

v1.0.3

Published

Unified Agent Gateway - Multi-Agent Scheduler and Router

Downloads

37

Readme

@starlink-awaken/agentmesh

统一的 Agent 调度网关 - 多智能体调度与路由

English | 中文

概述

Agent Mesh 是一个强大的多智能体调度网关,能够协调和调度多种 AI Agent(包括 Claude Code、OpenClaw 以及其他本地安装的 Agent CLI 工具)。

特性

  • 🤖 多 Agent 支持 - 内置支持 24+ 种 AI Agent
  • 🎯 智能路由 - 根据任务类型自动选择合适的 Agent
  • 🔄 双向调度 - 支持 Agent 之间的相互调用
  • 👥 多 Agent 协作 - 同一任务可调度多个 Agent
  • 📁 上下文共享 - 文件级共享空间,支持上下文持久化
  • 🌐 REST API - 完整的 HTTP API 支持
  • 📡 实时事件 - SSE/WebSocket 实时任务更新
  • 📊 监控日志 - 内置指标收集和日志系统

快速开始

安装

# 使用 bun
bun add @starlink-awaken/agentmesh

# 或使用 npm
npm install @starlink-awaken/agentmesh

# 或使用 yarn
yarn add @starlink-awaken/agentmesh

CLI 全局安装

npm install -g @starlink-awaken/agentmesh

# 或者
bun install -g @starlink-awaken/agentmesh

启动服务

# 使用 bun
bun run src/index.ts

# 或使用 CLI
agent-gateway start

# 或指定端口
agent-gateway start --port 8080

使用 Docker

# 构建镜像
docker build -t agentmesh .

# 运行容器
docker run -p 3000:3000 agentmesh

使用方法

CLI 命令

# 列出所有可用 Agent
agent-gateway agents

# 提交通用任务(自动路由)
agent-gateway task "帮我写一个排序算法"

# 提交任务到指定 Agent
agent-gateway to claude-code "帮我 review 这段代码"

# 创建共享空间
agent-gateway space create-space

# 列出所有任务
agent-gateway tasks

# 检查 Gateway 状态
agent-gateway health

REST API

# 健康检查
curl http://localhost:3000/health

# 提交任务
curl -X POST http://localhost:3000/tasks \
  -H "Content-Type: application/json" \
  -d '{"payload": {"task": "帮我写一个排序算法"}}'

# 获取 Agent 列表
curl http://localhost:3000/agents

# 创建共享空间
curl -X POST http://localhost:3000/spaces \
  -H "Content-Type: application/json" \
  -d '{"metadata": {"name": "项目A"}}'

JavaScript/TypeScript

import { AgentGateway } from '@starlink-awaken/agentmesh';

const gateway = new AgentGateway({
  port: 3000,
  agents: [
    { id: 'claude-code', command: 'claude', args: ['-p'] }
  ]
});

await gateway.start();

// 提交任务
const task = await gateway.submitTask({
  payload: {
    task: '帮我写一个排序算法'
  }
});

console.log('Task ID:', task.id);

配置

路由规则

config/gateway.yaml 中配置任务路由规则:

routing:
  rules:
    - name: code-review
      keywords: [review, code review, pr review]
      agent: claude-code
      priority: 10

    - name: browser-automation
      keywords: [browser, scrape, click]
      agent: openclaw
      priority: 10

Agent 配置

agents:
  - id: claude-code
    name: Claude Code
    type: claude-code
    capabilities:
      - code-generation
      - code-review

  - id: my-agent
    name: My Custom Agent
    type: http
    endpoint: http://localhost:8080

支持的 Agent

| Agent | 描述 | 能力 | |-------|------|------| | claude-code | Anthropic Claude Code | 代码生成、审查、重构 | | openclaw | OpenClaw | 浏览器自动化、网页抓取 | | cursor | Cursor | 代码补全、聊天 | | windsurf | Windsurf | Agent 编码、Flow 状态 | | aider | Aider | Git 集成编辑、多文件修改 | | ollama | Ollama | 本地 LLM、隐私优先 | | perplexity | Perplexity | 研究助手、网络搜索 | | grok | xAI Grok | 推理、代码生成 | | ... | 更多 Agent | 见文档 |

架构

┌─────────────────────────────────────────────────────────────┐
│                     Agent Mesh Gateway                       │
├─────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐       │
│  │  Task API   │  │  Event Bus  │  │  Discovery │       │
│  │  (REST/WS) │  │  (Pub/Sub) │  │   Service  │       │
│  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘       │
│         │                 │                 │               │
│  ┌──────┴────────────────┴─────────────────┴──────┐      │
│  │              Context Manager                     │      │
│  │  ┌─────────┐  ┌─────────┐  ┌─────────┐       │      │
│  │  │  Memory │  │  Files  │  │VectorDB │       │      │
│  │  │  Cache  │  │ Persist │  │ Storage │       │      │
│  │  └─────────┘  └─────────┘  └─────────┘       │      │
│  └──────────────────────┬──────────────────────────┘      │
└─────────────────────────┼──────────────────────────────────┘
                          │
        ┌─────────────────┼─────────────────┐
        ▼                 ▼                 ▼
   ┌─────────┐       ┌─────────┐       ┌─────────┐
   │ Claude  │       │  Open   │       │  Other  │
   │  Code   │◄────►│  Claw   │◄────►│  Agents │
   └─────────┘       └─────────┘       └─────────┘

文档

贡献

欢迎贡献代码!请阅读 贡献指南 了解如何参与项目开发。

许可证

MIT License - 请查看 LICENSE 文件。

赞助

如果你喜欢这个项目,请考虑赞助我们。


Made with ❤️ by Starlink Awaken