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

mm_ai

v1.4.8

Published

AI智能体系统模块,用于快速搭建智能体系统,支持智能体、工具、技能,自定义LLM等功能。

Readme

mm_ai

npm version License Node.js Version

基于大语言模型的 AI 智能体协作框架 —— 像管理团队一样管理 AI。

概述

mm_ai 是一个 AI 智能体协作框架,由 LLM(大语言模型)Agent(智能体)Skills(技能)Tools(工具)Memory(记忆) 构成。

不同于传统的单一 AI 对话模式,mm_ai 采用 多智能体协作 模式:

  • master(行动指导员) — 理解用户需求,统筹调度
  • 各专业智能体 — 各司其职(产品经理、架构师、设计师、开发、测试……)
  • 自动编排 — 智能体之间自动协调,无需人工介入

核心特性

🤖 多智能体协作

内置 50+ 专业智能体,覆盖开发、设计、管理、创作等领域,智能体间自动协作完成任务。

🎯 自动任务编排

master 智能体根据需求自动评估工作量、分级处理、调度最合适的专业智能体。

🧩 可扩展架构

支持自定义智能体、技能、工具,也可以通过 MCP 协议对接外部服务。

🔄 多通道支持

内置多种通信通道(Web、微信、Telegram、钉钉、飞书),支持流式输出。

安装

npm install mm_ai

要求 Node.js >= 16.x

快速开始

方式一:通过代码集成

const { MM_AI } = require('mm_ai');

async function start() {
  // 创建实例
  const ai = new MM_AI({
    // LLM 配置(以 deepseek 为例)
    llm: {
      name: 'deepseek_chat',
      config: {
        api_key: process.env.DEEPSEEK_API_KEY
      }
    }
  });

  // 初始化
  await ai.init();

  // 发送消息
  const res = await ai.send('userA', 'session1', '你好,我想开发一个博客网站');
  console.log('回复:', res.content);

  // 监听流式输出
  ai.on('chat:out', (msg) => {
    console.log('流式消息:', msg);
  });
}

start();

方式二:启动 Web 服务

git clone https://gitee.com/mm_modules_ok/mm_ai_server.git
cd mm_ai_server
npm start

访问 http://localhost:8000 即可使用。

架构概览

用户需求
    │
    ▼
┌─────────────┐
│   master    │  ← 行动指导员,统筹调度
│  智能体核心 │
└──────┬──────┘
       │
       ├──→ project_manager  (项目规划)
       ├──→ product_manager  (产品需求)
       ├──→ hr_manager       (人力分配)
       ├──→ task_manager     (任务分解)
       ├──→ skill_teacher    (技能创建)
       ├──→ tool_maker       (工具研发)
       ├──→ fullstack_developer (全栈开发)
       ├──→ ui_designer      (UI设计)
       ├──→ tester           (测试)
       └──→ ... 更多专业智能体

工作流程

  1. 用户提出需求 → master 理解并评估工作量
  2. 查干系人 → 判断有没有专业智能体更适合处理
  3. 分级处理 → 微小/小/中/大/特大,选择不同策略
  4. 调度执行 → 调用专业智能体完成任务
  5. 质量验收 → 验证交付成果,与用户共同验收
  6. 反馈收尾 → 绩效反馈,沉淀最佳实践

内置模块

智能体 (50+)

| 分类 | 智能体 | 职责 | |:----|:-------|:-----| | 管理 | master、hr_manager、project_manager、product_manager、task_manager | 调度、规划、分配、管理 | | 开发 | fullstack_developer、web_frontend_developer、nodejs_backend_developer、python_developer 等 | 编码实现 | | 设计 | ui_designer、graphic_designer、icon_designer、painter、art_director | 视觉设计 | | 创作 | novel_author、screen_writer、director、composer、video_editor | 小说、编剧、影视 | | 游戏 | game_planner、narrative_planner、level_planner、values_planner、game_tester | 游戏策划与测试 | | 测试 | web_frontend_tester、nodejs_program_tester、python_program_tester | 质量保障 | | 数据 | data_analyst、database_admin | 数据分析、数据库 | | 运维 | system_admin、file_manager、iot_manager | 系统运维 |

完整列表见 内置智能体.md

技能 (50+)

涵盖需求分析、智能体调度、质量验收、全栈开发、UI设计、数据库设计、游戏策划等各领域。

完整列表见 内置技能.md

工具 (50+)

包括智能体管理、文件操作、代码执行、通信协作、检测检查等各类工具。

完整列表见 内置工具.md

配置说明

LLM 配置

支持多种大语言模型,通过配置文件指定:

{
  "llm": "deepseek_chat",
  "llm_config": {
    "api_key": "your-api-key",
    "base_url": "https://api.deepseek.com"
  }
}

支持的模型:DeepSeek、OpenAI、通义千问、文心一言 等。

智能体自定义

每个智能体的配置位于 common/agent/{分组}/{智能体名}/agent.json

{
  "name": "my_agent",
  "title": "我的智能体",
  "description": "自定义智能体描述",
  "skills": ["skill1", "skill2"],
  "tools": ["tool1", "tool2"],
  "stakeholders": {
    "other_agent": "能帮我做什么"
  }
}

API 参考

核心方法

| 方法 | 说明 | |:-----|:------| | new MM_AI(config) | 创建实例 | | ai.init() | 初始化所有模块 | | ai.send(user, session, content) | 发送消息 | | ai.on('chat:out', cb) | 监听输出事件 | | ai.console() | 启动控制台交互模式 |

事件监听

| 事件 | 说明 | |:-----|:------| | chat:out | 智能体输出消息(含流式分段) | | chat:error | 错误事件 | | chat:complete | 完整回复完成 |

二次开发

详见 二次开发指南,涵盖:

  • 如何创建自定义智能体
  • 如何开发技能、工具、常识知识
  • API 参考与事件系统
  • LLM 接入与 MCP 协议
  • 测试指南

License

MIT