AS AgentScopeAPI 手册 / API Reference

A2aJsonRpcController

@RestController @RequestMapping("/") public class A2aJsonRpcController
源码Source io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:36–94

A 2 a JSON Rpc 控制器,支持智能体之间的发现、委派与协作。位于 io.agentscope.spring.boot.a2a.controller 包。核心成员包括 handleRequest、A2aJsonRpcController。

A class in io.agentscope.spring.boot.a2a.controller that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.spring.boot.a2a.controller.

构造器摘要Constructor Summary

构造器Constructor说明Description
public A2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)
初始化 `A2aJsonRpcController` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Object handleRequest(String body, Map<String, String> header)
处理请求。
Performs the handle request operation.

构造器详情Constructor Detail

A2aJsonRpcController

public A2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)

初始化 A2aJsonRpcController 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
agentScopeA2aServerAgentScopeA2aServer智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server.
源码Source io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:46–48

方法详情Method Detail

handleRequest

public Object handleRequest(String body, Map<String, String> header)

处理请求。

Performs the handle request operation.

参数Parameters
名称Name类型Type说明Description
bodyString正文(类型 `String`)。The body.
headerMap<String, String>请求头(类型 `Map`)。The header.
返回Returns Object
返回对象。Returns object.
源码Source io/agentscope/spring/boot/a2a/controller/A2aJsonRpcController.java:50–66
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.