šŸŽ Get the FREE AI Skills Starter Guide — Subscribe →
BytesAgainBytesAgain
šŸ¦€ ClawHub

A2A Chatting

by @saullockyip

Enable communication, coordination, and information exchange between OpenClaw agents through controlled multi-agent chat sessions.

Versionv0.4.0
Downloads1,091
TERMINAL
clawhub install a2a-chatting

šŸ“– About This Skill


name: A2A Chatting description: Manage A2A sessions with other OpenClaw agents. Use when: (1) User asks you to talk to another agent, (2) You need to query another agent's capabilities or get information from them, (3) You need to coordinate with another agent, (4) User wants agent-to-agent communication. version: 0.4.0

A2A Chatting

Manage sessions with other OpenClaw agents. Messaging is done via the built-in sessions_send tool, not via the CLI. This CLI only handles session lifecycle (create, list, view, delete).

Message Format (Required)

When sending A2A messages via sessions_send, you must use this exact format:

[From: ] [fromAgentId: ] [reply-to: ] 

For notifications (no reply needed):

[From: ] [fromAgentId: ] [DO NOT REPLY] 

Example — ask Anna to do something:

[From: Lewis] [fromAgentId: echi-ceo] [reply-to: ] ę—©äøŠå„½ļ¼ŒčÆ·ę›“ę–°ęœ¬å‘Øé”€å”®ęŠ„å‘Šć€‚

Example — notify Victor (no reply needed):

[From: Lewis] [fromAgentId: echi-ceo] [DO NOT REPLY] ä¼šč®®å·²å»¶ęœŸåˆ°äø‹åˆ3点。

Fields explained:

  • From — Human-readable name of the sender
  • fromAgentId — The agent ID (e.g. echi-ceo, echitech-sales-manager-victor)
  • reply-to — Your own sourceSession (so the receiver knows where to route replies)
  • DO NOT REPLY — Use when no response is needed (fire-and-forget)
  • Prerequisites

    Configure the OpenClaw directory:

    a2a-chatting.sh config 
    

    Example: a2a-chatting.sh config /Users/roco/.openclaw

    CLI Commands

    | Command | Description | |---------|-------------| | config [--force] | Configure OpenClaw directory | | get-agents | List all available agents with their IDs | | new-session | Create a new A2A session with an agent | | list-sessions | List all A2A sessions | | get-session | Show session info | | delete-session | Delete a session |

    Workflow

    Step 1: Create a Session

    # Use the CLI to create a session with the target agent
    a2a-chatting.sh new-session  "Discuss project structure"
    

    Returns: Session ID (e.g. 30d53db1-d1fd-41d8-a7f3-8373aa58a840)

    Step 2: Send Message (via sessions_send)

    # Use sessions_send tool with the format above:
    sessions_send(
      sessionKey: "",
      message: "[From: Lewis] [fromAgentId: echi-ceo] [reply-to: ] ę—©äøŠå„½ļ¼ŒčÆ·ę›“ę–°ęœ¬å‘Øé”€å”®ęŠ„å‘Šć€‚"
    )
    

    Step 3: Receive Reply

    The receiver's reply automatically routes back to your session via sessions_send source tracking.

    Tips

  • Session Reuse: Reuse existing sessions for ongoing conversations — agents maintain context
  • Topic Naming: Use descriptive topics so you can find sessions later with list-sessions
  • Format Strictly: Always use the [From: ...] format — it identifies you in multi-agent conversations
  • reply-to vs DO NOT REPLY: Only use reply-to when you need a response. Use DO NOT REPLY for notifications.
  • Examples

    Create session with Anna

    a2a-chatting.sh new-session echitech-marketing-manager-anna "Marketing sync"
    

    → Session ID: db4aaf45-dd47-4766-87d0-0c2f690e8797

    Send a task request

    sessions_send(
      sessionKey: "agent:echitech-marketing-manager-anna:main",
      message: "[From: Lewis] [fromAgentId: echi-ceo] [reply-to: ] čÆ·ę›“ę–°ęœ¬å‘Øč„é”€č®”åˆ’ć€‚"
    )
    

    Send a notification (no reply)

    sessions_send(
      sessionKey: "agent:echitech-sales-manager-victor:main",
      message: "[From: Lewis] [fromAgentId: echi-ceo] [DO NOT REPLY] 今Ꙛ8ē‚¹ęœ‰å…Øå‘˜ä¼šč®®ļ¼ŒčÆ·å‡†ę—¶å‚åŠ ć€‚"
    )
    

    Storage

    Session index: /a2a-sessions/sessions.jsonl

    šŸ’” Examples

    Create session with Anna

    a2a-chatting.sh new-session echitech-marketing-manager-anna "Marketing sync"
    

    → Session ID: db4aaf45-dd47-4766-87d0-0c2f690e8797

    Send a task request

    sessions_send(
      sessionKey: "agent:echitech-marketing-manager-anna:main",
      message: "[From: Lewis] [fromAgentId: echi-ceo] [reply-to: ] čÆ·ę›“ę–°ęœ¬å‘Øč„é”€č®”åˆ’ć€‚"
    )
    

    Send a notification (no reply)

    sessions_send(
      sessionKey: "agent:echitech-sales-manager-victor:main",
      message: "[From: Lewis] [fromAgentId: echi-ceo] [DO NOT REPLY] 今Ꙛ8ē‚¹ęœ‰å…Øå‘˜ä¼šč®®ļ¼ŒčÆ·å‡†ę—¶å‚åŠ ć€‚"
    )
    

    āš™ļø Configuration

    Configure the OpenClaw directory:

    a2a-chatting.sh config 
    

    Example: a2a-chatting.sh config /Users/roco/.openclaw

    šŸ“‹ Tips & Best Practices

  • Session Reuse: Reuse existing sessions for ongoing conversations — agents maintain context
  • Topic Naming: Use descriptive topics so you can find sessions later with list-sessions
  • Format Strictly: Always use the [From: ...] format — it identifies you in multi-agent conversations
  • reply-to vs DO NOT REPLY: Only use reply-to when you need a response. Use DO NOT REPLY for notifications.