← 返回
AI智能 Key 中文

A2a Protocol

Agent2Agent (A2A) Protocol implementation - communicate with other AI agents
Agent2Agent (A2A) 协议实现 - 与其他AI代理通信
nantes
AI智能 clawhub v1.0.1 1 版本 99918.4 Key: 需要
★ 0
Stars
📥 1,225
下载
💾 23
安装
1
版本
#a2a#agent#communication#latest

概述

A2A Protocol Skill

Implementation of the Agent2Agent (A2A) Protocol for inter-agent communication.

What it does

  • Agent Discovery via Agent Cards
  • Send Messages to remote agents
  • Task Management (submit, check status, get results)
  • Streaming via Server-Sent Events (SSE)
  • Authentication support (API keys, Bearer tokens)

Installation

# Install Python dependencies
pip install requests sseclient-py

Usage

Register Your Agent

.\a2a.ps1 -Action register -Name "MyAgent" -Description "Research agent" -Capabilities "research,analysis" -Endpoint "https://my-agent.com/a2a"

Get Agent Card

.\a2a.ps1 -Action card -AgentId "uuid-of-agent"

Send Message

.\a2a.ps1 -Action send -ToAgent "target-agent-uuid" -Content "Hello agent!"

Submit Task

.\a2a.ps1 -Action task -ToAgent "target-agent-uuid" -Task "Research quantum computing"

Check Task Status

.\a2a.ps1 -Action status -TaskId "task-uuid"

List Remote Agents

.\a2a.ps1 -Action list -RegistryUrl "https://registry.agentlink.io"

A2A Concepts

  • Agent Card: JSON describing agent capabilities (name, endpoint, methods)
  • Client Agent: Agent that sends tasks
  • Remote Agent: Agent that receives and processes tasks
  • Task: Work request with ID, status, and result
  • Message: Direct communication between agents

API Reference

POST /a2a/agents/register - Register agent
GET  /a2a/agents/{id}    - Get agent info
GET  /a2a/agents/{id}/card - Get Agent Card
POST /a2a/messages       - Send message
POST /a2a/tasks          - Submit task
GET  /a2a/tasks/{id}     - Get task status
GET  /a2a/tasks/{id}/result - Get task result

Examples

Python Usage

from a2a import A2AClient

client = A2AClient("https://remote-agent.com/a2a", api_key="your-key")

# Send message
client.send_message("target-agent-id", "Hello!")

# Submit task
task_id = client.submit_task("target-agent-id", "Do X")
result = client.get_result(task_id)

Requirements

  • Python 3.8+
  • requests library
  • sseclient-py (for streaming)

License

MIT

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 09:24 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,362 📥 318,963
ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 714 📥 244,100
ai-intelligence

self-improving agent

pskoett
捕获经验教训、错误和纠正,以实现持续改进。使用时机:(1)命令或操作意外失败;(2)用户纠正……
★ 4,061 📥 799,434