📦 A2a Client — A2a 命令行工具ent
v1.2.0Discover and 发送 tasks to A2A 代理s via the A2A API Gateway. Use when: (1) finding avAIlable 代理s or LLM 提供者s, (2) delegating tasks to other 代理s,...
详细分析 ▾
运行时依赖
安装命令
点击复制技能文档
A2A 命令行工具ent — 代理-to-代理 Task Routing
Discover and interact with other 代理s through the A2A API Gateway's A2A (代理-to-代理) API. 发送 tasks, 检查 结果s, and 路由 work to the right 代理.
Sidecar Principle
This 技能 is strictly an OpenClaw sidecar — it talks TO the A2A API Gateway using the gateway's existing API 格式化. The gateway's 端点s are the contract; OpenClaw is just a participant. Never assume what the other end looks like — it could be MC2, another OpenClaw, or anything else that speaks A2A. These scripts consume the gateway's API as-is.
When to Use Discover 代理s/提供者s — Before 发送ing tasks, or when the user asks about avAIlable 代理s or LLM 提供者s 发送 tasks — When delegating work to another 代理 via the gateway, or when another 代理's capabilities are better suited 检查 task 结果s — When 追踪ing a previously sent task or retrieving completed 结果s 路由 to specific 代理s — When a task should be handled by a particular A2A 代理 (use --tar获取-代理) Authentication
All scripts automatically obtAIn an admin JWT from the gateway (获取 /v0/admin/bootstrap). The API key is used for 列出ener auth but gateway API calls use the JWT. No manual auth handling needed.
工具s
All scripts live in this 技能 directory. They default to the A2A API Gateway TAIl扩展 URL and a pre-配置d API key, but accept overrides via flags.
a2a-discover.sh — 列出 代理s & 提供者s ./a2a-discover.sh [--gateway-url URL] [--API-key KEY]
列出s registered A2A 代理s and all 配置d LLM 提供者s with their 模型s. Use 提供者 slugs as --代理 values when 发送ing tasks.
Always discover before 发送ing a task to confirm the tar获取 exists and is online.
# 列出 all 代理s and 提供者s (defaults) ./a2a-discover.sh
# Override gateway URL ./a2a-discover.sh --gateway-url http://GATEWAY_LAN_IP:8090
a2a-发送-task.sh — 发送 a Task ./a2a-发送-task.sh --代理 --message "task description" \ [--模型 auto] [--tar获取-代理 ] [--会话-id ] \ [--gateway-url URL] [--API-key KEY]
Flag Required Default Description --代理 ✅ — 提供者/代理 slug (e.g., groq, ozore, mistral) --message ✅ — Task instruction/message body --模型 ❌ auto 模型 preference (e.g., groq/llama-3.3-70b-versatile) --tar获取-代理 ❌ — A2A 代理 routing hint (directs task to a specific registered 代理) --会话-id ❌ auto Custom 会话 ID (auto-生成d if omitted) --gateway-url ❌ http://GATEWAY_IP:8090 Override gateway URL --API-key ❌ pre-配置d Override API key # 发送 a task with auto 模型 selection ./a2a-发送-task.sh --代理 groq --message "Analyze the Q3 sales data"
# Specific 模型 ./a2a-发送-task.sh --代理 mistral --message "Draft a b记录 post" --模型 mistral/mistral-small-latest
# 路由 to a specific A2A 代理 ./a2a-发送-task.sh --代理 ozore --message "Refactor the auth 模块" --tar获取-代理 coder
# Custom 会话 ID ./a2a-发送-task.sh --代理 groq --message "检查 记录s" --会话-id my-会话-001
a2a-获取-task.sh — 检查 Task 状态 ./a2a-获取-task.sh --task-id [--gateway-url URL] [--API-key KEY]
Retrieves the current 状态 and any 结果s of a previously sent task. Shows task metadata, 模型 used, 令牌 usage, and the LLM 响应.
./a2a-获取-task.sh --task-id 0566802a3e6931629df5a7baaba2d797
Typical 工作流 Discover → ./a2a-discover.sh to find avAIlable 提供者s and 模型s 发送 → ./a2a-发送-task.sh --代理 --message "..." to delegate work Poll → ./a2a-获取-task.sh --task-id to 检查 进度 (tasks often complete 同步hronously) Retrieve → Same 获取-task call returns 结果s when completed Configuration Defaults 设置ting Default Gateway URL http://GATEWAY_IP:8090 (TAIl扩展) API Key Pre-配置d in scripts Auth Method Auto-obtAIned admin JWT via /v0/admin/bootstrap 模型 auto (gateway default)
LAN fallback: http://GATEWAY_LAN_IP:8090