AS AgentScopeAPI 手册 / API Reference

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
runnerRunner运行器(类型 `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
contextRequestContext上下文(类型 `RequestContext`)。The context.
eventQueueEventQueue事件队列(类型 `EventQueue`)。The event queue.
抛出Throws
  • JSONRPCError 可能抛出 `JSONRPCError`。Thrown when the operation cannot be completed.
源码Source io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:54–80

cancel

public void cancel(RequestContext context, EventQueue eventQueue) throws JSONRPCError

执行取消相关操作。

Performs the cancel operation.

参数Parameters
名称Name类型Type说明Description
contextRequestContext上下文(类型 `RequestContext`)。The context.
eventQueueEventQueue事件队列(类型 `EventQueue`)。The event queue.
抛出Throws
  • JSONRPCError 可能抛出 `JSONRPCError`。Thrown when the operation cannot be completed.
源码Source io/agentscope/runtime/protocol/a2a/GraphAgentExecutor.java:367–375
基于官方固定版本源码静态生成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.