← 返回
未分类 中文

A2A Chatting

Enable communication, coordination, and information exchange between OpenClaw agents through controlled multi-agent chat sessions.
通过受控的多智能体聊天会话,实现OpenClaw智能体之间的通信、协作和信息交换。
saullockyip saullockyip 来源
未分类 clawhub v0.4.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 592
下载
💾 1
安装
1
版本
#latest

概述

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: <name>] [fromAgentId: <agentId>] [reply-to: <sourceSession>] <message>

For notifications (no reply needed):

[From: <name>] [fromAgentId: <agentId>] [DO NOT REPLY] <message>

Example — ask Anna to do something:

[From: Lewis] [fromAgentId: echi-ceo] [reply-to: <your sessionId>] 早上好,请更新本周销售报告。

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 <openclaw_dir>
# Example: a2a-chatting.sh config /Users/roco/.openclaw

CLI Commands

CommandDescription
----------------------
config [--force]Configure OpenClaw directory
get-agentsList all available agents with their IDs
new-session Create a new A2A session with an agent
list-sessionsList 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 <agent_id> "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: "<target agent session>",
  message: "[From: Lewis] [fromAgentId: echi-ceo] [reply-to: <sourceSession>] 早上好,请更新本周销售报告。"
)

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: <sourceSession>] 请更新本周营销计划。"
)

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

版本历史

共 1 个版本

  • v0.4.0 当前
    2026-05-01 12:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,145 📥 918,853
ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 859 📥 336,985
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,429 📥 327,037