howtimeschange

Agent Network

AI 智能体v1.1.0
作者:howtimeschange更新于 2026-05-17共 6 个版本 · 最新版本发布于 2026-02-11agent-network@clawhub_howtimeschange/agent-network
任务自动化多 Agent 协作工作流编排#Multi Agent

据 AlphaMoat 统计,截至 2026-09,Agent Network 累计下载 2,997 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 3,732 位,在「AI 智能体」分类(969 个)中排名第 753 位。

累计安装
124
累计下载
2,997
星标
3
全站排名
#3,732
全站前 74% · 「AI 智能体」前 78%
平台累计安装累计下载星标评论
ClawHub ↗882,9683-
SkillHub ↗1242,9973—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

它提供消息历史、@提醒、任务创建与分配、决策投票、收件箱通知和在线状态,并使用 SQLite 保存协调记录。当前缺少访问控制,能够访问软件包的调用方可能冒充 agent 或读取、修改、删除共享记录;仅适用于可信的本地或单运营者流程。

资料发布于 2026-10-29

可以用来做什么

  • 设计 agent 群组交流和任务分配流程
  • 组织基于投票的协作决策
  • 审查共享记录的访问控制需求

什么时候用

  • 参与方可信且在增加身份验证、成员权限和审计控制前不处理敏感内容时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

概述群组消息、任务分配和投票决策的数据流程,不要连接真实服务。
检查在共享记录中存储敏感内容前需要增加哪些身份验证和权限控制。

月度数据趋势

累计下载2,997
1,4222,2683,1142026-03 · 累计下载 1,5392026-05 · 累计下载 2,1582026-06 · 累计下载 2,3992026-07 · 累计下载 2,6782026-08 · 累计下载 2,8202026-09 · 累计下载 2,99726-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,997—3
2026-082,820+5.3%3
2026-072,678+11.6%3
2026-062,399+11.2%3
2026-052,158—3
2026-031,539—3

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

8.0 KB · ClawHub v1.1.0
---
name: agent-network
description: Multi-Agent group chat collaboration system inspired by DingTalk/Lark. Enables AI agents to chat in groups, @mention each other, assign tasks, make decisions via voting, and collaborate. Use when building multi-agent systems that need structured communication, task delegation, decision making, or group coordination.
---

# Agent Network - Multi-Agent Collaboration System

A complete multi-agent group chat and collaboration platform that allows AI agents to communicate, coordinate, and collaborate in a structured environment similar to enterprise chat platforms like DingTalk or Lark.

## What This Skill Provides
展开全部(共 312 行)

- **Group Chat System** - Multiple agents can chat in groups with message history
- **@Mentions** - Agents can @mention each other to trigger notifications
- **Task Management** - Create, assign, track, and complete tasks
- **Decision Voting** - Propose decisions and vote (for/against/abstain)
- **Inbox Notifications** - Unread message tracking and notification center
- **Online Status** - Real-time agent online/offline status
- **Central Coordinator** - Message routing and agent lifecycle management

## Quick Start

```python
from agent_network import AgentManager, GroupManager, MessageManager, TaskManager, DecisionManager, get_coordinator

# Initialize default agents
from agent_network import init_default_agents
init_default_agents()

# Get the coordinator
coordinator = get_coordinator()

# Register agents
coordinator.register_agent(agent_id=1)
coordinator.register_agent(agent_id=2)

# Create a group
group = GroupManager.create("Dev Team", owner_id=1, description="Development team chat")
GroupManager.add_member(group.id, agent_id=2)

# Send a message with @mention
MessageManager.send_message(
    from_agent_id=1,
    content="@小邢 Please check the server status",
    group_id=group.id
)

# Assign a task
task = TaskManager.create(
    title="Fix login bug",
    assigner_id=1,
    assignee_id=2,
    description="Users can't login with SSO",
    priority="high"
)

# Create a decision
decision = DecisionManager.create(
    title="Adopt new database?",
    description="Should we migrate to distributed database?",
    proposer_id=1,
    group_id=group.id
)

# Vote on decision
DecisionManager.vote(decision.id, agent_id=2, vote="for", comment="Agreed, better performance")
```

## Core Components

### 1. Agent Management (`agent_manager.py`)

Register and manage agents with online/offline status:

```python
from agent_network import AgentManager

# Register new agent
agent = AgentManager.register("NewAgent", "Developer", "Backend specialist")

# Set status
AgentManager.go_online(agent.id)
AgentManager.go_offline(agent.id)

# Get online agents
online = AgentManager.get_online_agents()
```

### 2. Group Management (`group_manager.py`)

Create groups and manage membership:

```python
from agent_network import GroupManager

# Create group
group = GroupManager.create("Project Alpha", owner_id=1)

# Add members
GroupManager.add_member(group.id, agent_id=2)
GroupManager.add_member(group.id, agent_id=3)

# List members
members = GroupManager.get_members(group.id)
online_members = GroupManager.list_online_members(group.id)
```

### 3. Message System (`message_manager.py`)

Send messages with @mention support:

```python
from agent_network import MessageManager

# Send message
msg = MessageManager.send_message(
    from_agent_id=1,
    content="Hello team!",
    group_id=1
)

# @mention automatically detected
msg = MessageManager.send_message(
    from_agent_id=1,
    content="@Alice @Bob Please review this",
    group_id=1
)

# Get message history
messages = MessageManager.get_group_messages(group_id=1, limit=50)

# Search messages
results = MessageManager.search_messages("keyword", group_id=1)

# Get unread count
unread = MessageManager.get_unread_count(agent_id=1)
inbox = MessageManager.get_agent_inbox(agent_id=1, only_unread=True)
```

### 4. Task Management (`task_manager.py`)

Full task lifecycle:

```python
from agent_network import TaskManager

# Create task
task = TaskManager.create(
    title="Implement API",
    assigner_id=1,
    assignee_id=2,
    description="Build REST endpoints",
    priority="high",  # low/normal/high/urgent
    due_date="2026-02-15"
)

# Update status
TaskManager.start_task(task.id, agent_id=2)
TaskManager.complete_task(task.id, agent_id=2, result="All tests passed")

# Add comments
TaskManager.add_comment(task.id, agent_id=2, "50% complete")

# List tasks
all_tasks = TaskManager.get_all()
my_tasks = TaskManager.get_agent_tasks(agent_id=2, status="pending")
```

### 5. Decision Voting (`decision_manager.py`)

Collaborative decision making:

```python
from agent_network import DecisionManager

# Create proposal
decision = DecisionManager.create(
    title="Use microservices?",
    description="Should we refactor to microservices?",
    proposer_id=1,
    group_id=1
)

# Vote
DecisionManager.vote(decision.id, agent_id=2, vote="for", comment="Better scalability")
DecisionManager.vote(decision.id, agent_id=3, vote="against")

# Update status
DecisionManager.update_status(decision.id, "approved", updater_id=1)

# Check results
decision = DecisionManager.get_by_id(decision.id)
print(f"Pass rate: {decision.pass_rate}%")
```

### 6. Central Coordinator (`coordinator.py`)

High-level coordination with automatic message routing:

```python
from agent_network import get_coordinator

coord = get_coordinator()

# Register with message handler
def my_handler(msg_dict):
    print(f"Received: {msg_dict['content']}")

coord.register_agent(agent_id=1, message_handler=my_handler)

# Send through coordinator (auto-routes to handlers)
coord.send_message(from_agent_id=1, content="Hello", group_id=1)

# Task coordination
task = coord.assign_task(
    title="Deploy app",
    description="Deploy to production",
    assigner_id=1,
    assignee_id=2
)

# Decision coordination
decision = coord.propose_decision(
    title="Release v2.0?",
    description="Ready for release?",
    proposer_id=1
)
coord.vote_decision(decision['id'], agent_id=2, vote="for")
```

## CLI Usage

Interactive CLI for testing:

```bash
# Run demo
python demo.py

# Interactive CLI
python cli.py

# Commands in CLI:
# - Select agent to login
# - Enter groups to chat
# - Type /task to create tasks
# - Type /decision to create votes
# - Type @AgentName to mention
```

## Default Agents

Six pre-configured agents:

| Agent | Role | Description |
|-------|------|-------------|
| 老邢 (Lao Xing) | Manager | Overall coordination |
| 小邢 (Xiao Xing) | DevOps | Development and operations |
| 小金 (Xiao Jin) | Finance Analyst | Market analysis |
| 小陈 (Xiao Chen) | Trader | Trading execution |
| 小影 (Xiao Ying) | Designer | Design and content |
| 小视频 (Xiao Shipin) | Video | Video production |

## Database Schema

SQLite database with tables:
- `agents` - Agent profiles and status
- `groups` - Group definitions
- `group_members` - Membership relations
- `messages` - Chat messages with types
- `tasks` - Task tracking
- `task_comments` - Task discussions
- `decisions` - Decision proposals
- `decision_votes` - Voting records
- `agent_inbox` - Notification inbox

## Integration with OpenClaw

Use with `sessions_spawn` for true multi-agent workflows:

```python
# When a task is assigned, spawn a sub-agent
if new_task:
    sessions_spawn(
        agentId="xiaoxing",
        task=new_task.description,
        label=f"task-{new_task.task_id}"
    )
```

## Files Reference

- `scripts/agent_network/` - Python modules
  - `__init__.py` - Package exports
  - `database.py` - SQLite management
  - `agent_manager.py` - Agent CRUD
  - `group_manager.py` - Group management
  - `message_manager.py` - Messaging system
  - `task_manager.py` - Task management
  - `decision_manager.py` - Voting system
  - `coordinator.py` - Central coordinator
- `scripts/cli.py` - Interactive CLI
- `scripts/demo.py` - Demo script
- `references/schema.sql` - Database schema
- `assets/` - Templates (optional)

## Advanced Usage

See `references/ADVANCED.md` for:
- Custom agent handlers
- Webhook integrations
- Message filtering
- Custom workflows

「AI 智能体」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。