← 返回 Skills 市场
thebuddha5566

A2AP - Agent间通信协议

作者 thebuddha5566 · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
49
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install a2ap
功能描述
Agent-to-Agent Protocol — AI Agent间通信协议。可执行参考实现,四层架构(传输/发现/协商/执行)。CC BY-SA 4.0开放标准。
使用说明 (SKILL.md)

A2AP — Agent-to-Agent Protocol

不是白皮书,是代码。 Agent间通信的第一个开放协议标准。

四层架构

┌──────────────────────┐
│  L4  Execution       │  远程调用 + 重试 + 信任评分
├──────────────────────┤
│  L3  Negotiation     │  能力注册/发现/协商
├──────────────────────┤
│  L2  Discovery       │  UDP广播 + mDNS风格发现
├──────────────────────┤
│  L1  Transport       │  TCP + JSON + HMAC签名
└──────────────────────┘

快速开始

# Demo: 两个Agent互调
python cli.py demo

# 启动服务端
python cli.py serve 9800

# 发现网络上的Agent
python cli.py discover

# 调用远程Agent能力
python cli.py invoke 127.0.0.1 9800 add '{"a":3,"b":5}'

Python API

from a2ap import A2APServer, A2APClient

# Agent A — 提供服务
server = A2APServer(name="Hermes", port=9800, secret="shared_key")
server.register_capability(
    name="humanize",
    impl=lambda text="": f"Humanized: {text}",
    description="Humanize AI-written text",
    input_schema={"text": "string"},
    output_schema={"result": "string"}
)
server.serve(background=True)

# Agent B — 调用服务
client = A2APClient()
caps = client.query_capabilities("127.0.0.1", 9800)
print(caps)  # ['humanize']

result = client.invoke("127.0.0.1", 9800, "humanize", {"text": "hello"})
print(result)  # {'success': True, 'result': 'Humanized: hello'}

信任模型

  • HMAC-SHA256签名 — 每条消息带签名防止篡改
  • 信任评分trust_peer() / is_trusted() 白名单机制
  • 可选加密 — 传输层可叠加TLS

协议规范

完整协议规范:A2AP-whitepaper.md (CC BY-SA 4.0)

许可证

MIT — 代码 | CC BY-SA 4.0 — 协议规范

安全使用建议
Review before installing or using on any shared network. Treat it as an experimental reference implementation: run only on trusted hosts, prefer localhost binding, avoid sending sensitive data, use strong per-deployment secrets only after verifying authentication is actually enforced, and do not expose high-impact agent capabilities through it without an additional access-control layer.
能力评估
Purpose & Capability
The skill's purpose is agent-to-agent communication, so TCP serving, UDP discovery, and remote invocation fit the stated function; however, those capabilities can expose callable agent functions to other hosts.
Instruction Scope
The quick start tells users to run a server, discover peers, and invoke remote capabilities, but does not clearly warn that the server binds broadly, discovery broadcasts on the LAN, and invocations send data to another process or host.
Install Mechanism
The package contains only SKILL.md, two Python files, and requirements.txt; there is no installer, package download step, or external dependency declared.
Credentials
The implementation binds the TCP server to 0.0.0.0 and broadcasts discovery to 255.255.255.255 by default, which is broader than a safe local demo would need.
Persistence & Privilege
No persistence or privilege escalation was found, but the advertised HMAC trust model is not effectively enforced for incoming requests, and default empty secrets mean remote calls are effectively unauthenticated.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install a2ap
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /a2ap 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
全量自测37/37通过。服务端/客户端/握手/协商/信任/HMAC全验证。
v1.0.1
添加可执行参考实现:四层架构(传输/发现/协商/执行)+ Demo两Agent互调。
v1.0.0
Initial release of A2AP v0.1 - the TCP/IP for AI agents
元数据
Slug a2ap
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 3
常见问题

A2AP - Agent间通信协议 是什么?

Agent-to-Agent Protocol — AI Agent间通信协议。可执行参考实现,四层架构(传输/发现/协商/执行)。CC BY-SA 4.0开放标准。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 49 次。

如何安装 A2AP - Agent间通信协议?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install a2ap」即可一键安装,无需额外配置。

A2AP - Agent间通信协议 是免费的吗?

是的,A2AP - Agent间通信协议 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

A2AP - Agent间通信协议 支持哪些平台?

A2AP - Agent间通信协议 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 A2AP - Agent间通信协议?

由 thebuddha5566(@thebuddha5566)开发并维护,当前版本 v1.0.2。

💬 留言讨论