GraphAgentExecutor
public class GraphAgentExecutor implements AgentExecutor
源码Source
io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:42–376图智能体执行器,支持智能体之间的发现、委派与协作。位于 io.agentscope.runtime.protocol.a2a 包,实现 AgentExecutor。核心成员包括 execute、cancel、GraphAgentExecutor。
A class in io.agentscope.runtime.protocol.a2a that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.runtime.protocol.a2a. Implements AgentExecutor.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public GraphAgentExecutor(Runner runner) | 初始化 `GraphAgentExecutor` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void execute(RequestContext context, EventQueue eventQueue) throws JSONRPCError | 执行执行相关操作。 Performs the execute operation. |
public void cancel(RequestContext context, EventQueue eventQueue) throws JSONRPCError | 执行取消相关操作。 Performs the cancel operation. |
构造器详情Constructor Detail
GraphAgentExecutor
public GraphAgentExecutor(Runner runner)
初始化 GraphAgentExecutor 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runner | Runner | 运行器(类型 `Runner`)。The runner. |
源码Source
io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:49–52方法详情Method Detail
execute
public void execute(RequestContext context, EventQueue eventQueue) throws JSONRPCError
执行执行相关操作。
Performs the execute operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | RequestContext | 上下文(类型 `RequestContext`)。The context. |
eventQueue | EventQueue | 事件队列(类型 `EventQueue`)。The event queue. |
JSONRPCError可能抛出 `JSONRPCError`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:54–80cancel
public void cancel(RequestContext context, EventQueue eventQueue) throws JSONRPCError
执行取消相关操作。
Performs the cancel operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | RequestContext | 上下文(类型 `RequestContext`)。The context. |
eventQueue | EventQueue | 事件队列(类型 `EventQueue`)。The event queue. |
JSONRPCError可能抛出 `JSONRPCError`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:367–375