使用 A2A Protocol Validator验证域名是否支持 A2A Protocol
MILO•
Share根据A2A Protocol 博客,我们了解了 A2A Protocol 的基本概念,以及如何使用 A2A Protocol Python SDK 进行开发。
本文将介绍如何使用 A2A Protocol Validator 验证 A2A Protocol, 以及 AgentCard 可视化,方便调试:
- 验证给定域名是否支持 A2A Protocol
- 可视化 AgentCard
对于已经公开部署的 A2A Agent,可以直接输入域名进行验证。
本地运行的 A2A Agent 如何验证?
- 准备 Agent
git clone https://github.com/sing1ee/a2a-python-currency.git
cd a2a-python-currency
uv run python main.py
输出:
Installed 27 packages in 33ms
INFO: Started server process [61455]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:10000 (Press CTRL+C to quit)
这样,本地已经运行了 Currency Agent,访问端口是 10000.
- 映射本地的 Agent 服务-使用 Cloudflare Zero Trust 参考文档进行安装,我的环境是 Mac
brew install cloudflared
- 启动 Zero Trust 代理
cloudflared tunnel --url localhost:10000
输出:
+--------------------------------------------------------------------------------------------+
2025-06-03T09:03:02Z INF | Your quick Tunnel has been created! Visit it at (it may take some time to be reachable): |
2025-06-03T09:03:02Z INF | https://sheriff-honor-undefined-relate.trycloudflare.com |
2025-06-03T09:03:02Z INF +--------------------------------------------------------------------------------------------+
https://sheriff-honor-undefined-relate.trycloudflare.com 就是临时的域名,可以访问我们本地的 Agent 服务。
打开 A2A Protocol Validator
打开 A2A Protocol Validator,输入上述域名,即可验证域名是否支持 A2A Protocol。
经过这样的步骤就可以快速的进行调试了,后续我们会推出A2A在线客户端,使得执行更加方便。