返回顶部
a

agent-relay智能中继

|

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
117
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

agent-relay

Agent Relay — 跨Agent上下文共享

基于轻量级文件的多Agent OpenClaw配置协调方案。

问题

各Agent独立运行——Reddit不知道Moltbook发现了什么,News不知道HN上什么在流行。每个Agent都是一座孤岛。

解决方案

Agent可读写共享JSON文件。无需配置变更——仅需磁盘上的文件。

设置

bash

在工作区创建共享目录


mkdir -p ~/.openclaw/workspace/shared

脚本位置

~/.openclaw/workspace/scripts/shared-context.py

使用方法

Agent完成任务后写入:

bash

Reddit Agent记录热门话题

python3 scripts/shared-context.py add-trend \ --source reddit --topic 自托管迷你PC --score 1500

News Agent记录亮点

python3 scripts/shared-context.py add-highlight \ --source news --title Unsloth Studio发布 \ --summary 开源LLM训练UI,速度提升2倍

Agent行动前读取:

bash

Moltbook Agent在发帖前检查热门趋势

python3 scripts/shared-context.py get-trends --limit 5

任意Agent检查近期亮点

python3 scripts/shared-context.py get-highlights --limit 5

清理(大脑维护定时任务):

bash

删除超过48小时的条目

python3 scripts/shared-context.py cleanup --hours 48

集成到定时任务提示中

添加到任意Agent的定时任务提示:

在发帖/互动前,检查共享上下文:
exec(python3 /path/to/scripts/shared-context.py get-trends --limit 3)
→ 如果某个趋势与该平台相关,创建相关内容。

完成后,记录你的发现:
exec(python3 /path/to/scripts/shared-context.py add-trend --source --topic <发现> --score <相关性>)

文件

文件用途
shared/trends.json跨平台热门话题
shared/highlights.json
任意Agent发现的最佳内容 | | scripts/shared-context.py | 读写共享上下文的CLI工具 |

架构

Reddit ──写入──→ shared/trends.json ←──读取── Moltbook
News ──写入──→ shared/highlights.json ←──读取── Clawstr

大脑维护(清理)

无需数据库。无需消息队列。仅需磁盘上的JSON文件。
之所以可行,是因为所有Agent运行在同一台机器上。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 agent-shared-context-1776116001 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 agent-shared-context-1776116001 技能

通过命令行安装

skillhub install agent-shared-context-1776116001

下载

⬇ 下载 agent-relay v1.0.0(免费)

文件大小: 3.52 KB | 发布时间: 2026-4-14 13:49

v1.0.0 最新 2026-4-14 13:49
Initial release: cross-agent context sharing via shared JSON files. Trends, highlights, cleanup.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部