← ClaudeAtlas

agent-messaging-patternslisted

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.
phamlongh230-lgtm/yamtam-engine · ★ 3 · AI & Automation · score 65
Install: claude install-skill phamlongh230-lgtm/yamtam-engine
## 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