agent-cluster-comm-v2
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "agent-cluster-comm-v2" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-841f09631d1ab354e193a7d6dcfad32c16f8f325f9563a07c4ca68642228a5c5. Verify the upstream source and version against https://skillhub.cn/skills/user_0816acf6/agent-cluster-v2 before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Agent cluster communication system v2 — a lightweight message queue based on SQLite that supports reliable communication, message acknowledgment, and state synchronization between agents. Suited for reliable message delivery among AI agents without requiring an external Redis dependency.
Introduction source: third_party · user_0816acf6 · 2.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: agent-cluster-comm-v2
description: >
Agent集群通讯系统 v2 - 基于SQLite嘅轻量级消息队列,支持Agent间可靠通讯、
消息确认、状态同步。适用于AI Agent间嘅可靠消息传递,无需额外依赖Redis。
version: 2.0.0
author: Create
license: MIT
keywords: [agent-cluster, message-queue, sqlite, communication, reliability, ai-agent]Agent集群通讯系统 v2
基于SQLite嘅轻量级消息队列系统,用于Agent间可靠通讯。
特性
- ✅ 持久化存储 — 消息存储喺SQLite数据库,重启唔会丢失
- ✅ 消息确认 — 发送消息后等待对方确认
- ✅ 自动重试 — 处理失败自动重试(最多3次)
- ✅ 死信队列 — 超过重试次数嘅消息转为死信
- ✅ 状态同步 — Agent之间共享状态
- ✅ 统一时间 — 所有消息包含统一时间信息
- ✅ 并发处理 — 支持同时处理多条消息
- ✅ 跨平台 — 支持Windows/Linux/macOS
快速开始
1. 安装
# 通过SkillHub安装
skillhub install agent-cluster-comm-v2
# 或者手动安装
cp -r agent-cluster-comm-v2 ~/.hermes/skills/
2. 配置
复制配置模板:
cp ~/.hermes/skills/agent-cluster-comm-v2/config.yaml.example ~/.hermes/skills/agent-cluster-comm-v2/config.yaml
编辑配置文件:
# 消息队列配置
queue:
db_path: "agent_messages.db"
poll_interval: 2
max_retries: 3
batch_size: 5
# Agent配置
agents:
- name: "agent1"
enabled: true
- name: "agent2"
enabled: true
3. 使用
发送消息
from sqlite_message_queue import SQLiteMessageQueue
queue = SQLiteMessageQueue("agent_messages.db")
queue.send("agent1", "agent2", "你好!")
queue.close()
接收消息
from sqlite_message_queue import SQLiteMessageQueue
queue = SQLiteMessageQueue("agent_messages.db")
messages = queue.poll("agent2", limit=10)
for msg in messages:
print(f"来自 {msg.from_agent}: {msg.content}")
queue.ack(msg.id, success=True)
queue.close()
启动监听器
python start.py agent1
API参考
SQLiteMessageQueue
初始化
queue = SQLiteMessageQueue(db_path: str)
发送消息
msg_id = queue.send(
from_agent: str,
to_agent: str,
content: str,
msg_type: str = "text"
) -> str
轮询消息
messages = queue.poll(
agent_name: str,
limit: int = 10
) -> List[Message]
确认消息
queue.ack(
message_id: str,
success: bool = True,
error_message: str = None
)
获取统计
stats = queue.get_stats()
重置卡住消息
count = queue.reset_stuck_messages(timeout_seconds: int = 300)
配置说明
queue配置
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| db_path | str | agent_messages.db | 数据库文件路径 |
| poll_interval | int | 2 | 轮询间隔(秒) |
| max_retries | int | 3 | 最大重试次数 |
| batch_size | int | 5 | 批量处理大小 |
agents配置
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| name | str | - | Agent名称 |
| enabled | bool | true | 是否启用 |
示例
查看 examples/ 目录获取更多示例:
basic_usage.py— 基本使用示例
故障排查
消息积压
stats = queue.get_stats()
if stats['pending_count'] > 100:
print("消息积压!")
queue.reset_stuck_messages(timeout_seconds=300)
处理失败
stats = queue.get_stats()
if stats['failed_count'] > 0:
print(f"有 {stats['failed_count']} 条失败消息")
死信消息
stats = queue.get_stats()
if stats['dead_count'] > 0:
print(f"有 {stats['dead_count']} 条死信消息")
最佳实践
- 消息内容 — 保持简洁,避免过长
- 确认机制 — 处理完消息后及时确认
- 错误处理 — 处理失败时提供错误信息
- 心跳监控 — 定期检查心跳文件
- 定期清理 — 定期清理已完成消息
更新日志
v2.0.0 (2026-06-08)
- 初始版本
- 支持SQLite持久化
- 支持消息确认
- 支持自动重试
- 支持死信队列
- 支持状态同步
- 支持统一时间
- 支持并发处理
- 支持跨平台
Current listing version
2.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供基于SQLite的轻量级消息队列,解决AI Agent间可靠通信的实际痛点
- 功能完整,包含消息确认、自动重试、死信队列等可靠性机制
- 无需额外依赖Redis,部署简单,适用性强
Highlights
- 触发词精准完整,包含'Agent集群通讯'、'消息队列'、'SQLite'等核心关键词
- description内容完整,未截断,边界清晰
Highlights
- 文档结构完整,包含特性、快速开始、API参考、配置说明、示例、故障排查等
- frontmatter完整,单文件长度适中,规范良好
Highlights
- 工具来源明确,参数说明清晰,异常处理机制完善
- 提供故障排查和最佳实践指导,执行可靠性高
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.