Lesson 4 of 6·10 min read

Tracking Cross-Agent Communication

In multi-agent systems, communication between agents is often the biggest black box. OpenClaw makes this communication fully transparent — from message flows to latency measurements to data flow audits.

Message Flow Visualization

Sequence Diagram View

OpenClaw automatically generates sequence diagrams for each multi-agent trace:

User          Orchestrator    Research       Writing        Review
  │                │              │              │              │
  │─── Request ──→│              │              │              │
  │                │── Query ───→│              │              │
  │                │              │── Search ──→│(external)    │
  │                │              │←─ Results ──│              │
  │                │←─ Summary ──│              │              │
  │                │              │              │              │
  │                │── Write ────────────────→│              │
  │                │              │              │── Draft ───→│
  │                │              │              │←─ Feedback ─│
  │                │              │              │── Final ───→│
  │                │←─────────────────────────── Approved ───│
  │←── Response ──│              │              │              │

Timeline View

The timeline view shows parallel and sequential agent activities:

0ms      1000ms    2000ms    3000ms    4000ms    5000ms
├─────────┼─────────┼─────────┼─────────┼─────────┤
Orchestrator ████                                  ████
Research        ████████████
Writing                       ██████████████
Review                                      ████████

Inter-Agent Latency

OpenClaw measures communication latency between agents:

Communication PathAvg. LatencyP95 LatencyPayload
Orchestrator → Research12ms45ms0.8 KB
Research → Orchestrator8ms22ms4.2 KB
Orchestrator → Writing15ms52ms5.1 KB
Writing → Review10ms38ms3.8 KB
Review → Orchestrator6ms18ms0.4 KB

Latency Optimization

OpenClaw detects optimization potential:

Optimization detected: Payload compression
──────────────────────────────────────────
Path:        Orchestrator → Writing Agent
Current:     5.1 KB avg. payload (full research results)
Problem:     Writing Agent uses only 30% of passed data
Recommendation: Relevance filter before handoff (top 3 instead of all results)
Impact:      Payload -70%, latency -8ms, token costs -EUR 120/month

Data Flow Audit

For compliance and security, OpenClaw tracks data flow between agents:

Data Flow Classification

data_flow_audit:
  classification:
    - category: public
      description: "Publicly accessible information"
      agents: [research, writing]

    - category: internal
      description: "Internal company data"
      agents: [knowledge-base, reporting]

    - category: confidential
      description: "Confidential customer data"
      agents: [customer-lookup, billing]
      restrictions:
        - no_external_transmission
        - encrypt_in_transit
        - log_all_access

    - category: restricted
      description: "Highly sensitive data (PII, financial data)"
      agents: [hr-agent, finance-agent]
      restrictions:
        - no_cross_agent_sharing
        - immediate_pseudonymization
        - approval_required

Data Flow Graph

OpenClaw visualizes which data categories flow between agents:

Research Agent ──[public]──→ Orchestrator ──[internal]──→ Writing Agent
                                │
                                │──[confidential]──→ Customer Agent
                                │
                                └──[restricted]──✕ (blocked by policy)

Automatic alerts when:

  • Confidential data flows to an unauthorized agent
  • PII is passed between agents without pseudonymization
  • Data classification changes during processing

Communication Pattern Analysis

OpenClaw analyzes communication patterns over time:

Healthy Patterns

  • Hub-and-spoke — Orchestrator as central coordinator
  • Pipeline — Sequential processing (A → B → C)
  • Parallel fan-out — Simultaneous delegation to multiple agents

Problematic Patterns

  • Ping-pong — Two agents repeatedly send messages to each other (potential loop)
  • Star topology — Every agent communicates with every other (too high coupling)
  • Dead letter — Messages sent but never processed
  • Cascade failure — One agent failure propagates through the entire system
Pattern Detected: Ping-pong between Writing and Review Agent
────────────────────────────────────────────────────────────
Frequency: 12x in last 24h
Avg. iterations: 4.2 (normal: 1–2)
Cause: Review Agent gives unclear feedback → Writing Agent corrects incorrectly → Review rejects again
Recommendation: Introduce feedback template for Review Agent (structured instead of free text)

Best Practice: Define an expected communication pattern for each multi-agent system. OpenClaw automatically warns you when the actual pattern deviates — this is often the first indication of emergent misbehavior.