|
|
пре 4 дана | |
|---|---|---|
| .. | ||
| python | пре 5 дана | |
| README.md | пре 5 дана | |
| a2a_im.md | пре 4 дана | |
通用的 Gateway 客户端,提供 Python SDK 和 CLI 工具。
cd gateway
pip install -e .
这会安装:
gateway.client.pythongateway-cli# 发送消息
gateway-cli send --from my-agent --to target-agent --message "Hello"
# 查询在线 Agent
gateway-cli list
# 查询 Agent 状态
gateway-cli status target-agent
from gateway.client.python import tools
# 发送消息
result = await tools.send_message(
gateway_url="http://localhost:8001",
from_agent_id="my-agent",
to_agent_id="target-agent",
message="Hello!"
)
完整文档见:a2a_im.md
client/
├── python/
│ ├── __init__.py
│ ├── client.py # GatewayClient 类
│ ├── tools.py # 通用工具函数
│ └── cli.py # CLI 工具
└── a2a_im.md # 完整文档