AgentScopeAgentExecutor
public class AgentScopeAgentExecutor implements AgentExecutor
源码Source
io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java:71–535AgentScope 智能体执行器,支持智能体之间的发现、委派与协作。位于 io.agentscope.core.a2a.server.executor 包,实现 AgentExecutor。核心成员包括 cancel、execute、AgentScopeAgentExecutor。
Implementation of A2A AgentExecutor for AgentScope.
For Current Implementation, will create a new io.agentscope.core.agent.Agent for each request.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AgentScopeAgentExecutor(AgentRunner agentRunner, AgentExecuteProperties agentExecuteProperties) | 初始化 `AgentScopeAgentExecutor` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void cancel(RequestContext context, EventQueue eventQueue) throws JSONRPCError | 执行取消相关操作。 Performs the cancel operation. |
public void execute(RequestContext context, EventQueue eventQueue) throws JSONRPCError | 执行执行相关操作。 Performs the execute operation. |
构造器详情Constructor Detail
AgentScopeAgentExecutor
public AgentScopeAgentExecutor(AgentRunner agentRunner, AgentExecuteProperties agentExecuteProperties)
初始化 AgentScopeAgentExecutor 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentRunner | AgentRunner | 智能体运行器(类型 `AgentRunner`)。The agent runner. |
agentExecuteProperties | AgentExecuteProperties | 智能体执行属性(类型 `AgentExecuteProperties`)。The agent execute properties. |
源码Source
io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java:81–86方法详情Method Detail
cancel
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/core/a2a/server/executor/AgentScopeAgentExecutor.java:88–104execute
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/core/a2a/server/executor/AgentScopeAgentExecutor.java:106–135