类的使用
io.agentscope.core.event.AgentEvent
使用AgentEvent的程序包
程序包
说明
-
io.agentscope.core中AgentEvent的使用
返回变量类型为AgentEvent的类型的io.agentscope.core中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(Msg msg) Stream fine-grainedAgentEvents for a single input message.reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(Msg msg, RuntimeContext context) Stream fine-grainedAgentEvents for a single input message with a caller-suppliedRuntimeContext.reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(String text) Stream fine-grainedAgentEvents for a plain text input.reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(String text, RuntimeContext context) Stream fine-grainedAgentEvents for a plain text input with a caller-suppliedRuntimeContext.reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(List<Msg> msgs) Stream fine-grainedAgentEvents from the full agent lifecycle.reactor.core.publisher.Flux<AgentEvent> ReActAgent.streamEvents(List<Msg> msgs, RuntimeContext context) Stream fine-grainedAgentEvents with a caller-suppliedRuntimeContext. -
io.agentscope.core.event中AgentEvent的使用
修饰符和类型类说明classEmitted when an agent finishes processing an invocation.classEmitted when an agent successfully finishes processing an invocation, carrying the final result message.classEmitted when an agent begins processing an invocation.classEmitted during the acting phase when all tool calls from the most recent reasoning step were denied (by user HITL confirmation or by permission rules).classGeneric extensible event for signals that don't fit a specificAgentEventsubtype.classclassclassclassEmitted when the agent's ReAct loop exceeds the configured maximum iterations.classEmitted after externally-executed tool results are provided back to the agent.classOne-shot hint block event.classEmitted when the agent finishes a model (LLM) call.classEmitted when the agent starts a model (LLM) call.classRequests the agent to pause execution after the current phase completes.classEmitted when tool calls require external (out-of-process) execution.classEmitted when the agent requires user confirmation before executing tool calls (HITL).classEmitted when a spawned subagent is exposed as a user-addressable entry point viaagent_spawn(expose_to_user=true).classclassclassclassclassclassclassEmitted as tool call input arguments are streamed incrementally.classclassclassclassclassclassclassEmitted after the user has responded to aRequireUserConfirmEvent.修饰符和类型方法说明AgentEvent.withMetadata(Map<String, Object> metadata) Attaches arbitrary key-value metadata to this event and returns it for chaining.AgentEvent.withSource(String source) Sets the source path and returns this event.参数类型为AgentEvent的io.agentscope.core.event中的方法修饰符和类型方法说明voidAgentEventEmitter.emit(AgentEvent event) Emits anAgentEventinto the parent'sstreamEvents()stream. -
io.agentscope.core.middleware中AgentEvent的使用
返回变量类型为AgentEvent的类型的io.agentscope.core.middleware中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> MiddlewareChain.MiddlewareMethod.apply(MiddlewareBase mw, Agent agent, RuntimeContext ctx, I input, Function<I, reactor.core.publisher.Flux<AgentEvent>> next) static <I> Function<I, reactor.core.publisher.Flux<AgentEvent>> MiddlewareChain.build(List<? extends MiddlewareBase> middlewares, Agent agent, RuntimeContext ctx, MiddlewareChain.MiddlewareMethod<I> method, Function<I, reactor.core.publisher.Flux<AgentEvent>> core) Build a middleware chain that producesFlux<AgentEvent>.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the tool-call execution phase.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the entire agent invocation.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the raw model API call.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the reasoning phase (LLM call + streaming output parsing).reactor.core.publisher.Flux<AgentEvent> TaskReminderMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) 类型变量类型为AgentEvent的io.agentscope.core.middleware中的方法参数修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> MiddlewareChain.MiddlewareMethod.apply(MiddlewareBase mw, Agent agent, RuntimeContext ctx, I input, Function<I, reactor.core.publisher.Flux<AgentEvent>> next) static <I> Function<I, reactor.core.publisher.Flux<AgentEvent>> MiddlewareChain.build(List<? extends MiddlewareBase> middlewares, Agent agent, RuntimeContext ctx, MiddlewareChain.MiddlewareMethod<I> method, Function<I, reactor.core.publisher.Flux<AgentEvent>> core) Build a middleware chain that producesFlux<AgentEvent>.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the tool-call execution phase.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the entire agent invocation.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the raw model API call.default reactor.core.publisher.Flux<AgentEvent> MiddlewareBase.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) Intercept the reasoning phase (LLM call + streaming output parsing).reactor.core.publisher.Flux<AgentEvent> TaskReminderMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) -
io.agentscope.core.shutdown中AgentEvent的使用
返回变量类型为AgentEvent的类型的io.agentscope.core.shutdown中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) 类型变量类型为AgentEvent的io.agentscope.core.shutdown中的方法参数修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> GracefulShutdownMiddleware.onReasoning(Agent agent, RuntimeContext ctx, ReasoningInput input, Function<ReasoningInput, reactor.core.publisher.Flux<AgentEvent>> next) -
io.agentscope.core.tracing中AgentEvent的使用
返回变量类型为AgentEvent的类型的io.agentscope.core.tracing中的方法修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next) 类型变量类型为AgentEvent的io.agentscope.core.tracing中的方法参数修饰符和类型方法说明reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onActing(Agent agent, RuntimeContext ctx, ActingInput input, Function<ActingInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, reactor.core.publisher.Flux<AgentEvent>> next) reactor.core.publisher.Flux<AgentEvent> OtelTracingMiddleware.onModelCall(Agent agent, RuntimeContext ctx, ModelCallInput input, Function<ModelCallInput, reactor.core.publisher.Flux<AgentEvent>> next)