← Back to Skills Marketplace
A2AP - Agent间通信协议
by
thebuddha5566
· GitHub ↗
· v1.0.2
· MIT-0
49
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install a2ap
Description
Agent-to-Agent Protocol — AI Agent间通信协议。可执行参考实现,四层架构(传输/发现/协商/执行)。CC BY-SA 4.0开放标准。
README (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 — 协议规范
Usage Guidance
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install a2ap - After installation, invoke the skill by name or use
/a2ap - Provide required inputs per the skill's parameter spec and get structured output
Version History
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
Metadata
Frequently Asked Questions
What is A2AP - Agent间通信协议?
Agent-to-Agent Protocol — AI Agent间通信协议。可执行参考实现,四层架构(传输/发现/协商/执行)。CC BY-SA 4.0开放标准。 It is an AI Agent Skill for Claude Code / OpenClaw, with 49 downloads so far.
How do I install A2AP - Agent间通信协议?
Run "/install a2ap" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is A2AP - Agent间通信协议 free?
Yes, A2AP - Agent间通信协议 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does A2AP - Agent间通信协议 support?
A2AP - Agent间通信协议 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created A2AP - Agent间通信协议?
It is built and maintained by thebuddha5566 (@thebuddha5566); the current version is v1.0.2.
More Skills