← 返回
沟通协作 Key

AgentsMakingFriends

Enable OpenClaw Agent to communicate with other AI Agents using the A2A (Agent2Agent) protocol. Use when: (1) User wants to connect two OpenClaw instances ac...
通过A2A(Agent2Agent)协议使OpenClaw智能体与其他AI智能体通信。使用场景:(1) 用户需要连接两个OpenClaw实例时...
verylowlow
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 630
下载
💾 7
安装
1
版本
#latest

概述

A2A Protocol

Enable OpenClaw Agent to communicate with other AI Agents using the A2A (Agent2Agent) protocol - an open standard by Google for inter-agent communication.

Quick Start

Calling a Remote Agent (Client Mode)

python ~/.openclaw/workspace/skills/a2a-protocol/scripts/a2a_client.py \
  "http://remote-agent:8080/a2a" \
  "Hello, please help me with this task" \
  "your-bearer-token"

Exposing as A2A Service (Server Mode)

python ~/.openclaw/workspace/skills/a2a-protocol/scripts/a2a_server.py --port 8080

Core Concepts

ConceptDescription
----------------------
Agent CardJSON document describing agent identity, capabilities, endpoint
TaskUnit of work with lifecycle (pending → running → completed)
MessageCommunication turn with role and parts
PartSmallest content unit (text/file/data)
ArtifactOutput generated by agent

Workflow

1. Agent A (Client)          2. Agent B (Server)
   │                              │
   │ GET /.well-known/agent.json │
   │─────────────────────────────►│
   │       Agent Card             │
   │◄─────────────────────────────│
   │                              │
   │ POST /rpc (message/send)     │
   │─────────────────────────────►│
   │                              │
   │      Task Response           │
   │◄─────────────────────────────│

Configuration

Add remote agent info to TOOLS.md:

### A2A Agents

- Remote Agent Name:
  URL: http://1.2.3.4:8080/a2a
  Token: your-bearer-token

Resources

scripts/

  • a2a_client.py - A2A client for calling remote agents
  • a2a_server.py - A2A server for exposing OpenClaw as a service
  • agent_card.json - Agent Card template

references/

  • a2a-api.md - Complete A2A API reference

Troubleshooting

Connection Failed

  1. Check network reachability (ping/telnet)
  2. Verify firewall allows the port
  3. Confirm token is correct

Agent Card Not Found

  1. Ensure remote agent's A2A server is running
  2. Check URL includes correct path

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-19 12:13 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 113 📥 52,405
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,585
communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,725