Lattice Hub 文档
HTTP OpenAPIAI Registry

A2A Registry

A2A Agent / Skill 注册发现。

A2A Agent / Skill 注册发现。

默认 Base URL:http://127.0.0.1:8090。管理面接口需 Authorization(登录返回的 token)。

A2A Registry

A2A Agent / Skill 注册发现;控制面不提供数据面代理。

GET/ai/a2a/v1/agents需要鉴权

列出 A2A Agent

查询 Agent Registry。

  • Authorizationheader · string必填

    登录返回的 token。

  • namequery · string可选

    按名称过滤。

  • namespacequery · string可选

    命名空间。

  • businessquery · string可选

    业务。

  • departmentquery · string可选

    部门。

  • protocol_bindingquery · string可选

    协议绑定。

  • skill_tagquery · string可选

    技能标签。

  • backend_typequery · string可选

    后端类型。

  • backend_service_namespacequery · string可选

    后端服务命名空间。

  • backend_service_namequery · string可选

    后端服务名。

  • streamingquery · bool可选

    是否流式。

  • push_notificationsquery · bool可选

    是否推送通知。

  • offsetquery · uint32可选

    分页偏移。

  • limitquery · uint32可选

    分页大小。

请求示例
curl -sS 'http://127.0.0.1:8090/ai/a2a/v1/agents' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "agents": [{ "name": "support-agent" }]
}
POST/ai/a2a/v1/agents需要鉴权

创建 A2A Agent

创建 Agent;body 字段以运行时为准。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · A2AAgent[]必填

    请求体为 A2AAgent 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    Agent ID。

  • namebody · string必填

    Agent 名称。

  • namespacebody · string必填

    命名空间。

  • visibilitybody · string可选

    可见性。

  • descriptionbody · string可选

    描述。

  • versionbody · string可选

    Agent 版本。

  • protocol_versionbody · string可选

    协议版本。

  • provider_organizationbody · string可选

    提供方组织。

  • provider_urlbody · string可选

    提供方 URL。

  • documentation_urlbody · string可选

    文档 URL。

  • icon_urlbody · string可选

    图标 URL。

  • businessbody · string可选

    业务。

  • departmentbody · string可选

    部门。

  • backend_typebody · string可选

    后端类型:service / address。

  • backend_service_namespacebody · string可选

    backend_type=service 时的服务命名空间。

  • backend_service_namebody · string可选

    backend_type=service 时的服务名。

  • backend_addressbody · string可选

    backend_type=address 时的地址。

  • preferred_interface_urlbody · string可选

    首选接口 URL。

  • preferred_protocol_bindingbody · string可选

    首选协议绑定。

  • preferred_protocol_versionbody · string可选

    首选协议版本。

  • streamingbody · bool可选

    是否支持流式。

  • push_notificationsbody · bool可选

    是否支持推送通知。

  • extended_agent_cardbody · bool可选

    是否扩展 Agent Card。

  • raw_card_jsonbody · string可选

    原始 Agent Card JSON。

  • source_typebody · string可选

    来源类型。

  • source_urlbody · string可选

    来源 URL。

  • metadatabody · map<string,string>可选

    元数据。

  • interfacesbody · A2AAgentInterface[]可选

    接口列表。

    • idbody · string可选

      接口 ID。

    • agent_idbody · string可选

      所属 Agent ID。

    • urlbody · string可选

      接口 URL。

    • protocol_bindingbody · string可选

      协议绑定。

    • protocol_versionbody · string可选

      协议版本。

  • skillsbody · A2AAgentSkill[]可选

    技能列表。

    • idbody · string可选

      记录 ID。

    • agent_idbody · string可选

      所属 Agent ID。

    • skill_idbody · string可选

      技能 ID。

    • namebody · string可选

      技能名称。

    • descriptionbody · string可选

      描述。

    • tagsbody · string[]可选

      标签。

    • examplesbody · string[]可选

      示例。

    • input_modesbody · string[]可选

      输入模式。

    • output_modesbody · string[]可选

      输出模式。

    • security_requirements_jsonbody · string可选

      安全要求 JSON。

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • a2AAgentbody · A2AAgent可选

    返回中的 A2AAgent 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      Agent ID。

    • namebody · string可选

      Agent 名称。

    • namespacebody · string可选

      命名空间。

    • visibilitybody · string可选

      可见性。

    • descriptionbody · string可选

      描述。

    • versionbody · string可选

      Agent 版本。

    • protocol_versionbody · string可选

      协议版本。

    • provider_organizationbody · string可选

      提供方组织。

    • provider_urlbody · string可选

      提供方 URL。

    • documentation_urlbody · string可选

      文档 URL。

    • icon_urlbody · string可选

      图标 URL。

    • businessbody · string可选

      业务。

    • departmentbody · string可选

      部门。

    • backend_typebody · string可选

      后端类型:service / address。

    • backend_service_namespacebody · string可选

      backend_type=service 时的服务命名空间。

    • backend_service_namebody · string可选

      backend_type=service 时的服务名。

    • backend_addressbody · string可选

      backend_type=address 时的地址。

    • preferred_interface_urlbody · string可选

      首选接口 URL。

    • preferred_protocol_bindingbody · string可选

      首选协议绑定。

    • preferred_protocol_versionbody · string可选

      首选协议版本。

    • streamingbody · bool可选

      是否支持流式。

    • push_notificationsbody · bool可选

      是否支持推送通知。

    • extended_agent_cardbody · bool可选

      是否扩展 Agent Card。

    • raw_card_jsonbody · string可选

      原始 Agent Card JSON。

    • source_typebody · string可选

      来源类型。

    • source_urlbody · string可选

      来源 URL。

    • metadatabody · map<string,string>可选

      元数据。

    • interfacesbody · A2AAgentInterface[]可选

      接口列表。

      • idbody · string可选

        接口 ID。

      • agent_idbody · string可选

        所属 Agent ID。

      • urlbody · string可选

        接口 URL。

      • protocol_bindingbody · string可选

        协议绑定。

      • protocol_versionbody · string可选

        协议版本。

    • skillsbody · A2AAgentSkill[]可选

      技能列表。

      • idbody · string可选

        记录 ID。

      • agent_idbody · string可选

        所属 Agent ID。

      • skill_idbody · string可选

        技能 ID。

      • namebody · string可选

        技能名称。

      • descriptionbody · string可选

        描述。

      • tagsbody · string[]可选

        标签。

      • examplesbody · string[]可选

        示例。

      • input_modesbody · string[]可选

        输入模式。

      • output_modesbody · string[]可选

        输出模式。

      • security_requirements_jsonbody · string可选

        安全要求 JSON。

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/ai/a2a/v1/agents' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"support-agent"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
GET/ai/a2a/v1/agent/skills需要鉴权

列出 Agent Skill

查询 Agent Skill。

  • Authorizationheader · string必填

    登录返回的 token。

  • agent_idquery · string可选

    Agent ID。

请求示例
curl -sS 'http://127.0.0.1:8090/ai/a2a/v1/agent/skills?agent_id=<id>' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
GET/ai/a2a/v1/agents/{id}/card需要鉴权

获取 Agent Card

读取 Agent Card 元数据。

  • Authorizationheader · string必填

    登录返回的 token。

  • idpath · string必填

    Agent ID。

请求示例
curl -sS 'http://127.0.0.1:8090/ai/a2a/v1/agents/<id>/card' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "card": { "name": "support-agent", "url": "https://..." }
}
PUT/ai/a2a/v1/agents需要鉴权

更新 A2A Agent

更新 A2A Agent。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · A2AAgent[]必填

    请求体为 A2AAgent 的 JSON 数组;下列为单条字段。

  • idbody · string可选

    Agent ID。

  • namebody · string可选

    名称。

  • namespacebody · string可选

    命名空间。

  • descriptionbody · string可选

    描述。

  • backend_typebody · string可选

    后端类型。

  • backend_addressbody · string可选

    后端地址。

  • backend_service_namespacebody · string可选

    后端服务命名空间。

  • backend_service_namebody · string可选

    后端服务名。

  • raw_card_jsonbody · string可选

    原始 Card JSON。

  • metadatabody · map<string,string>可选

    元数据。

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • A2AAgentbody · A2AAgent可选

    实体字段。

    • idbody · string可选

      Agent ID。

    • namebody · string可选

      名称。

    • namespacebody · string可选

      命名空间。

    • descriptionbody · string可选

      描述。

    • backend_typebody · string可选

      后端类型。

    • backend_addressbody · string可选

      后端地址。

    • backend_service_namespacebody · string可选

      后端服务命名空间。

    • backend_service_namebody · string可选

      后端服务名。

    • raw_card_jsonbody · string可选

      原始 Card JSON。

    • metadatabody · map<string,string>可选

      元数据。

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/ai/a2a/v1/agents' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}
POST/ai/a2a/v1/agents/delete需要鉴权

删除 A2A Agent

删除 A2A Agent。

  • Authorizationheader · string必填

    登录返回的 token。

  • agent_idsbody · string[]可选

    Agent ID 列表。

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • A2AAgentDeleteRequestbody · A2AAgentDeleteRequest可选

    实体字段。

    • agent_idsbody · string[]可选

      Agent ID 列表。

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/ai/a2a/v1/agents/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}

On this page