接口 StreamableAgent
- 所有已知子接口:
Agent
- 所有已知实现类:
AgentBase,ReActAgent,UserAgent
已过时, 待删除: 此 API 元素将从以后的版本中删除。
Interface for agents that support streaming events during execution.
This interface enables real-time streaming of execution events as the agent processes input. Events can include reasoning steps, tool results, and final output.
Streaming is useful for:
- Displaying incremental progress to users
- Monitoring agent reasoning in real-time
- Building interactive chat interfaces
-
方法概要
修饰符和类型方法说明default reactor.core.publisher.Flux<Event> stream(StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> stream(StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.default reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, RuntimeContext context) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal.
-
方法详细资料
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events based on current state without adding new input.- 参数:
options- Stream configuration options- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events with structured output support based on current state.- 参数:
structuredModel- Class defining the structure of the output- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events with structured output support based on current state.- 参数:
options- Stream configuration optionsstructuredModel- Class defining the structure of the output- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(Msg msg) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(Msg)for the fine-grainedAgentEventstream.Stream execution events for a single message with default options.- 参数:
msg- Input message- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(Msg)for the fine-grainedAgentEventstream.Stream execution events for a single message.- 参数:
msg- Input messageoptions- Stream configuration options- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events for a single message with structured output support.- 参数:
msg- Input messageoptions- Stream configuration optionsstructuredModel- Class defining the structure of the output- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events for a single message with JSON schema support.- 参数:
msg- Input messageoptions- Stream configuration optionsschema- JSON schema defining the structure- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(List<Msg> msgs) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(List)for the fine-grainedAgentEventstream.Stream execution events for multiple messages with default options.- 参数:
msgs- Input messages- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(List)for the fine-grainedAgentEventstream.Stream execution events in real-time as the agent processes the input.- 参数:
msgs- Input messagesoptions- Stream configuration options- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) default reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, RuntimeContext context) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events with a caller-supplied per-call runtime context.Implementations that do not consume
RuntimeContextcan rely on this default bridge and continue using the original two-argument stream method.- 参数:
msgs- Input messagesoptions- Stream configuration optionscontext- Runtime metadata for this call- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events with structured output support.- 参数:
msgs- Input messagesoptions- Stream configuration optionsstructuredModel- Class defining the structure of the output- 返回:
- Flux of events emitted during execution
-
stream
@Deprecated(since="2.0.0", forRemoval=true) reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema) 已过时, 待删除: 此 API 元素将从以后的版本中删除。since 2.0.0, for removal. UseReActAgent#streamEvents(...)for the fine-grainedAgentEventstream.Stream execution events with JSON schema support.- 参数:
msgs- Input messagesoptions- Stream configuration optionsschema- JSON schema defining the structure- 返回:
- Flux of events emitted during execution
-
stream(...)method on this interface returns the coarse-grainedEventtype, which is a v1 carry-over. UseReActAgent#streamEvents(...)instead — it returnsFlux<io.agentscope.core.event.AgentEvent>, the fine-grained event hierarchy that covers the full agent lifecycle (28 typed events including HITL) and is the single streaming surface going forward. See the v2 changelog section B.4 for migration details.