agent-messaging-patterns

Solid

Wire inter-agent communication — signal files, shared state via files/KV, approval queues, budget delegation, capability passing, and broadcast/ subscribe patterns for agents running in parallel terminals or processes. Use when asked about "agents communicating", "agent signals", "how agent A tells agent B", "agent approval queue", "agent budget cap", "pass context between agents", "agent broadcast", "agent subscribe", "hcom", "inter-agent protocol", "agent pipeline", or "agent tool approval chain". Do NOT use for: git-based agent coordination — see git-native-agent-protocol. Do NOT use for: subagent spawning API — see subagent-dependency.

AI & Automation 2 stars 0 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
16
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

## When to Use - Use when: two agents run in separate terminals and need to signal each other - Use when: an agent needs human/orchestrator approval before a destructive action - Use when: one agent produces output that another agent consumes as input - Use when: budget/capability restrictions must be enforced at agent boundaries - Do NOT use for: full distributed message bus — this is file/signal-level coordination - Do NOT use for: git-based task queuing — see git-native-agent-protocol --- ## Signal File Pattern (Simplest) ```bash # Agent A writes a signal; Agent B polls for it SIGNAL_DIR=".claude/signals" mkdir -p "$SIGNAL_DIR" # Agent A: signal completion echo '{"status":"done","output":"dist/bundle.js","agent":"build-agent","ts":"'$(date -Iseconds)'"}' \ > "$SIGNAL_DIR/build.done" # Agent B: wait for signal (non-blocking check or polling loop) until [[ -f "$SIGNAL_DIR/build.done" ]]; do sleep 2; done BUILD_OUTPUT=$(jq -r '.output' "$SIGNAL_DIR/build.done") echo "Build done, running tests on $BUILD_OUTPUT" rm "$SIGNAL_DIR/build.done" # consume the signal ``` --- ## Approval Queue ```bash # Agent requests human or orchestrator approval before proceeding APPROVAL_DIR=".claude/approvals" mkdir -p "$APPROVAL_DIR" request_approval() { local id="$1" local action="$2" local risk="$3" local req_file="$APPROVAL_DIR/${id}.request" echo "{\"id\":\"$id\",\"action\":\"$action\",\"risk\":\"$risk\",\"ts\":\"$(date -Iseconds)\"}" \ > "$req_file" echo "Wait...

Details

Author
yanacuti1121
Repository
yanacuti1121/Yana-AI
Created
2 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category