AI 研究助理

基于站内最新资料,回答 AI 前沿问题

回答带出处引用,支持多轮追问,当前页面内容会作为上下文

快速响应
AI 前沿跟踪
今日首页重点内容GitHub 趋势榜
领域
学术研究
大模型
具身智能
AI 基础设施
智能体 · Skill · MCP
机器人
多模态
自动驾驶
数据 / MLOps
AI 硬件
安全对齐
综述与报告
论文智能体 · Skill · MCPMCPA2A握手开销基准测试

The Cost of Saying Hello: An Empirical Study of Handshake Overhead in AI Agent Communication Protocols

查看原文(PDF)
AI 解读已生成 · AI 生成,数字以原文为准
AI 全文总结值得深入基于论文全文 4.6 万字 · 完整阅读

首次实测三协议握手:legacy MCP 50 ms RTT 下 230 ms,比 A2A 61.0 ms 慢 3.8×。

针对AI代理通信握手开销尚无实测,本文用官方SDK对 MCP(legacy与现代2026修订)、A2A、ACP在冷启动、热重复、能力不匹配和降级元数据等场景下逐请求测量往返次数、分阶段延迟、线上字节与token成本(回环与仿真50ms RTT,每组多次运行)。结果显示往返次数主导成本:50ms RTT下legacy MCP冷启动中位数 230ms,而A2A仅 61.0ms;当LLM读取对手方元数据时,成本随能力清单线性增长,200能力对手方占上下文窗口11%。热重复中legacy MCP全量重跑,A2A/ACP和现代MCP可缓存至免往返;版本校验只有MCP在握手期执行,A2A将校验推迟到任务消息。作者据此建议将元数据视为可缓存资产、按往返预算设计发现、为LLM精简能力清单;局限是仅测匿名单对手方且未包含Agora式自然语言协商。

  1. 1握手成本主导项是往返数,不是 payload 或计算
  2. 2MCP 2026 修订把冷启动 3 RT 降到 2,暖重连可 0 RT
  3. 3每能力 token 成本 24–107,200 能力 MCP 15,618 tokens

为什么重要 给 MCP/A2A 集成与多智能体编排的读者直接提供往返数、缓存策略和 token 斜率,可按此估算握手成本。适合 做 MCP/A2A 集成、多智能体编排和 agent 协议选型的工程师与研究者。

来源
arxiv.org
发布
2026/10/23

中文(AI 翻译)

每次 AI agent 之间的交互都以握手开始:发起 agent 必须定位其对方、了解对方能做什么,并在发送第一条有用消息之前建立会话。对 agent 通信协议的综述将握手开销列为一项效率准则,但没有任何综述报告测量结果。

本文提出了首个经验性的、按阶段分解的基准,测试三种主要 agent 协议中的握手:MCP(涵盖其 2025 initialize 和 2026 discover 两个时期)、A2A 和 ACP。使用每种协议的官方 SDK,我们对每次请求的往返次数、各阶段延迟、线上字节数和令牌成本进行插桩,覆盖冷启动、热重复、能力不匹配和元数据降级场景(每个单元 N=50,在回环和模拟 50 ms RTT 下)。

往返次数主导握手成本。在 50 ms RTT 下,legacy MCP 握手需要 3 次往返和 230 ms;A2A 需要 1 次往返和 61.0 ms。

往返次数并不是全部成本:当 LLM 读取对方的元数据时,握手成本随对方能力库存扩展,每个能力消耗 24-107 个 token,因此一个 200 个能力的对方在 agent 读取自身任务之前就占用 200k token 上下文窗口的 11%。

MCP 自身的 2026 修订版将握手从 3 次往返减少到 2 次,并且在 era pinning 下,在热重连时进一步减少到 0 次;这一协议演变证实了我们测得的成本。我们在 https://github.com/pvarshh/handshake-benchmark 发布了完整测试工具、原始数据和分析。

原文

Every interaction between AI agents begins with a handshake: the initiating agent must locate its counterpart, learn what it can do, and establish a session before the first useful message can be sent.

Surveys of agent communication protocols name handshake overhead as an efficiency criterion, yet none report measurements.

This paper presents the first empirical, phase-decomposed benchmark of the handshake in three major agent protocols: MCP (in both its 2025 initialize and 2026 discover eras), A2A, and ACP.

Using each protocol's official SDK, we instrument every request for round trips, per-phase latency, wire bytes, and token cost across cold-start, warm-repeat, capability-mismatch, and degraded-metadata scenarios (N=50 per cell, on loopback and under an emulated 50 ms RTT).

Round-trip count dominates handshake cost. A legacy MCP handshake takes three round trips and 230 ms at 50 ms RTT; A2A needs one round trip and 61.0 ms.

Round trips are not the whole bill: when an LLM reads the counterpart's metadata, handshake cost scales with the counterpart's capability inventory at 24-107 tokens per capability, so a 200-capability counterpart spends 11% of a 200k-token context window before the agent reads its own task.

MCP's own 2026 revision cuts its handshake from three round trips to two and, with era pinning, to zero on warm reconnects, protocol evolution that corroborates the cost we measure.

We release the full harness, raw data, and analysis at https://github.com/pvarshh/handshake-benchmark.

230ms

MCP legacy

122ms

MCP modern

61.0ms

A2A

62.1ms

ACP

注释 · 中位数,N=50;50 ms RTT 由每向 25 ms 延迟模拟。出自 表 2 S1

  • MCP legacy
    3 RT
  • MCP modern
    2 RT
  • A2A
    1 RT
  • ACP
    1 RT

注释 · 往返数是握手成本的主导项,payload、计算次要。出自 表 2 S1 / 图 1

mcp SDK
2.0.0
a2a-sdk
1.1.2
acp-sdk
1.0.3
Python
3.12.13
httpx
0.28.1
环境
macOS Darwin 25.5.0 arm64

深度总结

1 / 7
N=50
实验设置与固定版本· 参数清单

N=50 每格、50 ms RTT 与官方 SDK 固定版本让跨协议对照可直接引用。

N/格
50
RTT模拟
25 ms/向,共 50 ms
网络条件
loopback + 50 ms RTT
token价格
$3.00 / 1M input tokens
tokenizer
o200k_base
硬件
macOS arm64 loopback
Python
3.12.13
mcp SDK
2.0.0
a2a-sdk
1.1.2
acp-sdk
1.0.3

注释 · 统计用中位数/p95,bootstrap 2000 次重采样,median CI 半宽最大 2.0 ms。出自 §4.3–§4.4