/install agent-shared-context
Agent Relay — Cross-Agent Context Sharing
Lightweight file-based coordination for multi-agent OpenClaw setups.
Problem
Agents run independently — Reddit doesn't know what Moltbook found, News doesn't know what's trending on HN. Each agent is an island.
Solution
Shared JSON files that agents write to and read from. No config changes needed — just files on disk.
Setup
# Create shared directory in workspace
mkdir -p ~/.openclaw/workspace/shared
# Script location
~/.openclaw/workspace/scripts/shared-context.py
Usage
Agent writes after finishing work:
# Reddit agent logs trending topic
python3 scripts/shared-context.py add-trend \
--source reddit --topic "self-hosting mini PCs" --score 1500
# News agent logs highlight
python3 scripts/shared-context.py add-highlight \
--source news --title "Unsloth Studio launched" \
--summary "Open-source LLM training UI, 2x faster"
Agent reads before acting:
# Moltbook agent checks what's trending before posting
python3 scripts/shared-context.py get-trends --limit 5
# Any agent checks recent highlights
python3 scripts/shared-context.py get-highlights --limit 5
Cleanup (brain-maintenance cron):
# Remove entries older than 48 hours
python3 scripts/shared-context.py cleanup --hours 48
Integration into cron prompts
Add to any agent's cron prompt:
Before posting/engaging, check shared context:
exec('python3 /path/to/scripts/shared-context.py get-trends --limit 3')
→ If a trend is relevant to this platform, create content about it.
After finishing, log what you found:
exec('python3 /path/to/scripts/shared-context.py add-trend --source \x3Cagent> --topic "\x3Cfinding>" --score \x3Crelevance>')
Files
| File | Purpose |
|---|---|
shared/trends.json |
Topics trending across platforms |
shared/highlights.json |
Best content found by any agent |
scripts/shared-context.py |
CLI to read/write shared context |
Architecture
Reddit ──write──→ shared/trends.json ←──read── Moltbook
News ──write──→ shared/highlights.json ←──read── Clawstr
↑
brain-maintenance (cleanup)
No database. No message queue. Just JSON files on disk. Works because all agents run on the same machine.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-shared-context - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-shared-context触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Agent Shared Context 是什么?
Cross-agent context sharing via shared files. Agents write trends, highlights, and signals to a shared folder. Other agents read before acting — creating coo... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 148 次。
如何安装 Agent Shared Context?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-shared-context」即可一键安装,无需额外配置。
Agent Shared Context 是免费的吗?
是的,Agent Shared Context 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Agent Shared Context 支持哪些平台?
Agent Shared Context 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Shared Context?
由 Gum97(@gum97)开发并维护,当前版本 v1.0.0。