Class BaseReActAgentRunner
java.lang.Object
io.agentscope.core.a2a.server.executor.runner.BaseReActAgentRunner
- All Implemented Interfaces:
AgentRunner
- Direct Known Subclasses:
ReActAgentWithBuilderRunner
Abstract Implementation for
AgentRunner by ReActAgent.
Use ReActAgent directly to handler request from A2A client. In this implementation, ReActAgent
should be created for each request and be cached to intercept when the request is stopped.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract io.agentscope.core.ReActAgentBuildReActAgentto run new request.Get agent description to build AgentCard.Get agent name to build AgentCard.voidStop to handle agent request.reactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent>streamEvents(List<io.agentscope.core.message.Msg> requestMessages, AgentRequestOptions options) Start to handle agent request with streaming output.
-
Constructor Details
-
BaseReActAgentRunner
protected BaseReActAgentRunner()
-
-
Method Details
-
getAgentName
Description copied from interface:AgentRunnerGet agent name to build AgentCard.- Specified by:
getAgentNamein interfaceAgentRunner- Returns:
- agent name
-
getAgentDescription
Description copied from interface:AgentRunnerGet agent description to build AgentCard.- Specified by:
getAgentDescriptionin interfaceAgentRunner- Returns:
- agent description
-
streamEvents
public reactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent> streamEvents(List<io.agentscope.core.message.Msg> requestMessages, AgentRequestOptions options) Description copied from interface:AgentRunnerStart to handle agent request with streaming output.- Specified by:
streamEventsin interfaceAgentRunner- Parameters:
requestMessages- the messages from a2a clientoptions- the options for agent request, such as `taskId`, `sessionId` or `userId` of this request- Returns:
- Flux of events emitted during execution
-
stop
Description copied from interface:AgentRunnerStop to handle agent request.- Specified by:
stopin interfaceAgentRunner- Parameters:
taskId- the taskId of request needed to stop
-
buildReActAgent
protected abstract io.agentscope.core.ReActAgent buildReActAgent()BuildReActAgentto run new request.- Returns:
ReActAgentinstance
-