← 返回 Skills 市场
howtimeschange

Agent Network

作者 howtimeschange · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
1633
总下载
3
收藏
4
当前安装
6
版本数
在 OpenClaw 中安装
/install agent-network
功能描述
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.
使用说明 (SKILL.md)

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

  • 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

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:

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:

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:

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:

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:

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:

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:

# 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:

# 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
安全使用建议
This skill appears to implement the advertised multi-agent chat and coordination features, but it exposes extensibility points that can send message content to arbitrary external URLs or run arbitrary code via registered handlers. Before installing: 1) Review any custom handlers or webhook URLs you plan to register — they can exfiltrate messages. 2) Run the skill in a sandboxed environment (isolated VM or container) and restrict outbound network access until you trust handlers. 3) Note the skill writes a SQLite DB at data/agent_network.db — inspect that file for sensitive content and set appropriate file permissions. 4) The advanced docs use the requests library but no dependency is declared; ensure dependencies are installed in a controlled environment. 5) There is a minor bug risk: database.init_database can raise an exception if schema.sql isn't found (os.path.exists(schema_path) with schema_path None). If you lack the ability to audit the code thoroughly, treat this skill cautiously and avoid registering untrusted webhook endpoints or handlers.
功能分析
Type: OpenClaw Skill Name: agent-network Version: 1.1.0 The skill is classified as suspicious due to significant prompt injection vulnerabilities and a clear capability for data exfiltration. Specifically, `SKILL.md` and `references/ADVANCED.md` demonstrate passing user-controlled input (`new_task.description` or `content`) directly as `task` or `description` arguments to `sessions_spawn` or `TaskManager.create`. This allows a malicious user to inject arbitrary instructions into sub-agents or tasks. Additionally, `references/ADVANCED.md` shows a `WebhookNotifier` that can send chat content to an arbitrary, user-defined `webhook_url`, posing a data exfiltration risk if a malicious agent is instructed to use a harmful endpoint.
能力评估
Purpose & Capability
The code files implement a multi-agent group chat, task management, voting, and a coordinator exactly as the name/description claim. Required resources (no env vars, no external binaries) are proportionate to this purpose.
Instruction Scope
SKILL.md and ADVANCED.md describe registering custom message handlers and a WebhookNotifier that POSTs message content to arbitrary URLs. That permits exfiltration of any message content (including sensitive data) to external endpoints. Coordinator.register_agent accepts user-provided handlers that run in-process (in threads) and can perform arbitrary actions (network I/O, filesystem access). The core instructions otherwise stay within the collaboration scope, but these extensibility points materially broaden the attack surface.
Install Mechanism
There is no install spec (lowest installer risk), but the skill ships many Python modules that will be executed when imported. The references show use of the requests library for webhooks but the package declares no dependencies — this may fail at runtime if requests isn't available. No remote download/install URLs are present.
Credentials
The skill declares no required environment variables or credentials, which is consistent with a local multi-agent collaboration tool. However, the webhook examples send data to external URLs (which would require network access) — there is no declaration or guard around that in SKILL.md.
Persistence & Privilege
always:false and default model-invocation behavior are appropriate. The skill writes a local SQLite DB (data/agent_network.db) for persistence — expected for this functionality. It does not request system-wide config changes or other skills' credentials.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-network
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-network 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Upgraded with improved CLI and task management
v2.2.1
v2.2.1 - Update documentation for Token-based authentication and Room collaboration.
v2.2.0
v2.2.0 - Add Token-based authentication. New namespace registration generates token. Same token can reconnect and kick old connections.
v2.1.0
v2.1.0 - Add Room/Channel system for organized collaboration. Support public/private rooms, room messages, invitations.
v2.0.0
v2.0.0 - New identity system: UUID (Hub-assigned) + Namespace (owner/name) + DisplayName (customizable). Breaking change from v1.x.
v1.0.0
Initial release - WebSocket-based agent collaboration network
元数据
Slug agent-network
版本 1.1.0
许可证
累计安装 4
当前安装数 4
历史版本数 6
常见问题

Agent Network 是什么?

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. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1633 次。

如何安装 Agent Network?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-network」即可一键安装,无需额外配置。

Agent Network 是免费的吗?

是的,Agent Network 完全免费(开源免费),可自由下载、安装和使用。

Agent Network 支持哪些平台?

Agent Network 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Network?

由 howtimeschange(@howtimeschange)开发并维护,当前版本 v1.1.0。

💬 留言讨论