Agent Shared Context

v1.0.0

Cross-agent context sharing via shared files. Agents write trends, highlights, and signals to a shared folder. Other agents read before acting — creating coo...

0· 145·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for gum97/agent-shared-context.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Agent Shared Context" (gum97/agent-shared-context) from ClawHub.
Skill page: https://clawhub.ai/gum97/agent-shared-context
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install agent-shared-context

ClawHub CLI

Package manager switcher

npx clawhub@latest install agent-shared-context
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the provided code and instructions. The script reads/writes JSON in a shared workspace directory and the SKILL.md tells agents to call that CLI — all required capabilities are present and proportionate to cross-agent coordination.
Instruction Scope
Instructions direct agents to exec the included Python CLI to get/add/cleanup entries in shared JSON files — this is expected. Two notes: (1) the SKILL.md encourages embedding exec('python3 /path/to/scripts/...') in agent prompts which can introduce command-construction/injection risks if agent inputs are interpolated unsafely; (2) the script performs no file locking, so concurrent writers could race or corrupt state in multi-agent setups.
Install Mechanism
No install spec or remote downloads; the skill is instruction-only with a small included Python script. Nothing is written to disk beyond the shared JSON files the skill itself manages.
Credentials
No environment variables, credentials, or config paths are requested. The script uses only files under the workspace/shared directory, consistent with its stated purpose.
Persistence & Privilege
The skill is user-invocable and not always-enabled. It only creates/updates files within its own shared workspace; it does not modify other skills or system-wide settings.
Assessment
This skill is a simple, coherent file-based relay for agents, but it assumes a trust boundary: any agent or user with write access to the shared directory can influence all others. Before installing, ensure the shared folder is accessible only to trusted agents/users (set filesystem permissions), avoid constructing shell exec strings with unescaped/untrusted input (use safe argument passing), and consider adding file locks or atomic writes if you expect concurrent writes. If you need stronger guarantees, consider authenticated or signed entries or a small local service with access controls instead of plain JSON files.

Like a lobster shell, security has layers — review code before you run it.

latestvk97bqpb5hv60fnya4esjssfand83bs3y
145downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

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 <agent> --topic "<finding>" --score <relevance>')

Files

FilePurpose
shared/trends.jsonTopics trending across platforms
shared/highlights.jsonBest content found by any agent
scripts/shared-context.pyCLI 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.

Comments

Loading comments...