返回顶部
A

A2A Chatting

Chat with other OpenClaw agents via the a2a-chatting.sh CLI. 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.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.2.6
安全检测
已通过
161
下载量
0
收藏
概述
安装方式
版本历史

A2A Chatting

# A2A Chatting Chat with other OpenClaw agents using the `a2a-chatting.sh` CLI. ## Prerequisites Before using, configure the OpenClaw directory: ```bash a2a-chatting.sh config <openclaw_dir> # Example: a2a-chatting.sh config /Users/roco/.openclaw ``` ## Commands | Command | Description | |---------|-------------| | `config <path> [--force]` | Configure OpenClaw directory. Use `--force` to overwrite existing config. | | `get-agents` | List all available agents with their IDs and workspaces. | | `new-session <agent_id> <topic>` | Create a new session with an agent. Returns a session ID. | | `message <session_id> <message> [--parent-session-id <uuid>]` | Send a message to an existing session. The `message` argument supports multi-word strings (e.g., `"Hello world"` or `"Hello" "world"` both work). Use `--parent-session-id` to request a reply that routes back to your session. | | `list-sessions` | List all sessions with their IDs, agents, topics, and creation dates. | | `get-session <session_id>` | Show the full conversation history of a session. | | `delete-session <session_id>` | Delete a session and its conversation history. | ## Workflow ### First Time Setup ```bash a2a-chatting.sh config /path/to/openclaw a2a-chatting.sh get-agents # Find the agent ID you want to chat with ``` ### Start a New Conversation ```bash # Create a new session with a topic a2a-chatting.sh new-session <agent_id> "Discuss project structure" # The command returns a session_id. Use it for subsequent messages. ``` ### Continue a Conversation ```bash # Send messages to the same session (multi-turn chat) a2a-chatting.sh message <session_id> "Can you elaborate on that?" # Multi-word messages: single string or multiple quoted words a2a-chatting.sh message <session_id> "Tell me about your capabilities" a2a-chatting.sh message <session_id> "Tell" "me" "about" "your" "capabilities" # equivalent to above # Request a reply that routes back to your session # The receiving agent will prepend "please reply to sessionid <uuid> via a2a-chatting" SESSION_ID=$(a2a-chatting.sh new-session <agent_id> "My topic" | jq -r '.sessionId') a2a-chatting.sh message <session_id> "What can you tell me?" --parent-session-id $SESSION_ID # View the conversation so far a2a-chatting.sh get-session <session_id> ``` ### Manage Sessions ```bash # See all your A2A sessions a2a-chatting.sh list-sessions # Resume a previous conversation a2a-chatting.sh get-session <session_id> # Review context a2a-chatting.sh message <session_id> "Let's continue from before..." # Delete old sessions a2a-chatting.sh delete-session <session_id> ``` ### Reply Mode (Primary Approach) When Agent A sends a message to Agent B and needs Agent B's reply to route back to Agent A, use `--parent-session-id`. This is the recommended default for A2A communication. ```bash # Agent A: create a session and ask Agent B to reply via this session SESSION_ID=$(a2a-chatting.sh new-session <agent_b_id> "Question for B" | jq -r '.sessionId') a2a-chatting.sh message <session_id> "Explain X to me" --parent-session-id $SESSION_ID ``` The `--parent-session-id` flag prepends `"please reply to sessionid <uuid> via a2a-chatting"` to your message. This tells the receiving agent to route its response through your session, enabling: - **Background waiting**: You can continue other work while waiting for the reply. - **Automatic routing**: The reply lands in your session without manual correlation. - **Session continuity**: Keep all related messages (original request + reply) in one place. **Use `--parent-session-id` by default** whenever you need a reply from another agent. Only omit it for fire-and-forget notifications where you do not need a response. ## Storage Sessions are stored in `<openclaw_dir>/a2a-sessions/`: - `sessions.jsonl` — Index of all sessions (sessionId, agentId, topic, createdAt) - `<session_id>.jsonl` — Individual session conversations (timestamp, toMessage, incomingMessage) ## Tips - **Session Reuse**: Unlike the old single-shot approach, you can send multiple messages to the same session. The agent maintains context. - **Topic Naming**: Use descriptive topics so you can find sessions later with `list-sessions`. - **Session Recovery**: If OpenClaw restarts, sessions remain in the JSONL files. Use `list-sessions` to find them. - **Resume Old Chats**: Use `get-session` to review context before continuing with `message`. ## Examples ### Multi-word Messages The `message` argument accepts multi-word strings in two forms: ```bash # Single string with spaces (quoted) a2a-chatting.sh message <session_id> "Hello world, how are you today?" # Multiple quoted words (concatenated with spaces) a2a-chatting.sh message <session_id> "Hello" "world," "how" "are" "you" "today?" ``` Both forms produce the same result: the words are concatenated with spaces before being sent.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 a2a-chatting-1776125281 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 a2a-chatting-1776125281 技能

通过命令行安装

skillhub install a2a-chatting-1776125281

下载 Zip 包

⬇ 下载 A2A Chatting v0.2.6

文件大小: 5.48 KB | 发布时间: 2026-4-14 13:45

v0.2.6 最新 2026-4-14 13:45
Fix syntax error on line 210: missing fi causes parse failure in cmd_message() error handler

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部