home / skills / omer-metin / skills-for-antigravity / agent-communication

agent-communication skill

/skills/agent-communication

This skill helps you implement robust inter-agent communication patterns by validating structured messages, reducing latency, and improving debuggability in

npx playbooks add skill omer-metin/skills-for-antigravity --skill agent-communication

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
2.0 KB
---
name: agent-communication
description: Inter-agent communication patterns including message passing, shared memory, blackboard systems, and event-driven architectures for LLM agentsUse when "agent communication, message passing, inter-agent, blackboard, agent events, multi-agent, communication, message-passing, events, coordination" mentioned. 
---

# Agent Communication

## Identity

You're a distributed systems engineer who has adapted message-passing patterns for LLM agents.
You understand that agent communication is fundamentally different from traditional IPC—agents
can hallucinate, misinterpret, and generate novel message formats.

You've learned that the key to reliable multi-agent systems is constrained, validated
communication. Agents that can say anything will eventually say something wrong.
Structure and validation catch errors before they propagate.

Your core principles:
1. Structured over natural language—validate messages against schemas
2. Minimize communication—every message costs tokens and latency
3. Fail fast—catch malformed messages immediately
4. Log everything—communication is where things go wrong
5. Design for replay—enable debugging and recovery


## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill codifies inter-agent communication patterns for LLM-based agents, covering message passing, shared memory, blackboard systems, and event-driven architectures. It focuses on building constrained, validated channels so agents exchange predictable, inspectable messages. The goal is reliable coordination with minimal token use and clear auditability.

How this skill works

The skill provides pattern-driven guidance for designing communication layers: structured message schemas, channel types (direct message, publish/subscribe, shared-state blackboard), and event semantics. It enforces validation and fail-fast checks so malformed or out-of-spec messages are rejected before propagation. It also prescribes logging and replay-friendly formats to support debugging and incident recovery.

When to use it

  • Designing multi-agent workflows for task delegation or orchestration
  • Implementing inter-agent coordination where hallucination or misinterpretation is a risk
  • Choosing between message passing, shared memory, or blackboard designs
  • Building event-driven pipelines that trigger agents on specific states
  • Auditing and debugging agent interactions or incident postmortems

Best practices

  • Prefer structured, schema-validated messages over free-form text to reduce misinterpretation
  • Minimize communication frequency and payload size to lower cost and latency
  • Implement fail-fast validation at sender and receiver boundaries to contain errors early
  • Log every message with metadata (origin, schema version, timestamp, signature) to enable replay and forensics
  • Adopt idempotent handlers and sequence IDs to make replay safe and predictable

Example use cases

  • Coordinator agent delegates subtasks to worker agents via validated request/response messages
  • Blackboard system where agents post intermediate findings to a shared store and subscribe to relevant updates
  • Event-driven architecture where state changes emit events that trigger specialized agents to act
  • Hybrid system using lightweight message passing for commands and a shared memory snapshot for large context transfers

FAQ

How do I prevent agents from inventing new message formats?

Use strict schema validation at both ends and reject or quarantine messages that don’t match expected schemas. Version schemas and enforce encoding rules so new formats require an explicit, auditable rollout.

When should I use a blackboard vs. direct message passing?

Use direct message passing for targeted commands and low-latency interactions. Use a blackboard when many agents need to read/write shared context or when decoupling producers and consumers simplifies coordination.